| merge_base_with = "origin/main" |
| |
| [[linter]] |
| code = 'FLAKE8' |
| include_patterns = ['**/*.py'] |
| exclude_patterns = [ |
| 'third-party/**', |
| '**/third-party/**', |
| '.github/scripts/**', |
| 'exir/serde/**', |
| ] |
| command = [ |
| 'python', |
| '-m', |
| 'lintrunner_adapters', |
| 'run', |
| 'flake8_linter', |
| '--', |
| '@{{PATHSFILE}}' |
| ] |
| init_command = [ |
| 'python', |
| '-m', |
| 'lintrunner_adapters', |
| 'run', |
| 'pip_init', |
| '--dry-run={{DRYRUN}}', |
| '--requirement=requirements-lintrunner.txt', |
| ] |
| |
| # Black + usort |
| [[linter]] |
| code = 'UFMT' |
| include_patterns = [ |
| '**/*.py', |
| '**/*.pyi', |
| ] |
| exclude_patterns = [ |
| 'third-party/**', |
| '**/third-party/**', |
| 'exir/serde/**', |
| ] |
| command = [ |
| 'python', |
| '-m', |
| 'lintrunner_adapters', |
| 'run', |
| 'ufmt_linter', |
| '--', |
| '@{{PATHSFILE}}' |
| ] |
| init_command = [ |
| 'python', |
| '-m', |
| 'lintrunner_adapters', |
| 'run', |
| 'pip_init', |
| '--dry-run={{DRYRUN}}', |
| '--no-black-binary', |
| '--requirement=requirements-lintrunner.txt', |
| ] |
| is_formatter = true |
| |
| #CLANGFORMAT |
| [[linter]] |
| code = 'CLANGFORMAT' |
| include_patterns = [ |
| '**/*.h', |
| '**/*.cpp', |
| ] |
| exclude_patterns = [ |
| 'third-party/**', |
| '**/third-party/**', |
| # NB: Objective-C is not supported |
| 'examples/apple/**', |
| 'examples/demo-apps/apple_ios/**', |
| ] |
| command = [ |
| 'python', |
| '-m', |
| 'lintrunner_adapters', |
| 'run', |
| 'clangformat_linter', |
| '--binary=clang-format', |
| '--fallback', |
| '--', |
| '@{{PATHSFILE}}' |
| ] |
| init_command = [ |
| 'python', |
| '-m', |
| 'lintrunner_adapters', |
| 'run', |
| 'pip_init', |
| '--dry-run={{DRYRUN}}', |
| '--requirement=requirements-lintrunner.txt', |
| ] |
| is_formatter = true |
| |
| [[linter]] |
| code = 'CMAKE' |
| include_patterns = [ |
| "**/*.cmake", |
| "**/*.cmake.in", |
| "**/CMakeLists.txt", |
| ] |
| exclude_patterns = [ |
| 'third-party/**', |
| '**/third-party/**', |
| ] |
| command = [ |
| 'python', |
| '-m', |
| 'lintrunner_adapters', |
| 'run', |
| 'cmake_linter', |
| '--config=.cmakelintrc', |
| '--', |
| '@{{PATHSFILE}}', |
| ] |
| init_command = [ |
| 'python', |
| '-m', |
| 'lintrunner_adapters', |
| 'run', |
| 'pip_init', |
| '--dry-run={{DRYRUN}}', |
| '--requirement=requirements-lintrunner.txt', |
| ] |
| |
| [[linter]] |
| code = 'ETCAPITAL' |
| include_patterns = [ |
| '**/*.py', |
| '**/*.pyi', |
| '**/*.h', |
| '**/*.cpp', |
| '**/*.md', |
| '**/*.rst', |
| ] |
| exclude_patterns = [ |
| 'third-party/**', |
| '**/third-party/**', |
| ] |
| command = [ |
| 'python', |
| '-m', |
| 'lintrunner_adapters', |
| 'run', |
| 'grep_linter', |
| '--pattern= Executorch\W+', |
| '--linter-name=ExecuTorchCapitalization', |
| '--error-name=Incorrect capitalization for ExecuTorch', |
| """--error-description= |
| Please use ExecuTorch with capital T for consistency. |
| https://fburl.com/workplace/nsx6hib2 |
| """, |
| '--', |
| '@{{PATHSFILE}}', |
| ] |
| |
| [[linter]] |
| code = 'NEWLINE' |
| include_patterns = ['**'] |
| exclude_patterns = [ |
| 'third-party/**', |
| '**/third-party/**', |
| '**/*.png', |
| '**/*.webp', |
| '**/*.jpeg', |
| '**/*.mp4', |
| '**/*.pte', |
| '**/*.pth', |
| '**/*.bin', |
| '**/*.patch', |
| '**/*.svg', |
| '**/*.bat', |
| '**/*.jpg', |
| '**/*.jar', |
| ] |
| command = [ |
| 'python', |
| '-m', |
| 'lintrunner_adapters', |
| 'run', |
| 'newlines_linter', |
| '--', |
| '@{{PATHSFILE}}', |
| ] |
| is_formatter = true |