Skip to content

Commit

Permalink
prepare to test branch
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Jan 6, 2024
1 parent 1202cbe commit ab58348
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 22 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/cpp-lint-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
clang-version: ['7', '8', '9','10', '11', '12', '13', '14', '15', '16', '17']
clang-version: ['10', '11', '12', '13', '14', '15', '16', '17']
repo: ['cpp-linter/cpp-linter']
branch: ['${{ inputs.branch }}']
fail-fast: false
Expand Down Expand Up @@ -62,10 +62,11 @@ jobs:
-i=build
-p=build
-V=${{ runner.temp }}/llvm
-f=false
--extra-arg="-std=c++14 -Wall"
--thread-comments=${{ matrix.clang-version == '12' }}
-a=${{ matrix.clang-version == '12' }}
--file-annotations=${{ matrix.clang-version == '16' }}
--thread-comments=${{ matrix.clang-version == '16' }}
--tidy-review=${{ matrix.clang-version == '16' }}
--format-review=${{ matrix.clang-version == '16' }}
- name: Fail fast?!
if: steps.linter.outputs.checks-failed > 0
Expand Down
21 changes: 11 additions & 10 deletions src/demo.cpp
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
/** This is a very ugly test code (doomed to fail linting) */

Check notice on line 1 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter (16, cpp-linter/cpp-linter, pr-review-suggestions)

Run clang-format on src/demo.cpp

File src/demo.cpp does not conform to Custom style guidelines. (lines 3, 8, 10, 13, 18)

Check notice on line 1 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter (16, cpp-linter/cpp-linter, pr-review-suggestions)

Run clang-format on src/demo.cpp

File src/demo.cpp does not conform to Custom style guidelines. (lines 3, 8, 10, 13, 18)
#include "demo.hpp"
#include <cstdio>
#include <cstddef>
#include <stdio.h>

Check warning on line 3 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter (16, cpp-linter/cpp-linter, pr-review-suggestions)

src/demo.cpp:3:10 [modernize-deprecated-headers]

inclusion of deprecated C++ header 'stdio.h'; consider using 'cstdio' instead -- see [modernize-deprecated-headers](https://clang.llvm.org/extra/clang-tidy/checks/modernize/deprecated-headers.html)

Check warning on line 3 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter (16, cpp-linter/cpp-linter, pr-review-suggestions)

src/demo.cpp:3:10 [modernize-deprecated-headers]

inclusion of deprecated C++ header 'stdio.h'; consider using 'cstdio' instead

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

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


int main(){

Check warning on line 8 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter (16, cpp-linter/cpp-linter, pr-review-suggestions)

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

use a trailing return type for this function -- see [modernize-use-trailing-return-type](https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-trailing-return-type.html)

Check warning on line 8 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter (16, cpp-linter/cpp-linter, pr-review-suggestions)

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

use a trailing return type for this function

for (;;) break;

Check warning on line 10 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter (16, cpp-linter/cpp-linter, pr-review-suggestions)

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

statement should be inside braces -- see [readability-braces-around-statements](https://clang.llvm.org/extra/clang-tidy/checks/readability/braces-around-statements.html)

Check warning on line 10 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter (16, cpp-linter/cpp-linter, pr-review-suggestions)

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

statement should be inside braces


printf("Hello world!\n");

Check warning on line 13 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter (16, cpp-linter/cpp-linter, pr-review-suggestions)

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

do not call c-style vararg functions -- see [cppcoreguidelines-pro-type-vararg](https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/pro-type-vararg.html)

Check warning on line 13 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter (16, cpp-linter/cpp-linter, pr-review-suggestions)

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

do not call c-style vararg functions

return 0;
}



return 0;}
11 changes: 3 additions & 8 deletions src/demo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
class Dummy {
char* useless;

Check warning on line 6 in src/demo.hpp

View workflow job for this annotation

GitHub Actions / cpp-linter (16, cpp-linter/cpp-linter, pr-review-suggestions)

src/demo.hpp:6:11 [modernize-use-default-member-init]

use default member initializer for 'useless' -- see [modernize-use-default-member-init](https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-default-member-init.html)

Check warning on line 6 in src/demo.hpp

View workflow job for this annotation

GitHub Actions / cpp-linter (16, cpp-linter/cpp-linter, pr-review-suggestions)

src/demo.hpp:6:11 [modernize-use-default-member-init]

use default member initializer for 'useless'
int numb;

Check warning on line 7 in src/demo.hpp

View workflow job for this annotation

GitHub Actions / cpp-linter (16, cpp-linter/cpp-linter, pr-review-suggestions)

src/demo.hpp:7:9 [modernize-use-default-member-init]

use default member initializer for 'numb' -- see [modernize-use-default-member-init](https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-default-member-init.html)

Check warning on line 7 in src/demo.hpp

View workflow job for this annotation

GitHub Actions / cpp-linter (16, cpp-linter/cpp-linter, pr-review-suggestions)

src/demo.hpp:7:9 [modernize-use-default-member-init]

use default member initializer for 'numb'
Dummy() :numb(0), useless("\0"){}

public:
void *not_usefull(char *str){
useless = str;
return 0;
}
void *not_useful(char *str){useless = str;}

Check warning on line 11 in src/demo.hpp

View workflow job for this annotation

GitHub Actions / cpp-linter (16, cpp-linter/cpp-linter, pr-review-suggestions)

src/demo.hpp:11:11 [modernize-use-trailing-return-type]

use a trailing return type for this function -- see [modernize-use-trailing-return-type](https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-trailing-return-type.html)

Check warning on line 11 in src/demo.hpp

View workflow job for this annotation

GitHub Actions / cpp-linter (16, cpp-linter/cpp-linter, pr-review-suggestions)

src/demo.hpp:11:11 [modernize-use-trailing-return-type]

use a trailing return type for this function
};


Expand All @@ -28,14 +26,11 @@ class Dummy {









struct LongDiff
{

long diff;

};

1 comment on commit ab58348

@github-actions
Copy link

Choose a reason for hiding this comment

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

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-format reports: 2 file(s) not formatted
  • src/demo.cpp
  • src/demo.hpp
clang-tidy reports: 7 concern(s)

Have any feedback or feature suggestions? Share it here.

Please sign in to comment.