OpenPCDet LiDar Object Detection Node #296
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Monorepo Code Linting - Auto Linter | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
types: | |
- unlabeled | |
- labeled | |
- synchronize | |
jobs: | |
run-linters: | |
name: Run C++/Python linters | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GHCR_PWD }} | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Install Python dependencies | |
run: pip install autopep8 clang-format | |
- name: Run linters, make changes | |
continue-on-error: true | |
uses: WATonomous/wato-lint-action@v1 | |
with: | |
auto_fix: ${{ contains(github.event.pull_request.labels.*.name, 'auto-lint') }} | |
Autopep8: true | |
Autopep8_args: "--max-line-length 100" | |
clang_format: true | |
clang_format_auto_fix: ${{ contains(github.event.pull_request.labels.*.name, 'auto-lint') }} | |
clang_format_args: "-style=file" | |
- name: Remove 'auto-lint' label to stop possible inf loop | |
if: contains(github.event.pull_request.labels.*.name, 'auto-lint') | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
await github.rest.issues.removeLabel({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: context.issue.number, | |
name: 'auto-lint' | |
}); |