From 702c7f00e2b5a425dbc03f88354a35a0cf7fd0d6 Mon Sep 17 00:00:00 2001 From: Peter Bell Date: Fri, 15 Apr 2022 21:38:52 +0100 Subject: [PATCH] Exclude mobile TorchScript models from linter checks Pull Request resolved: https://github.com/pytorch/pytorch/pull/75906 Approved by: https://github.com/suo --- .lintrunner.toml | 1 + tools/linter/adapters/grep_linter.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.lintrunner.toml b/.lintrunner.toml index 020295bea31ca9..73826c5679e743 100644 --- a/.lintrunner.toml +++ b/.lintrunner.toml @@ -269,6 +269,7 @@ exclude_patterns=[ 'third_party/**', '**/*.expect', '**/*.ipynb', + '**/*.ptl', 'tools/clang_format_hash/**', ] command = [ diff --git a/tools/linter/adapters/grep_linter.py b/tools/linter/adapters/grep_linter.py index d160c4d5dc213c..d894305c7f7a58 100644 --- a/tools/linter/adapters/grep_linter.py +++ b/tools/linter/adapters/grep_linter.py @@ -160,7 +160,7 @@ def main() -> None: ) try: - proc = run_command(["grep", "-nPH", args.pattern, *args.filenames]) + proc = run_command(["grep", "-nPHI", args.pattern, *args.filenames]) except Exception as err: err_msg = LintMessage( path=None,