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

CI Test Check for Style guidelines using Spotless plugin #43

Merged
merged 3 commits into from
Jul 11, 2024

Conversation

AlfredoG87
Copy link
Contributor

Description:
Add a CI Test that checks that the spotless check passes, otherwise it will fail and recommend to run the following command:

./gradlew spotlessApply

Related issue(s):

Fixes #31

Notes for reviewer:
Raised another PR with the same exact changes, but added another commit with a modification of style so to force the failure of the check.

see here:
#42
Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

…ct style guidelines.

I will also show how to fix things running ./gradlew spotlessApply

Signed-off-by: Alfredo Gutierrez <[email protected]>
@AlfredoG87 AlfredoG87 requested review from a team as code owners July 11, 2024 19:10
@AlfredoG87 AlfredoG87 self-assigned this Jul 11, 2024
@AlfredoG87 AlfredoG87 added the Improvement Code changes driven by non business requirements label Jul 11, 2024
@AlfredoG87 AlfredoG87 added this to the 0.1.0 milestone Jul 11, 2024
@jsync-swirlds
Copy link
Member

It might be worth taking a look at services compile checks, particularly the CGroups setup, to see if we can improve this by using their action code/setup as a model. We might also want to include module checks (from the same reference), as a way to ensure the module setup remains clean and consistent.

@AlfredoG87
Copy link
Contributor Author

It might be worth taking a look at services compile checks, particularly the CGroups setup, to see if we can improve this by using their action code/setup as a model. We might also want to include module checks (from the same reference), as a way to ensure the module setup remains clean and consistent.

Yes. I did take a look at the services, and that specific workflow as a source of inspiration, however implementing everything in there is probably not necessary right now and out of scope of current task.

But I agree that as the Codebase grows and in time, when we have many CI jobs we can use that model and refactor them all into a single CI WF.

But for now, the objective of this CI Test is to protect the style guidelines.

Signed-off-by: Alfredo Gutierrez <[email protected]>
Signed-off-by: Alfredo Gutierrez <[email protected]>
@AlfredoG87 AlfredoG87 requested a review from jsync-swirlds July 11, 2024 22:11
Copy link
Contributor

@mattp-swirldslabs mattp-swirldslabs left a comment

Choose a reason for hiding this comment

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

LGTM

@AlfredoG87 AlfredoG87 merged commit d9c3d93 into main Jul 11, 2024
3 checks passed
@AlfredoG87 AlfredoG87 deleted the spotless-ci-check branch July 11, 2024 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Code changes driven by non business requirements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add spotless gradle plugin support And Verify that is Working as Expected
3 participants