Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CODE STYLE] Switch checkstyle to spotless #297

Merged
merged 1 commit into from
Feb 18, 2022

Conversation

jmazanec15
Copy link
Member

Description

Switches checkstyle functionality to spotless. Sets ratchetFrom to origin/main. This will mean it will only fail on files recently changed. Formatting guidelines were pulled from OpenSearch directly: https://github.com/opensearch-project/OpenSearch/blob/main/buildSrc/formatterConfig.xml.

Developer guide has been updated.

Checkstyle dependencies were removed.

Planning on backporting to 1.x and changing the branch in the ratchetFrom to 1.x.

Issues Resolved

#293

Check List

  • Commits are signed as per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Switches checkstyle functionality to spotless. Sets ratchetFrom to
origin/main. This will mean it will only fail on files recently changed.
Pull formatting from OpenSearch.

Signed-off-by: John Mazanec <[email protected]>
@jmazanec15 jmazanec15 added Infrastructure Changes to infrastructure, testing, CI/CD, pipelines, etc. backport 1.x labels Feb 18, 2022
@jmazanec15 jmazanec15 requested review from a team, VijayanB and martin-gaievski February 18, 2022 01:01
@codecov-commenter
Copy link

codecov-commenter commented Feb 18, 2022

Codecov Report

Merging #297 (0a725ff) into main (e77ef78) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##               main     #297   +/-   ##
=========================================
  Coverage     83.38%   83.38%           
  Complexity      885      885           
=========================================
  Files           127      127           
  Lines          3834     3834           
  Branches        361      361           
=========================================
  Hits           3197     3197           
  Misses          475      475           
  Partials        162      162           

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 e77ef78...0a725ff. Read the comment docs.

Copy link
Member

@vamshin vamshin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks

@@ -37,7 +37,7 @@ plugins {
id 'nebula.ospackage' version "8.3.0" apply false
id 'idea'
id 'jacoco'
id 'checkstyle'
id "com.diffplug.spotless" version "6.3.0" apply false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to align with OpenSearch in versions? They are using 6.2, not sure if there is much of a difference.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6.2 fails a log4j check, so I bumped to 6.3. Dont think it should be any issue.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree, thanks for clarifying

@jmazanec15
Copy link
Member Author

Overall @martin-gaievski @VijayanB, what do you think about ratchetFrom strategy? Is it better to just fix everything in one sweep or do it incrementally?

@VijayanB
Copy link
Member

Overall @martin-gaievski @VijayanB, what do you think about ratchetFrom strategy? Is it better to just fix everything in one sweep or do it incrementally?

May be we can keep this PR and create next PR with all formatting changes and remove ratchet from third pr

@martin-gaievski
Copy link
Member

Overall @martin-gaievski @VijayanB, what do you think about ratchetFrom strategy? Is it better to just fix everything in one sweep or do it incrementally?

I used ratchetFrom strategy before, it proved to work well. I think we can start with it, and plan to fix everything in one shot in future.

@jmazanec15
Copy link
Member Author

That makes sense to me @martin-gaievski.

@jmazanec15 jmazanec15 merged commit 0db9b2e into opensearch-project:main Feb 18, 2022
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 18, 2022
Switches checkstyle functionality to spotless. Sets ratchetFrom to
origin/main. This will mean it will only fail on files recently changed.
Pull formatting from OpenSearch.

Signed-off-by: John Mazanec <[email protected]>
(cherry picked from commit 0db9b2e)
martin-gaievski pushed a commit to martin-gaievski/k-NN that referenced this pull request Mar 30, 2022
Switches checkstyle functionality to spotless. Sets ratchetFrom to
origin/main. This will mean it will only fail on files recently changed.
Pull formatting from OpenSearch.

Signed-off-by: John Mazanec <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.x Infrastructure Changes to infrastructure, testing, CI/CD, pipelines, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants