feat: add reusable multi-language style-check workflow - #17
Open
TheMeinerLP wants to merge 2 commits into
Open
Conversation
Adds .github/workflows/style-check.yml offering per-language style/format checks that auto-skip when a language's files did not change, are individually toggleable, and run strictly in check mode (never mutate): - Java/Kotlin: gradlew spotlessCheck (auto-skips if task absent) - Rust: cargo fmt --check (+ optional clippy) - Dart: dart format --set-exit-if-changed (+ optional analyze) - JavaScript/TypeScript: npm run lint if present, else prettier --check - Python: ruff check + ruff format --check - EditorConfig: language-agnostic baseline Documented in README with usage examples. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Shell: shellcheck over tracked *.sh/*.bash/*.zsh (configurable severity) - YAML: yamllint using repo-local .yamllint* config, else the relaxed ruleset Both auto-skip when unchanged, are toggleable, and run in check mode only. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a reusable
style-check.ymlthat offers style/formatting checks for several languages in one workflow.Design
dorny/paths-filter— a job only runs when files for that language changed (e.g. a Gradle repo runs just Spotless, a Dart repo just the Dart job).true);force: trueignores the path filters.repository-ownerguard,concurrency,workflow_call, pinned actions). Validated withactionlint.Languages & tools (chosen to match what repos already use)
./gradlew spotlessCheck— auto-skips if the task doesn't exist, so non-Spotless repos don't failcargo fmt --all --check(+ optionalclippy -D warnings)dart format --set-exit-if-changed(+ optionaldart analyze)npm run lintif a lint script exists, elseprettier --check(override viajavascript-command)ruff check+ruff format --check(override viapython-command)shellcheckover tracked*.sh/*.bash/*.zsh(severity configurable)yamllintwith repo-local.yamllint*config, else therelaxedruleseteditorconfig-checkerUsage
No secrets required. README updated with table entry + usage examples.
🤖 Generated with Claude Code