Skip to content

Commit 701c772

Browse files
authored
Remove lintrunner source code (#5754)
* Remove lintrunner source code since it is in https://github.com/suo/lintrunner * Save a few files to make the lint workflow continue to work * Try to clean up .gitignore from the things added in https://github.com/pytorch/test-infra/pull/4499/files * Install lintrunner from pip instead of from local in lint workflow
1 parent 38d9358 commit 701c772

File tree

64 files changed

+7
-5940
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+7
-5940
lines changed

.github/workflows/lint.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ jobs:
2828
uses: actions/setup-python@v4
2929
with:
3030
python-version: ${{ matrix.python_version }}
31+
3132
- name: Install Lintrunner
3233
run: |
33-
pushd tools/lintrunner
34-
pip install .
35-
popd
34+
pip install lintrunner==0.12.5
3635
lintrunner init
36+
3737
- name: Run lintrunner on all files - Linux
3838
run: |
3939
set +e
@@ -45,7 +45,7 @@ jobs:
4545
- name: Produce SARIF
4646
if: always() && matrix.os == 'ubuntu-latest'
4747
run: |
48-
python tools/lintrunner/tools/convert_to_sarif.py --input lint.json --output lintrunner.sarif
48+
python tools/linter/convert_to_sarif.py --input lint.json --output lintrunner.sarif
4949
- name: Upload SARIF file
5050
if: always() && matrix.os == 'ubuntu-latest'
5151
continue-on-error: true

.github/workflows/lintrunner_ci.yml

Lines changed: 0 additions & 126 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -40,99 +40,19 @@ setup-ssh/lib/
4040
setup-ssh/__tests__/runner/
4141

4242
**/revert_file_name.txt
43-
# Generated by Cargo
44-
# will have compiled files and executables
45-
tools/lintrunner/target/
46-
47-
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
48-
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
49-
Cargo.lock
50-
51-
# These are backup files generated by rustfmt
52-
**/*.rs.bk
53-
54-
# Ignore new insta snapshots
55-
tests/snapshots/*.new
56-
5743

5844
# Generated by Maturin
5945
# Byte-compiled / optimized / DLL files
6046
__pycache__/
6147
.pytest_cache/
6248
*.py[cod]
6349

64-
# C extensions
65-
*.so
66-
67-
# Distribution / packaging
68-
.Python
69-
.venv/
70-
env/
71-
bin/
72-
build/
73-
develop-eggs/
74-
dist/
75-
eggs/
76-
lib/
77-
lib64/
78-
parts/
79-
sdist/
80-
var/
81-
include/
82-
man/
83-
venv/
50+
# If you choose to install tools/torchci via pip install -e
8451
*.egg-info/
85-
.installed.cfg
86-
*.egg
87-
88-
!torchci/lib
89-
90-
# Installer logs
91-
pip-log.txt
92-
pip-delete-this-directory.txt
93-
pip-selfcheck.json
94-
95-
# Unit test / coverage reports
96-
htmlcov/
97-
.tox/
98-
.coverage
99-
.cache
100-
nosetests.xml
101-
coverage.xml
102-
103-
# Translations
104-
*.mo
105-
106-
# Mr Developer
107-
.mr.developer.cfg
108-
.project
109-
.pydevproject
110-
111-
# Rope
112-
.ropeproject
113-
114-
# Django stuff:
115-
*.log
116-
*.pot
117-
118-
.DS_Store
119-
120-
# Sphinx documentation
121-
docs/_build/
122-
123-
# PyCharm
124-
.idea/
125-
126-
# VSCode
127-
.vscode/
128-
129-
# Pyenv
130-
.python-version
13152

13253
/_logs
13354

13455
# log classifier data
135-
13656
aws/lambda/log-classifier/data/dataset/
13757

13858
# Generated file

.lintrunner.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,9 @@ code = 'RUSTFMT'
322322
include_patterns = ['**/*.rs']
323323
command = [
324324
'python',
325-
'tools/lintrunner/examples/rustfmt_linter.py',
325+
'tools/linter/adapters/rustfmt_linter.py',
326326
'--binary=rustfmt',
327-
'--config-path=tools/lintrunner/rustfmt.toml',
327+
'--config-path=tools/linter/adapters/rustfmt.toml',
328328
'--',
329329
'@{{PATHSFILE}}'
330330
]
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)