Skip to content
Closed
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
2 changes: 2 additions & 0 deletions .github/e2e/target.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
action-ref=79dfaaef8e18815e923592c1d5098c7e0d25ecf6
clang-version=21
9 changes: 8 additions & 1 deletion src/demo.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/** This is a very ugly test code (doomed to fail linting) */
#include "demo.hpp"
#include <cstdio>
Expand All @@ -6,12 +6,19 @@
// using size_t from cstddef
size_t dummyFunc(size_t i) { return i; }

int scale(int value)

Check warning on line 9 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

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 / lint (ubuntu-latest)

src/demo.cpp:9:5 [misc-use-internal-linkage]

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

Check warning on line 9 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

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 / lint (ubuntu-latest)

src/demo.cpp:9:5 [misc-use-internal-linkage]

function 'scale' can be made static or moved into an anonymous namespace to enforce internal linkage
{
if (value > 0)

Check warning on line 11 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

src/demo.cpp:11:19 [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 / lint (ubuntu-latest)

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

statement should be inside braces
return value*3;
return 0;
}

int main()
{
for (;;)
break;

printf("Hello world!\n");
printf("Hello world! %d\n", scale( 14 ));

Check warning on line 21 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

src/demo.cpp:21:40 [cppcoreguidelines-avoid-magic-numbers]

14 is a magic number; consider replacing it with a named constant

Check warning on line 21 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

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

do not call c-style vararg functions

Check warning on line 21 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

src/demo.cpp:21:40 [cppcoreguidelines-avoid-magic-numbers]

14 is a magic number; consider replacing it with a named constant

Check warning on line 21 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

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

do not call c-style vararg functions

return 0;
}
Loading