diff --git a/.github/workflows/Static Analysis.yml b/.github/workflows/Static Analysis.yml deleted file mode 100644 index f768d79..0000000 --- a/.github/workflows/Static Analysis.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Markdownlint - -on: [push, pull_request] - -jobs: - Markdown_Lint_Check: - name: Markdown Lint Check - runs-on: ubuntu-latest - steps: - - name: Install markdownlint-cli - run: npm install -g markdownlint-cli - - name: Checkout code - uses: actions/checkout@v2 - - name: Run markdownlint - run: | - echo "Checking Markdown files" - find . -type f -name "*.md" -print0 | xargs -0 markdownlint \ No newline at end of file diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml new file mode 100644 index 0000000..cd62ea2 --- /dev/null +++ b/.github/workflows/static-analysis.yml @@ -0,0 +1,32 @@ +name: Static Analysis + +on: + push: + pull_request: + workflow_dispatch: + +jobs: + markdownlint: + name: Markdown Lint Check + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '18' + + - name: Install markdownlint-cli + run: npm install -g markdownlint-cli + + - name: Run markdownlint + run: | + echo "🔍 Checking Markdown files..." + if find . -name "*.md" -not -path "./node_modules/*" -not -path "./.git/*" | head -1 | grep -q .; then + find . -name "*.md" -not -path "./node_modules/*" -not -path "./.git/*" -print0 | xargs -0 markdownlint --config .markdownlint.json || markdownlint **/*.md + echo "✅ Markdown lint check completed successfully" + else + echo "â„šī¸ No Markdown files found to check" + fi \ No newline at end of file diff --git a/.markdownlint.json b/.markdownlint.json index ed80b75..c14d6d3 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -1,5 +1,5 @@ { - "MD026": false, - "default": true, - "line-length": false - } \ No newline at end of file + "MD026": false, + "default": true, + "line-length": false +} \ No newline at end of file