Skip to content
Open
Show file tree
Hide file tree
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
174 changes: 174 additions & 0 deletions .github/workflows/v3-e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
name: v3.0.0-rc0 e2e (cpp-linter rc.25)

on:
push:
branches: [claude/project-thread-1yllzi]
pull_request:
branches: [master]

permissions:
contents: read

jobs:
# Cross-platform smoke test: v3.0.0-rc0 vs v2 on the same commit.
matrix:
if: github.event_name == 'push'
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest, windows-11-arm]
version: ['21']
action: [v3]
include:
- { os: ubuntu-latest, version: '12', action: v3 }
- { os: ubuntu-latest, version: '17', action: v3 }
- { os: ubuntu-latest, version: '23', action: v3 }
- { os: ubuntu-latest, version: '21', action: v2 }
- { os: macos-latest, version: '21', action: v2 }
- { os: windows-latest, version: '21', action: v2 }
# No database and no extra-args: the action passes empty path values.
- { os: ubuntu-latest, version: '21', action: v3-empty }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Generate compilation database
run: cmake -B build -S src -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- name: cpp-linter-action v3.0.0-rc0
if: matrix.action == 'v3'
id: v3
uses: cpp-linter/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
# Workaround: rc.25 rejects the empty value the action passes when unset.
summary-output-file: cpp-linter-summary-${{ github.job }}.md
style: file
files-changed-only: false
ignore: build
database: build
version: ${{ matrix.version }}
step-summary: true
extra-args: -std=c++14 -Wall
- name: cpp-linter-action v3.0.0-rc0, empty path inputs
if: matrix.action == 'v3-empty'
id: v3e
uses: cpp-linter/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
# Workaround: rc.25 rejects the empty value the action passes when unset.
summary-output-file: cpp-linter-summary-${{ github.job }}.md
style: file
files-changed-only: false
ignore: build
version: ${{ matrix.version }}
step-summary: true
- name: cpp-linter-action v2
if: matrix.action == 'v2'
id: v2
uses: cpp-linter/cpp-linter-action@v2
env:
GITHUB_TOKEN: ${{ github.token }}
with:
style: file
files-changed-only: false
ignore: build
database: build
version: ${{ matrix.version }}
step-summary: true
extra-args: -std=c++14 -Wall
- name: Outputs
shell: bash
run: |
echo "${{ matrix.action }} ${{ matrix.os }} clang ${{ matrix.version }}: total=${{ steps.v3.outputs.checks-failed }}${{ steps.v3e.outputs.checks-failed }}${{ steps.v2.outputs.checks-failed }} format=${{ steps.v3.outputs.clang-format-checks-failed }}${{ steps.v3e.outputs.clang-format-checks-failed }}${{ steps.v2.outputs.clang-format-checks-failed }} tidy=${{ steps.v3.outputs.clang-tidy-checks-failed }}${{ steps.v3e.outputs.clang-tidy-checks-failed }}${{ steps.v2.outputs.clang-tidy-checks-failed }}" | tee -a "$GITHUB_STEP_SUMMARY"

# Only the deprecated alias is set: a review is expected if the alias works.
pr-alias:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- run: cmake -B build -S src -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- uses: cpp-linter/[email protected]
id: linter
env:
GITHUB_TOKEN: ${{ github.token }}
with:
# Workaround: rc.25 rejects the empty value the action passes when unset.
summary-output-file: cpp-linter-summary-${{ github.job }}.md
style: file
lines-changed-only: true
ignore: build
database: build
tidy-review: true
file-annotations: false
extra-args: -std=c++14 -Wall
- run: echo "alias run done at $(date -u +%FT%TZ), checks-failed=${{ steps.linter.outputs.checks-failed }}" | tee -a "$GITHUB_STEP_SUMMARY"

pr-review:
needs: pr-alias
if: always() && github.event_name == 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- run: cmake -B build -S src -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- uses: cpp-linter/[email protected]
id: linter
env:
GITHUB_TOKEN: ${{ github.token }}
with:
# Workaround: rc.25 rejects the empty value the action passes when unset.
summary-output-file: cpp-linter-summary-${{ github.job }}.md
style: file
lines-changed-only: true
ignore: build
database: build
pr-review: true
thread-comments: update
step-summary: true
extra-args: -std=c++14 -Wall
- name: Summary output file
run: test -s cpp-linter-summary-pr-review.md && head -20 cpp-linter-summary-pr-review.md
- run: echo "pr-review done at $(date -u +%FT%TZ), checks-failed=${{ steps.linter.outputs.checks-failed }}" | tee -a "$GITHUB_STEP_SUMMARY"

# Runs after the review jobs so a pushed fix cannot move their diff mid-run.
auto-fix:
needs: pr-review
if: always() && github.event_name == 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v7
- run: cmake -B build -S src -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- uses: cpp-linter/[email protected]
id: linter
env:
GITHUB_TOKEN: ${{ github.token }}
with:
# Workaround: rc.25 rejects the empty value the action passes when unset.
summary-output-file: cpp-linter-summary-${{ github.job }}.md
style: file
lines-changed-only: true
ignore: build
database: build
auto-fix: true
file-annotations: false
extra-args: -std=c++14 -Wall
- name: State after auto-fix
run: |
git log --oneline -3
git status --short
ls -la .cpp-linter-cache || true
2 changes: 2 additions & 0 deletions src/demo.cpp
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
/** This is a very ugly test code (doomed to fail linting) */
#include "demo.hpp"

Check warning on line 2 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 17, v3)

src/demo.cpp:2:1 [misc-include-cleaner]

included header demo.hpp is not used directly

Check warning on line 2 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-latest, 21, v2)

src/demo.cpp:2:1 [misc-include-cleaner]

included header demo.hpp is not used directly

Check warning on line 2 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-latest, 21, v3)

src/demo.cpp:2:1 [misc-include-cleaner]

included header demo.hpp is not used directly

Check warning on line 2 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-11-arm, 21, v3)

src/demo.cpp:2:1 [misc-include-cleaner]

included header demo.hpp is not used directly
#include <cstdio>

Check failure on line 3 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (macos-latest, 21, v3)

src/demo.cpp:3:10 [clang-diagnostic-error]

'cstdio' file not found

Check failure on line 3 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (macos-latest, 21, v2)

src/demo.cpp:3:10 [clang-diagnostic-error]

'cstdio' file not found
#include <cstddef>

// using size_t from cstddef
size_t dummyFunc(size_t i) { return i; }

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 17, v3)

src/demo.cpp:7:25 [readability-identifier-length]

parameter name 'i' is too short, expected at least 3 characters

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 17, v3)

src/demo.cpp:7:8 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 21, v3)

src/demo.cpp:7:25 [readability-identifier-length]

parameter name 'i' is too short, expected at least 3 characters

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 21, v3)

src/demo.cpp:7:8 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 21, v3)

src/demo.cpp:7:8 [misc-use-internal-linkage]

function 'dummyFunc' can be made static or moved into an anonymous namespace to enforce internal linkage

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 21, v2)

src/demo.cpp:7:25 [readability-identifier-length]

parameter name 'i' is too short, expected at least 3 characters

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 21, v2)

src/demo.cpp:7:8 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 21, v2)

src/demo.cpp:7:8 [misc-use-internal-linkage]

function 'dummyFunc' can be made static or moved into an anonymous namespace to enforce internal linkage

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (macos-latest, 21, v3)

src/demo.cpp:7:25 [readability-identifier-length]

parameter name 'i' is too short, expected at least 3 characters

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (macos-latest, 21, v3)

src/demo.cpp:7:8 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (macos-latest, 21, v3)

src/demo.cpp:7:8 [misc-use-internal-linkage]

function 'dummyFunc' can be made static or moved into an anonymous namespace to enforce internal linkage

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-latest, 21, v2)

src/demo.cpp:7:25 [readability-identifier-length]

parameter name 'i' is too short, expected at least 3 characters

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-latest, 21, v2)

src/demo.cpp:7:8 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-latest, 21, v2)

src/demo.cpp:7:8 [misc-use-internal-linkage]

function 'dummyFunc' can be made static or moved into an anonymous namespace to enforce internal linkage

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 12, v3)

src/demo.cpp:7:8 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-24.04-arm, 21, v3)

src/demo.cpp:7:25 [readability-identifier-length]

parameter name 'i' is too short, expected at least 3 characters

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-24.04-arm, 21, v3)

src/demo.cpp:7:8 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-24.04-arm, 21, v3)

src/demo.cpp:7:8 [misc-use-internal-linkage]

function 'dummyFunc' can be made static or moved into an anonymous namespace to enforce internal linkage

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 23, v3)

src/demo.cpp:7:25 [readability-identifier-length]

parameter name 'i' is too short, expected at least 3 characters

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 23, v3)

src/demo.cpp:7:8 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 23, v3)

src/demo.cpp:7:8 [misc-use-internal-linkage]

function 'dummyFunc' can be made static or moved into an anonymous namespace to enforce internal linkage

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-latest, 21, v3)

src/demo.cpp:7:25 [readability-identifier-length]

parameter name 'i' is too short, expected at least 3 characters

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-latest, 21, v3)

src/demo.cpp:7:8 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-latest, 21, v3)

src/demo.cpp:7:8 [misc-use-internal-linkage]

function 'dummyFunc' can be made static or moved into an anonymous namespace to enforce internal linkage

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-11-arm, 21, v3)

src/demo.cpp:7:25 [readability-identifier-length]

parameter name 'i' is too short, expected at least 3 characters

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-11-arm, 21, v3)

src/demo.cpp:7:8 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-11-arm, 21, v3)

src/demo.cpp:7:8 [misc-use-internal-linkage]

function 'dummyFunc' can be made static or moved into an anonymous namespace to enforce internal linkage

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (macos-latest, 21, v2)

src/demo.cpp:7:25 [readability-identifier-length]

parameter name 'i' is too short, expected at least 3 characters

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (macos-latest, 21, v2)

src/demo.cpp:7:8 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 7 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (macos-latest, 21, v2)

src/demo.cpp:7:8 [misc-use-internal-linkage]

function 'dummyFunc' can be made static or moved into an anonymous namespace to enforce internal linkage

int main()

Check warning on line 9 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 17, v3)

src/demo.cpp:9:5 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 9 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 21, v3)

src/demo.cpp:9:5 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 9 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 21, v2)

src/demo.cpp:9:5 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 9 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (macos-latest, 21, v3)

src/demo.cpp:9:5 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 9 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-latest, 21, v2)

src/demo.cpp:9:5 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 9 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 12, v3)

src/demo.cpp:9:5 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 9 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-24.04-arm, 21, v3)

src/demo.cpp:9:5 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 9 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 23, v3)

src/demo.cpp:9:5 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 9 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-latest, 21, v3)

src/demo.cpp:9:5 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 9 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-11-arm, 21, v3)

src/demo.cpp:9:5 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 9 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (macos-latest, 21, v2)

src/demo.cpp:9:5 [modernize-use-trailing-return-type]

use a trailing return type for this function
{
for (;;)

Check warning on line 11 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 17, v3)

src/demo.cpp:11:13 [readability-braces-around-statements]

statement should be inside braces

Check warning on line 11 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 21, v3)

src/demo.cpp:11:13 [readability-braces-around-statements]

statement should be inside braces

Check warning on line 11 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 21, v2)

src/demo.cpp:11:13 [readability-braces-around-statements]

statement should be inside braces

Check warning on line 11 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (macos-latest, 21, v3)

src/demo.cpp:11:13 [readability-braces-around-statements]

statement should be inside braces

Check warning on line 11 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-latest, 21, v2)

src/demo.cpp:11:13 [readability-braces-around-statements]

statement should be inside braces

Check warning on line 11 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 12, v3)

src/demo.cpp:11:13 [readability-braces-around-statements]

statement should be inside braces

Check warning on line 11 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-24.04-arm, 21, v3)

src/demo.cpp:11:13 [readability-braces-around-statements]

statement should be inside braces

Check warning on line 11 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 23, v3)

src/demo.cpp:11:13 [readability-braces-around-statements]

statement should be inside braces

Check warning on line 11 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-latest, 21, v3)

src/demo.cpp:11:13 [readability-braces-around-statements]

statement should be inside braces

Check warning on line 11 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-11-arm, 21, v3)

src/demo.cpp:11:13 [readability-braces-around-statements]

statement should be inside braces

Check warning on line 11 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (macos-latest, 21, v2)

src/demo.cpp:11:13 [readability-braces-around-statements]

statement should be inside braces
break;

printf("Hello world!\n");

Check warning on line 14 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 17, v3)

src/demo.cpp:14:5 [cppcoreguidelines-pro-type-vararg]

do not call c-style vararg functions

Check warning on line 14 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 21, v3)

src/demo.cpp:14:5 [cppcoreguidelines-pro-type-vararg]

do not call c-style vararg functions

Check warning on line 14 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 21, v2)

src/demo.cpp:14:5 [cppcoreguidelines-pro-type-vararg]

do not call c-style vararg functions

Check warning on line 14 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-latest, 21, v2)

src/demo.cpp:14:5 [cppcoreguidelines-pro-type-vararg]

do not call c-style vararg functions

Check warning on line 14 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 12, v3)

src/demo.cpp:14:5 [cppcoreguidelines-pro-type-vararg]

do not call c-style vararg functions

Check warning on line 14 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-24.04-arm, 21, v3)

src/demo.cpp:14:5 [cppcoreguidelines-pro-type-vararg]

do not call c-style vararg functions

Check warning on line 14 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 23, v3)

src/demo.cpp:14:5 [cppcoreguidelines-pro-type-vararg]

do not call c-style vararg functions

Check warning on line 14 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-latest, 21, v3)

src/demo.cpp:14:5 [cppcoreguidelines-pro-type-vararg]

do not call c-style vararg functions

Check warning on line 14 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-11-arm, 21, v3)

src/demo.cpp:14:5 [cppcoreguidelines-pro-type-vararg]

do not call c-style vararg functions

return 0;
}

int addedForV3Test(int x){return x*2;}

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 17, v3)

src/demo.cpp:19:25 [readability-identifier-length]

parameter name 'x' is too short, expected at least 3 characters

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 17, v3)

src/demo.cpp:19:6 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 21, v3)

src/demo.cpp:19:25 [readability-identifier-length]

parameter name 'x' is too short, expected at least 3 characters

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 21, v3)

src/demo.cpp:19:6 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 21, v3)

src/demo.cpp:19:6 [misc-use-internal-linkage]

function 'addedForV3Test' can be made static or moved into an anonymous namespace to enforce internal linkage

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 21, v2)

src/demo.cpp:19:25 [readability-identifier-length]

parameter name 'x' is too short, expected at least 3 characters

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 21, v2)

src/demo.cpp:19:6 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 21, v2)

src/demo.cpp:19:6 [misc-use-internal-linkage]

function 'addedForV3Test' can be made static or moved into an anonymous namespace to enforce internal linkage

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (macos-latest, 21, v3)

src/demo.cpp:19:25 [readability-identifier-length]

parameter name 'x' is too short, expected at least 3 characters

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (macos-latest, 21, v3)

src/demo.cpp:19:6 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (macos-latest, 21, v3)

src/demo.cpp:19:6 [misc-use-internal-linkage]

function 'addedForV3Test' can be made static or moved into an anonymous namespace to enforce internal linkage

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-latest, 21, v2)

src/demo.cpp:19:25 [readability-identifier-length]

parameter name 'x' is too short, expected at least 3 characters

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-latest, 21, v2)

src/demo.cpp:19:6 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-latest, 21, v2)

src/demo.cpp:19:6 [misc-use-internal-linkage]

function 'addedForV3Test' can be made static or moved into an anonymous namespace to enforce internal linkage

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 12, v3)

src/demo.cpp:19:6 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-24.04-arm, 21, v3)

src/demo.cpp:19:25 [readability-identifier-length]

parameter name 'x' is too short, expected at least 3 characters

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-24.04-arm, 21, v3)

src/demo.cpp:19:6 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-24.04-arm, 21, v3)

src/demo.cpp:19:6 [misc-use-internal-linkage]

function 'addedForV3Test' can be made static or moved into an anonymous namespace to enforce internal linkage

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 23, v3)

src/demo.cpp:19:25 [readability-identifier-length]

parameter name 'x' is too short, expected at least 3 characters

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 23, v3)

src/demo.cpp:19:6 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (ubuntu-latest, 23, v3)

src/demo.cpp:19:6 [misc-use-internal-linkage]

function 'addedForV3Test' can be made static or moved into an anonymous namespace to enforce internal linkage

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-latest, 21, v3)

src/demo.cpp:19:25 [readability-identifier-length]

parameter name 'x' is too short, expected at least 3 characters

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-latest, 21, v3)

src/demo.cpp:19:6 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-latest, 21, v3)

src/demo.cpp:19:6 [misc-use-internal-linkage]

function 'addedForV3Test' can be made static or moved into an anonymous namespace to enforce internal linkage

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / pr-review

src/demo.cpp:19:25 [readability-identifier-length]

parameter name 'x' is too short, expected at least 3 characters

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / pr-review

src/demo.cpp:19:6 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / pr-review

src/demo.cpp:19:6 [misc-use-internal-linkage]

function 'addedForV3Test' can be made static or moved into an anonymous namespace to enforce internal linkage

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-11-arm, 21, v3)

src/demo.cpp:19:25 [readability-identifier-length]

parameter name 'x' is too short, expected at least 3 characters

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-11-arm, 21, v3)

src/demo.cpp:19:6 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (windows-11-arm, 21, v3)

src/demo.cpp:19:6 [misc-use-internal-linkage]

function 'addedForV3Test' can be made static or moved into an anonymous namespace to enforce internal linkage

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (macos-latest, 21, v2)

src/demo.cpp:19:25 [readability-identifier-length]

parameter name 'x' is too short, expected at least 3 characters

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (macos-latest, 21, v2)

src/demo.cpp:19:6 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 19 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / matrix (macos-latest, 21, v2)

src/demo.cpp:19:6 [misc-use-internal-linkage]

function 'addedForV3Test' can be made static or moved into an anonymous namespace to enforce internal linkage

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic(s)

Suggested change
int addedForV3Test(int x){return x*2;}
static auto addedForV3Test(int x) -> int { return x * 2; }

clang-tidy diagnostic

src/demo.cpp:19:25 warning: [readability-identifier-length]

parameter name 'x' is too short, expected at least 3 characters

   19 | int  addedForV3Test(int x){return x*2;}
      |                         ^

Loading