Skip to content

Commit

Permalink
testing auto-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Edwardius committed Feb 6, 2024
1 parent 6e6da41 commit 3252c7f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 3 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/linting_auto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Automatic Monorepo Code Linting

on:
push:
branches:
- main
pull_request:
types:
- labeled

jobs:
run-linters:
name: Run C++/Python linters
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v4

- 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
uses: wearerequired/lint-action@v2
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') }}
commit: false
clang_format_args: "-style=file"
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ on:
pull_request:
branches:
- main
pull_request_target:
types: [labeled, unlabeled]

jobs:
run-linters:
Expand All @@ -30,7 +28,6 @@ jobs:
- name: Run linters
uses: wearerequired/lint-action@v2
with:
auto_fix: ${{ contains(github.event.pull_request.labels.*.name, 'auto-lint') }}
Autopep8: true
Autopep8_args: "--max-line-length 100"
clang_format: true
Expand Down

0 comments on commit 3252c7f

Please sign in to comment.