opendistro-for-elasticsearch / performance-analyzer

📈 OpenDistro Performance Analyzer
https://opendistro.github.io/
Apache License 2.0
146 stars 49 forks source link

Configure spotless plugin and enable code formatting #276

Closed jotok closed 3 years ago

jotok commented 3 years ago

This PR adds code formatting rules to the spotless plugin configuration and adds the spotlessApply target as a dependency of the compileJava target. This means that source files will be automatically formatted during the compilation step.

The plugin is configured to "ratchet from" the main github branch. This means that code formatting will only be applied to source files that are touched in a given PR. This is to avoid creating a huge PR by reformatting every Java file at once. In order to demonstrate the plugin in this PR I triggered formatting for two source files only.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

codecov[bot] commented 3 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@d49a701). Click here to learn what that means. The diff coverage is n/a.

:exclamation: Current head 6e0f2a4 differs from pull request most recent head 4a7543a. Consider uploading reports for the commit 4a7543a to get more accurate results Impacted file tree graph

@@           Coverage Diff           @@
##             main     #276   +/-   ##
=======================================
  Coverage        ?   80.00%           
  Complexity      ?      319           
=======================================
  Files           ?       39           
  Lines           ?     1775           
  Branches        ?      134           
=======================================
  Hits            ?     1420           
  Misses          ?      253           
  Partials        ?      102           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d49a701...4a7543a. Read the comment docs.

jotok commented 3 years ago

Tracking issues for the code coverage failure and the flaky tests: #298 #299