Skip to content

Commit

Permalink
Remove lintrunner source code (#5754)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
clee2000 authored Oct 14, 2024
1 parent 38d9358 commit 701c772
Show file tree
Hide file tree
Showing 64 changed files with 7 additions and 5,940 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}

- name: Install Lintrunner
run: |
pushd tools/lintrunner
pip install .
popd
pip install lintrunner==0.12.5
lintrunner init
- name: Run lintrunner on all files - Linux
run: |
set +e
Expand All @@ -45,7 +45,7 @@ jobs:
- name: Produce SARIF
if: always() && matrix.os == 'ubuntu-latest'
run: |
python tools/lintrunner/tools/convert_to_sarif.py --input lint.json --output lintrunner.sarif
python tools/linter/convert_to_sarif.py --input lint.json --output lintrunner.sarif
- name: Upload SARIF file
if: always() && matrix.os == 'ubuntu-latest'
continue-on-error: true
Expand Down
126 changes: 0 additions & 126 deletions .github/workflows/lintrunner_ci.yml

This file was deleted.

82 changes: 1 addition & 81 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,99 +40,19 @@ setup-ssh/lib/
setup-ssh/__tests__/runner/

**/revert_file_name.txt
# Generated by Cargo
# will have compiled files and executables
tools/lintrunner/target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

# Ignore new insta snapshots
tests/snapshots/*.new


# Generated by Maturin
# Byte-compiled / optimized / DLL files
__pycache__/
.pytest_cache/
*.py[cod]

# C extensions
*.so

# Distribution / packaging
.Python
.venv/
env/
bin/
build/
develop-eggs/
dist/
eggs/
lib/
lib64/
parts/
sdist/
var/
include/
man/
venv/
# If you choose to install tools/torchci via pip install -e
*.egg-info/
.installed.cfg
*.egg

!torchci/lib

# Installer logs
pip-log.txt
pip-delete-this-directory.txt
pip-selfcheck.json

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.cache
nosetests.xml
coverage.xml

# Translations
*.mo

# Mr Developer
.mr.developer.cfg
.project
.pydevproject

# Rope
.ropeproject

# Django stuff:
*.log
*.pot

.DS_Store

# Sphinx documentation
docs/_build/

# PyCharm
.idea/

# VSCode
.vscode/

# Pyenv
.python-version

/_logs

# log classifier data

aws/lambda/log-classifier/data/dataset/

# Generated file
Expand Down
4 changes: 2 additions & 2 deletions .lintrunner.toml
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,9 @@ code = 'RUSTFMT'
include_patterns = ['**/*.rs']
command = [
'python',
'tools/lintrunner/examples/rustfmt_linter.py',
'tools/linter/adapters/rustfmt_linter.py',
'--binary=rustfmt',
'--config-path=tools/lintrunner/rustfmt.toml',
'--config-path=tools/linter/adapters/rustfmt.toml',
'--',
'@{{PATHSFILE}}'
]
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 701c772

Please sign in to comment.