lint: Only include files in pytorch (#164008)

We were seeing instances of stdlib files in clang-tidy output so this
just essentially removes them from the things that lintrunner will
report up. Longer term fix here would be to just modify the clang-tidy
configuration in order to do the correct thing here but that requires a
bit more investigation as to why this is only happening in CI and is not
reproduceable locally.

Signed-off-by: Eli Uriegas <eliuriegas@meta.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/164008
Approved by: https://github.com/ZainRizvi
This commit is contained in:
Eli Uriegas
2025-09-26 22:20:56 +00:00
committed by PyTorch MergeBot
parent 3a115da3e6
commit 8a0e8cad5f

View File

@ -174,6 +174,8 @@ def check_file(
for match in RESULTS_RE.finditer(proc.stdout.decode()):
# Convert the reported path to an absolute path.
abs_path = str(Path(match["file"]).resolve())
if not abs_path.startswith(PYTORCH_ROOT):
continue
message = LintMessage(
path=abs_path,
name=match["code"],