- .gitea/workflows/lint.yaml: EditorConfig, Markdown, ShellCheck, YAML lint - Runs on push/PR to main
This commit is contained in:
@@ -0,0 +1,44 @@
|
|||||||
|
name: Lint & Validate
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Check EditorConfig compliance
|
||||||
|
run: |
|
||||||
|
if command -v editorconfig-checker &> /dev/null; then
|
||||||
|
editorconfig-checker
|
||||||
|
else
|
||||||
|
echo "editorconfig-checker not installed — skipping"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Check Markdown style
|
||||||
|
run: |
|
||||||
|
if command -v markdownlint &> /dev/null; then
|
||||||
|
markdownlint '**/*.md' --ignore node_modules
|
||||||
|
else
|
||||||
|
echo "markdownlint not installed — skipping"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: ShellCheck
|
||||||
|
run: |
|
||||||
|
if command -v shellcheck &> /dev/null; then
|
||||||
|
find . -name '*.sh' -exec shellcheck {} +
|
||||||
|
else
|
||||||
|
echo "shellcheck not installed — skipping"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: YAML lint
|
||||||
|
run: |
|
||||||
|
if command -v yamllint &> /dev/null; then
|
||||||
|
yamllint .
|
||||||
|
else
|
||||||
|
echo "yamllint not installed — skipping"
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user