- Notifications
You must be signed in to change notification settings - Fork585
Qual: Add pre-commit configuration & ci#4494
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
4c1f3f3
to00b4a5b
CompareWell, first thanks for the PR. These PR are too big for us to accept. Some of the files you have tested are Thanks, à bientôt. |
Oui, j'ai une adresse en France. On peut désactiver des hooks (=hook-stage manual) et activer 1 par 1 chacun avec ses résulutions. Je peux écrire sur votre adresse (mél. git). |
a3fe160
to76d198d
CompareI think I understand what was meant now: this PR included some changes of the other PRs to check which changes were still recommended by the tools. This PR is now reduced to the pre-commit configuration. A limited list of the notices from the tools can be checked in the files tab. You need to go to the end of the contents to see some: |
8e22be0
to495ab61
Compare0487f7d
to42ec7f1
CompareI reorganized the commit to trigger anotherappveyor run. If still in error, then gcc's snprintf and MSVC's v19's snprintf are different. I must admit that I find the ElidedText function a bit odd.
IMHO, in these cases the code should always take 10 characters from the source string, and append the ' ... <>' string, always limiting to 40 characters. It is possible that that this code intended to manage another corner case: when 'truncate_value <30' in which case the string we append would not fit in the maximum line size. |
026ba54
to3baf613
Comparecpplint considers that the if condition does not have a code blockbecause of the empty line
The `cstdio` header is required for the `reset` method implementation.Remove virtual, already implied by override.
- Replace strcpy with snprintf for safer and more controlled string formatting
- Replace strcpy with snprintf to avoid buffer overflow- Add necessary includes for snprintf and make_pair
This change replaces the use of `strcpy` with `snprintf`
- Replace `strcpy` with `strncpy` to prevent buffer overflow
- Add cpplint hook to enforce coding standards- Update cpplint arguments to exclude specific files with hard to suppress warnings.
- Define `MAIN_MAX_ARGS_LENGTH` constant for buffer size- Use `MAIN_MAX_ARGS_LENGTH` for buffer size and length checks- Update error message for buffer size checkFixes:src/uncrustify.cpp:704: Do not use variable-length arrays. Use an appropriately named ('k' followed by CamelCase) compile-time constant for the size. [runtime/arrays] [1]src/uncrustify.cpp:834: Do not use variable-length arrays. Use an appropriately named ('k' followed by CamelCase) compile-time constant for the size. [runtime/arrays] [1]src/uncrustify.cpp:1663: If/else bodies with multiple statements require braces [readability/braces] [4]src/uncrustify.cpp:1665: If/else bodies with multiple statements require braces [readability/braces] [4]
The assignment operator for the Option class has been updated to use a const reference for the input parameter. This change ensures that the operator can accept both lvalue and rvalue references, improving flexibility and performance.Fixes:src/option.h(195): performance (passedByValue): Function parameter 'val' should be passed by const reference.
- Add new constructor for flags(int_t flag)- Simplify operator overloads to use direct return statementsFixes:src/pcf_flags.h(85): error (returnDanglingLifetime): Returning object that points to local variable 'f2' that will be invalid when returning.
mdeweerd commentedApr 29, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
These are the remaining notices with "Cppcheck 2.17.1"
The notice
is gone with that cppcheck version (I fixed it) and seems to be a false positive at this point in the github runner probably using a different cppcheck version. |
Qual: Add pre-commit configuration & ci
Add initial pre-commit configuration also run in ci.