Skip to content

feat(config): add per-file config#1469

Closed
Nytelife26 wants to merge 4 commits intomainfrom
feat/per-file-config
Closed

feat(config): add per-file config#1469
Nytelife26 wants to merge 4 commits intomainfrom
feat/per-file-config

Conversation

@Nytelife26
Copy link
Copy Markdown
Contributor

@Nytelife26 Nytelife26 commented Jan 10, 2026

Relevant issues

Relevant to #1466. Blocked by #1468. Resolves #1358.

Brief

Add the ability to override check configuration on a per-file basis using overrides.

Changes

  • Add file_checks to Config
  • Apply file_checks as an override to Config.checks for files matching partial globs given by keys of Config.file_checks

Remaining work

  • Document this feature
  • Document the caveat that this does not support full glob syntax (see pathlib.PurePath.match)
  • Consider renaming to per_file_checks
  • Compare with expanding globs in per_file_checks and pre-computing possible configurations
    • This would save checking each per_file_checks entry for every file
    • It would add up-front merges, which is worse than the lazy approach
    • Keep the lazy approach and cache results instead to avoid re-computing for future paths that also match the glob?

@Nytelife26 Nytelife26 added the type: feat A new feature label Jan 10, 2026
@Nytelife26 Nytelife26 force-pushed the feat/per-file-config branch from 26afbf0 to 61c6ea2 Compare January 10, 2026 02:39
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.59%. Comparing base (505e07c) to head (cad0f12).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1469      +/-   ##
==========================================
+ Coverage   92.56%   92.59%   +0.02%     
==========================================
  Files         100      100              
  Lines        1022     1026       +4     
==========================================
+ Hits          946      950       +4     
  Misses         76       76              
Flag Coverage Δ
macos-latest 92.00% <100.00%> (+0.03%) ⬆️
py3.10 92.59% <100.00%> (+0.02%) ⬆️
py3.11 92.59% <100.00%> (+0.02%) ⬆️
py3.12 92.59% <100.00%> (+0.02%) ⬆️
py3.13 92.00% <100.00%> (+0.03%) ⬆️
py3.14 92.00% <100.00%> (+0.03%) ⬆️
ubuntu-latest 92.00% <100.00%> (+0.03%) ⬆️
windows-latest 92.59% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Nytelife26 Nytelife26 closed this Jan 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feat A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ignore Specific Files

1 participant