Repository navigation
[DO NOT MERGE] test cpp-linter-action#501 (cpp-linter 1.15.0) #64
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
Changes from all commits
ba8836a
f25c493
1b8ba77
9171b88
4ac7e80
83a64e3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| # Temporary: end-to-end check of cpp-linter/cpp-linter-action#501 | ||
| # (cpp-linter 1.14.1 -> 1.15.0). Remove after the test. | ||
| name: test action#501 | ||
|
|
||
| on: | ||
| push: | ||
| branches: [claude/project-thread-c0ojvi] | ||
| pull_request: | ||
| branches: [master] | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| candidate: | ||
| name: "#501 ${{ matrix.os }}" | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest, windows-11-arm] | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Generate compilation database | ||
| run: cmake -Bbuild src | ||
| - name: Run cpp-linter-action at #501 head | ||
| uses: cpp-linter/cpp-linter-action@73198305cd5302ac662f2c2d8643fc1b1d7faa91 | ||
| id: linter | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| style: file | ||
| version: '20' | ||
| ignore: build | ||
| database: build | ||
| verbosity: debug | ||
| extra-args: -std=c++14 -Wall | ||
| files-changed-only: ${{ github.event_name == 'pull_request' }} | ||
| step-summary: true | ||
| file-annotations: true | ||
| thread-comments: ${{ matrix.os == 'ubuntu-latest' && 'update' || 'false' }} | ||
| tidy-review: ${{ matrix.os == 'ubuntu-latest' && github.event_name == 'pull_request' }} | ||
| format-review: ${{ matrix.os == 'ubuntu-latest' && github.event_name == 'pull_request' }} | ||
| - name: Outputs | ||
| shell: bash | ||
| run: | | ||
| echo "total: ${{ steps.linter.outputs.checks-failed }}" | ||
| echo "clang-format: ${{ steps.linter.outputs.clang-format-checks-failed }}" | ||
| echo "clang-tidy: ${{ steps.linter.outputs.clang-tidy-checks-failed }}" | ||
|
|
||
| baseline: | ||
| name: "main ${{ matrix.os }}" | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest, windows-11-arm] | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Generate compilation database | ||
| run: cmake -Bbuild src | ||
| - name: Run cpp-linter-action at main (cpp-linter 1.14.1) | ||
| uses: cpp-linter/cpp-linter-action@67c436ebf4900ba3f8240bc69c7d7740d99d293e | ||
| id: linter | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| style: file | ||
| version: '20' | ||
| ignore: build | ||
| database: build | ||
| verbosity: debug | ||
| extra-args: -std=c++14 -Wall | ||
| files-changed-only: ${{ github.event_name == 'pull_request' }} | ||
| step-summary: true | ||
| file-annotations: false | ||
| thread-comments: false | ||
| - name: Outputs | ||
| shell: bash | ||
| run: | | ||
| echo "total: ${{ steps.linter.outputs.checks-failed }}" | ||
| echo "clang-format: ${{ steps.linter.outputs.clang-format-checks-failed }}" | ||
| echo "clang-tidy: ${{ steps.linter.outputs.clang-tidy-checks-failed }}" | ||
|
|
||
| auto-fix: | ||
| name: "#501 auto-fix" | ||
| if: always() && github.event_name == 'pull_request' | ||
| # run after the review job so the pushed fix does not change the PR diff mid-review | ||
| needs: candidate | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| with: | ||
| ref: ${{ github.head_ref }} | ||
| - name: Run cpp-linter-action at #501 head with auto-fix | ||
| uses: cpp-linter/cpp-linter-action@73198305cd5302ac662f2c2d8643fc1b1d7faa91 | ||
| id: linter | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| style: file | ||
| version: '20' | ||
| tidy-checks: '-*' | ||
| files-changed-only: true | ||
| thread-comments: false | ||
| step-summary: true | ||
| auto-fix: true |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,7 +1,7 @@ | ||||||||||
| /** This is a very ugly test code (doomed to fail linting) */ | ||||||||||
| #include "demo.hpp" | ||||||||||
| #include <cstdio> | ||||||||||
| #include <cstddef> | ||||||||||
| #include <cstdio> | ||||||||||
|
github-actions[bot] marked this conversation as resolved.
|
||||||||||
|
|
||||||||||
| // using size_t from cstddef | ||||||||||
| size_t dummyFunc(size_t i) { return i; } | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. clang-tidy diagnostics
Suggested change
|
||||||||||
|
|
@@ -15,3 +15,15 @@ int main() | |||||||||
|
|
||||||||||
| return 0; | ||||||||||
| } | ||||||||||
|
|
||||||||||
| // added to test cpp-linter-action#501 (temporary) | ||||||||||
| int addNumbers(int a, int b) | ||||||||||
|
github-actions[bot] marked this conversation as resolved.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. clang-tidy diagnostics
Suggested change
clang-tidy diagnosticsrc/demo.cpp:20:20: warning: [readability-identifier-length]
20 | int addNumbers(int a, int b)
| ^clang-tidy diagnosticsrc/demo.cpp:20:27: warning: [readability-identifier-length]
20 | int addNumbers(int a, int b)
| ^ |
||||||||||
| { | ||||||||||
| int* unused = NULL; | ||||||||||
|
github-actions[bot] marked this conversation as resolved.
|
||||||||||
| if (a > b) | ||||||||||
|
github-actions[bot] marked this conversation as resolved.
Comment on lines
+22
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. clang-tidy diagnostics
Suggested change
|
||||||||||
| return a + b; | ||||||||||
| return b + a; | ||||||||||
| } | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. clang-tidy suggestion
Suggested change
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Uhm, what? The indentation seems correct before the suggestion |
||||||||||
|
|
||||||||||
| // second round (temporary) | ||||||||||
| int subtract(int x, int y) { return x - y; } | ||||||||||
Uh oh!
There was an error while loading. Please reload this page.