Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create suggestions to autofix files #22115

Merged
merged 3 commits into from
Oct 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,38 @@ jobs:
category: lintrunner
checkout_path: ${{ github.workspace }}

auto-apply-fixes:
name: Suggest fixes
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
# Version range or exact version of Python to use, using SemVer's version range syntax. Reads from .python-version if unset.
python-version: "3.10"
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
- name: Install dependencies
run: |
python -m pip install -r requirements-dev.txt
python -m pip install lintrunner lintrunner-adapters
lintrunner init
- name: Run lintrunner on all files
run: |
set +e
lintrunner f --all-files -v
exit 0
- uses: parkerbxyz/suggest-changes@v1
with:
comment: 'You can commit the suggested changes from lintrunner.'

lint-cpp:
name: Optional Lint C++
runs-on: ubuntu-latest
Expand Down
Loading