-
Notifications
You must be signed in to change notification settings - Fork 465
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
Add maven shell script formatting support via shfmt #1998
Add maven shell script formatting support via shfmt #1998
Conversation
|
||
import com.diffplug.spotless.maven.MavenIntegrationHarness; | ||
|
||
@Disabled // Disabled due to GHA not having shfmt |
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.
Please let me know if I missed some detail that enables these types of formatters (ones that need to shell out) to run in GitHub action workflows. I'd be happy to add whatever is needed to get this to run in GHA.
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.
I replaced @Disabled
with @ShfmtTest
. If you run gradlew test
these tests will not run. They only run when you run ./gradlew testShfmt
to run them.
If you want them to run on CI, you should add them with the npm test
spotless/.github/workflows/ci.yml
Lines 79 to 81 in 797a665
- name: test npm | |
if: matrix.kind == 'npm' | |
run: ./gradlew testNpm |
- change it to
./gradlew testNpm testShfmt
The only tricky part is getting shfmt onto the CI runner. Not that hard though. Feel free to open a PR for it and mess around.
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.
Perfect! Thank you for the clarification.
…ag was being simultaneously excluded and included.
Published in |
This adds Maven support for shfmt and addresses #1567. This is a follow up to #1994. Closes #1567 #1776