-
Notifications
You must be signed in to change notification settings - Fork 0
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
DT-921: Add Spotless to build process. #999
Conversation
@@ -24,6 +24,7 @@ jobs: | |||
uses: actions/checkout@v4 | |||
with: | |||
persist-credentials: false | |||
fetch-depth: 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This downloads the current version of the repository instead of the entire repository history.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what I described in step 2 - it fetches the full history of the repo so that the local checkout has access to the origin/develop
branch. See https://github.com/actions/checkout for docs. Without this, spotless isn't able to apply the rachetFrom
configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spotless changes look good, thanks!
How does this interact with our checked-in codeStyles? |
It applies the |
Going to close this for the time being. We need to better clarify where this should sit in the local build/dev/deploy cycle and how to deal with potential conflicts with |
Addresses
Addresses https://broadworkbench.atlassian.net/browse/DT-921 only for Consent-Ontology
Summary
Adds spotless to the build process. PRs will potentially fail the maven action if there are any formatting problems.
This PR is limited to these things:
origin/develop
. Necessary to apply theratchetFrom
configuration option for spotless.mvn spotless:apply
semgrep
warning from updatingStorageFactory
There are some outstanding cleanup problems that we can address in a future PR/ticket, for example, there are some unused classes touched in this PR like
UseRestrictionKeys
andValidationResponse
.Have you read CONTRIBUTING.md lately? If not, do that first.