fix(repro --lint): mirror CI lint, no clang-tidy --all-files by default#219
Merged
Conversation
…y default Bare 'repro --lint' ran 'lintrunner --all-files', which on main fires CLANGTIDY across the whole tree (needs generated build files, pegs the box for ~hours). Now mirror pytorch CI (.github/scripts/lintrunner.sh): - regenerate version + type stubs first (so mypy/pyrefly are accurate) - run the python/general linters (--skip CLANGTIDY,CLANGTIDY_EXECUTORCH_COMPATIBILITY,CLANGFORMAT) - C++ linters (CLANGTIDY/CLANGFORMAT) are a separate CI job -> opt-in via --clang (generates clang build files; heavy) - scope mirrors CI: PR ref lints its diff (merge-base), main lints all files Validated on a live cpu-x86 box: codegen + lintrunner init + lint run clean. Bumps gpu-dev to 0.7.14.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
gpu-dev repro --lint(added in #218) defaulted tolintrunner --all-files. On main that fires CLANGTIDY across the whole tree — needs generated build files, spawns dozens of clang-tidy procs and pegs the box for ~hours. Looked hung; wasn't.Fix — mirror what pytorch CI actually runs
Replicates
.github/scripts/lintrunner.sh+ the 3 lint jobs inlint.yml:tools.generate_torch_version+tools.pyi.gen_pyi(so mypy/pyrefly are accurate), like CI.lintrunner --skip CLANGTIDY,CLANGTIDY_EXECUTORCH_COMPATIBILITY,CLANGFORMAT <scope>. No C++ build.--clangopt-in adds the C++ linters (generate_build_files+--take CLANGTIDY,CLANGFORMAT) — CI isolates these in their own heavy job.--merge-base-with origin/main); main →--all-files; extra args override.Validation
Live on a cpu-x86 box:
generate_torch_version✓,gen_pyi✓,lintrunner init✓,lintrunner --skip ... <file>→ok No lint issuesexit 0.Unit: 1208 passed, 3 pre-existing xfails (lint tests updated +
--clangcoverage added).Bumps
gpu-dev→ 0.7.14. CLI-only; no tofu apply.