Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-1392

Auto-format source code upon build

    XMLWordPrintable

Details

    Description

      We've had repeated discussions about formatting the code which creates friction and distraction during PR reviews. This can be avoided by auto-formatting the code. While I was skeptical initially, I found it works very well for the Quarkus project. So here's what I suggest:

      • Apply the same plug-in as Quarkus does (e.g. talk to gsmet@redhat.com about the details)
      • Find a style which is similar to how the code is currently formatted; i.e. the initial run should do as less re-formatting as possible; I'd expect the biggest change is inconsistent handling of code after closing braces (which shouldn't exist)
      • Update the contribution guide providing templates for Eclipse and IntelliJ (the should be mostly similar to what the auto-formatter does; 100% equality isn't needed, the more the better though so to reduce number of updates done when building the code out of the IDE)
      • Have peace of mind and never think about the topic again

      Attachments

        Activity

          People

            ccranfor@redhat.com Chris Cranford
            gmorling@redhat.com Gunnar Morling
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: