-
Notifications
You must be signed in to change notification settings - Fork 183
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
Fix prettier for java files #4986
Conversation
package.json
Outdated
@@ -3,8 +3,8 @@ | |||
"version": "1.0.0", | |||
"description": "SonarJS code analyzer", | |||
"scripts": { | |||
"format": "prettier --write .", | |||
"check-format": "prettier --list-different .", | |||
"format": "prettier --write . --plugin=./node_modules/prettier-plugin-java/dist/index.js", |
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.
perhaps we can create config file as described here https://github.com/jhipster/prettier-java?tab=readme-ov-file#usage instead of using CLI parameters?
@zglicz can you pls separate configuration change and the formatting into separate commits? And maybe avoid polluting the branch with rebase/merge commits? Then we can update |
"plugins": [ | ||
"prettier-plugin-java" | ||
] |
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.
with this setup, it also works.
Quality Gate failedFailed conditions |
npm run format
hasn't been formatting java files for quite some time. Let us explicitly invoke theprettier-plugin-java
to make it run.