You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[bc-linter] Add BC Linter configuration support (#7016)
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).
0 commit comments