Skip to content

Commit

Permalink
make source changes
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Dec 12, 2024
1 parent d6831a0 commit 01e2ebf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
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 (17, cpp-linter/cpp-linter, fix-test-coverage)

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 (17, cpp-linter/cpp-linter, fix-test-coverage)

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"

Check warning on line 2 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter (17, cpp-linter/cpp-linter, fix-test-coverage)

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 / cpp-linter (17, cpp-linter/cpp-linter, fix-test-coverage)

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

included header demo.hpp is not used directly
#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 (17, cpp-linter/cpp-linter, fix-test-coverage)

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

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

Check warning on line 3 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter (17, cpp-linter/cpp-linter, fix-test-coverage)

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 (17, cpp-linter/cpp-linter, fix-test-coverage)

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

use a trailing return type for this function

Check warning on line 8 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter (17, cpp-linter/cpp-linter, fix-test-coverage)

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 (17, cpp-linter/cpp-linter, fix-test-coverage)

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

statement should be inside braces

Check warning on line 10 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter (17, cpp-linter/cpp-linter, fix-test-coverage)

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 (17, cpp-linter/cpp-linter, fix-test-coverage)

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

do not call c-style vararg functions

Check warning on line 13 in src/demo.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter (17, cpp-linter/cpp-linter, fix-test-coverage)

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;
int 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 (17, cpp-linter/cpp-linter, fix-test-coverage)

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

use a trailing return type for this function

Check warning on line 11 in src/demo.hpp

View workflow job for this annotation

GitHub Actions / cpp-linter (17, cpp-linter/cpp-linter, fix-test-coverage)

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;

};

0 comments on commit 01e2ebf

Please sign in to comment.