Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-26617

Use spotless to reduce the pain on fixing checkstyle issues

    XMLWordPrintableJSON

Details

    • Reviewed
    • Hide
      Use spotless to format our java file and pom file, using the hbase_eclipse_formatter.xml and eclipse.importerorder file under our dev-support directory.
      On all branches, the ratchetFrom is set the commit just before the commit which introduces the spotless plugin, so we will only format the files which are touched in later commits.
      From now on, you should type mvn spotless:apply before generating a PR, the spotless plugin will fix most of the format issues for you.
      Show
      Use spotless to format our java file and pom file, using the hbase_eclipse_formatter.xml and eclipse.importerorder file under our dev-support directory. On all branches, the ratchetFrom is set the commit just before the commit which introduces the spotless plugin, so we will only format the files which are touched in later commits. From now on, you should type mvn spotless:apply before generating a PR, the spotless plugin will fix most of the format issues for you.

    Description

      https://github.com/diffplug/spotless

      Spotless is a tool for reformatting code based on your configuration file, it supports the google java format, as well as a eclipse formatter file.

      I think we could use it to format our code, based on a configuration file in our repo, and all the developpers, no matter what IDE they use, they can just type a mvn spotless:apply before commiting a PR, then everything is fine.

      Attachments

        Issue Links

          Activity

            People

              zhangduo Duo Zhang
              zhangduo Duo Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: