From 5450a59c0e2a941283501972983be51bd5cb3e86 Mon Sep 17 00:00:00 2001 From: Kael AI Agent Date: Thu, 12 Mar 2026 00:39:33 +0100 Subject: [PATCH] 28a9ebc8-a59b-40c0-81c1-4ad62a0c2461 Add CI linting for configuration files Implemented by Kael AI Agent --- .github/workflows/lint.yml | 51 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..a089e91 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,51 @@ +name: Lint Configurations + +on: + push: + paths: + - '**/*.sh' + - '**/*.yml' + - '**/*.yaml' + - '**/*.md' + pull_request: + paths: + - '**/*.sh' + - '**/*.yml' + - '**/*.yaml' + - '**/*.md' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install linters + run: | + sudo apt-get update + sudo apt-get install -y shellcheck shfmt yamllint + npm install -g markdownlint-cli + + - name: ShellCheck (shell scripts) + run: | + # Find all .sh files and run shellcheck + shopt -s globstar nullglob + shellcheck -x **/*.sh + + - name: shfmt (shell script formatting) + run: | + shopt -s globstar nullglob + # -d prints diffs; exit code 0 if no differences, 1 otherwise + shfmt -d **/*.sh + + - name: yamllint (YAML files) + run: | + shopt -s globstar nullglob + # Use the default configuration; you can customize as needed + yamllint -d "{extends: default, rules: {line-length: {max: 120}}}" **/*.yml **/*.yaml + + - name: markdownlint (Markdown files) + run: | + # Lint all markdown files, ignoring typical vendor directories + markdownlint "**/*.md" --ignore node_modules --ignore vendor \ No newline at end of file