-
Notifications
You must be signed in to change notification settings - Fork 50
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
mvn format command doesn't format all files #387
Comments
The As for formatting, it is documented in the [README}(https://github.com/k8ssandra/management-api-for-apache-cassandra#checking-the-format). You can simply run mvn fmt:check -P dse,dse7,trunk Before committing your changes. Also, the format is checked during the compile phase. If any files are not in compliance, the compile will fail and tell you which files are not in compliance. I can add a pre-commit hook if that makes things better. |
I guess the reason we're having this problem in this repo specifically is that some contributors aren't on Linux and therefore aren't running tests/compilation locally, so the formatting checks can get missed. Erik and I have agreed that in this specific case a pre-commit hook which does the formatting locally before anything is ever committed is probably going to speed things up a little. |
When we run mvn com.coveo:fmt-maven-plugin:format as recommended by a failing build output, it does not format all files and CI will continue to fail.
Instead, one must also run
mvn xml-format:xml-format -P dse,dse7,trunk
in order to get CI to run.This is confusing for new developers and (even for those of us who know about it) is an easy step to miss. A single command should run both steps. Also, both steps should be run in a pre-commit hook by git, so that developers aren't forced to frequently amend their commits before re-pushing.
The text was updated successfully, but these errors were encountered: