Skip to content

ci(lint): scope super-linter to changed files + repo's actual languages#68

Open
duyet wants to merge 2 commits into
masterfrom
claude/fix-lint-config
Open

ci(lint): scope super-linter to changed files + repo's actual languages#68
duyet wants to merge 2 commits into
masterfrom
claude/fix-lint-config

Conversation

@duyet
Copy link
Copy Markdown
Owner

@duyet duyet commented May 23, 2026

Problem

The Lint job has never actually passed against master because:

  1. It never ran on master. Triggers were push: [main, claude/**] + pull_request: [main]. The default branch is master, so master pushes weren't linted (workflow_runs total_count = 0).
  2. No DEFAULT_BRANCH was set. Super-linter couldn't figure out what to diff against on claude/** push events, so it fell back to validating the entire codebase.
  3. No VALIDATE_ALL_CODEBASE: false. Combined with feat(ci): add GitHub Actions for linting and formatting #2, every push surfaced pre-existing lint failures across the whole repo — including Python, TypeScript, HTML, and natural-language linters firing on files no PR touched.

Result: any claude/** PR (including #67) fails Lint regardless of what it changes.

Fix

  • Add master to both push and pull_request branch filters.
  • Set DEFAULT_BRANCH: master so the diff base is correct.
  • Set VALIDATE_ALL_CODEBASE: false explicitly.
  • Allow-list only the linters that match content actually in this repo (bash, yaml, json, markdown, GitHub Actions, secrets/security scanners). Drop Python/TypeScript/HTML/natural-language — they were producing noise on files no plugin owns.

Test plan


Generated by Claude Code

…repo

Lint was running on `claude/**` push events with no DEFAULT_BRANCH and
no VALIDATE_ALL_CODEBASE setting, causing super-linter to fall back to
scanning the whole repo. That surfaced unrelated pre-existing failures
(Python, TypeScript, HTML, Markdown linters firing on files no PR ever
touched) and made the check effectively unmergeable for any branch.

Changes:

- Add `master` to push/PR branch filters so the default branch is
  actually linted (it had `total_count: 0` runs before this).
- Set `DEFAULT_BRANCH: master` so super-linter can diff against the
  right base in push events.
- Set `VALIDATE_ALL_CODEBASE: false` explicitly to enforce
  changed-files-only behavior.
- Disable the language linters that don't apply to this repo's actual
  content (no Python, TypeScript, HTML, or natural-language prose to
  lint). Keep BASH, YAML, GitHub Actions, JSON, Checkov, Markdown,
  and codespell.
@gemini-code-assist
Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @duyet, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 23, 2026

Warning

Review limit reached

@duyet, we couldn't start this review because you've used your available PR reviews for now.

Your plan currently allows 1 review/hour. Refill in 5 minutes and 1 second.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more review capacity refills, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: aeb95b37-1e47-4461-becf-16f6e57a6840

📥 Commits

Reviewing files that changed from the base of the PR and between cb8838e and 1a086d4.

📒 Files selected for processing (1)
  • .github/workflows/lint.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/fix-lint-config

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

Welcome! 👋

Thank you for your first contribution to this project! We appreciate you taking the time to improve our codebase.

Next Steps

  • A maintainer will review your PR shortly
  • Please check for any review comments and address them
  • Feel free to ask questions if anything is unclear

Contribution Guidelines

  • Ensure all tests pass
  • Update documentation if needed
  • Keep changes focused and atomic

Thanks again for contributing! 🎉

- add `---` document start
- quote `"on":` so yamllint's truthy rule stops fighting prettier
- pin actions/checkout and super-linter to SHA (zizmor unpinned-uses)
- add persist-credentials: false on checkout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant