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

Configure spotless to cleanup misc files #193

Merged
merged 5 commits into from
Oct 14, 2022

Conversation

dbwiddis
Copy link
Member

@dbwiddis dbwiddis commented Oct 13, 2022

Signed-off-by: Daniel Widdis widdis@gmail.com

Description

It was faster for me to configure spotless to add newlines to the openapi files I keep exporting than to figure out which one needed me to open the editor and add a newline to.

I intentionally made the initial PR with a failing spotless issue in one of the new misc files and it failed, indicating that the gradle check is now redundant with the linelint check.

Accordingly I have removed the linelint check and changed the Code Hygiene workflow to run spotlessCheck, which also checks for other spotless issues (trailing spaces, format, etc.)

I also set up the workflow so that the Gradle Check will only run upon successful completion of the hygiene check. (NOTE: The workflow_run will only trigger once this is merged to main, so you don't see the gradle check in the last run of this PR; however, it will run once merged.). See this comment for a more detailed explanation.

Issues Resolved

Fixes #110

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.

Signed-off-by: Daniel Widdis <widdis@gmail.com>
@dbwiddis dbwiddis requested a review from a team October 13, 2022 03:13
Signed-off-by: Daniel Widdis <widdis@gmail.com>
@dbwiddis dbwiddis force-pushed the spotless branch 2 times, most recently from 3bcf42b to a101c44 Compare October 13, 2022 05:12
Signed-off-by: Daniel Widdis <widdis@gmail.com>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
owaiskazi19
owaiskazi19 previously approved these changes Oct 14, 2022
Copy link
Member

@owaiskazi19 owaiskazi19 left a comment

Choose a reason for hiding this comment

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

Thanks for making our CI faster @dbwiddis!

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
@dbwiddis dbwiddis merged commit 5ecbd71 into opensearch-project:main Oct 14, 2022
@dbwiddis dbwiddis deleted the spotless branch October 14, 2022 18:52
@dbwiddis
Copy link
Member Author

@saratvemulapalli @owaiskazi19 @joshpalis
Demo: after merge, only running these CI:

Screen Shot 2022-10-14 at 11 54 11 AM

Following completion of Code Hygeine, kicked off Gradle Build

Screen Shot 2022-10-14 at 11 57 11 AM

Screen Shot 2022-10-14 at 11 57 49 AM

kokibas pushed a commit to kokibas/opensearch-sdk-java that referenced this pull request Mar 17, 2023
* Configure spotless to cleanup misc files

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Remove trailing spaces

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Remove linelint, only trigger gradle check if spotless check passes

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Remove linelint config file

Signed-off-by: Daniel Widdis <widdis@gmail.com>

Signed-off-by: Daniel Widdis <widdis@gmail.com>
Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
Co-authored-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Configure spotless to handle newline linting in lieu of linelint
4 participants