-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Add initial bc-linter configuration #161319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/161319
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 44 PendingAs of commit 7ce616d with merge base 419a2db ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very ez
@pytorchbot merge -f 'noop change, lint passed' |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
This PR makes bc-linter configurable (via .bc-linter.yml, [see the spec](https://github.com/pytorch/test-infra/blob/e73b14f75422a0fb38212c2d465f9a86fb20a11c/tools/stronghold/docs/bc_linter_config.md)). #### Changes: - added api.config with yaml loader - config status is logged (and loaded config is printed with --verbose) - simplified default excludes to [".", "./", "/./", "/."] (removed pytorch-specific paths, added them back [via config file](pytorch/pytorch#161319)) - for globs used pathspec (gitwildmatch) #### Action + Dependencies - added runtime deps file tools/stronghold/requirements.runtime.txt (PyYAML, pathspec). - composite action now installs runtime deps before build/run. #### Tests - Added tests for glob semantics, loader behaviors, defaults, scan flags, annotations, and top‑level vs nested paths. Backtesting [new config](pytorch/pytorch#161319) against paths in PyTorch codebase: ``` - Total .py files: 13820 - Old allowed (a07e5d9 rules): 4926 - New allowed: 4926 - Diffs: 0 (perfect match) ``` Testing action end-to-end close to prod: pytorch/pytorch#161325 see [this run](https://github.com/pytorch/pytorch/actions/runs/17168177594/job/48713225885?pr=161325#step:2:6155), correctly returns a single warning (job failure is expected).
Preparation for pytorch/test-infra#7016 Currently merging this PR is a noop change for PyTorch repo (bc-linter is not looking at the config yet). Pull Request resolved: pytorch#161319 Approved by: https://github.com/seemethere, https://github.com/ZainRizvi
Preparation for pytorch/test-infra#7016
Currently merging this PR is a noop change for PyTorch repo (bc-linter is not looking at the config yet).