#
a58584a8 |
| 03-Oct-2024 |
Gabriel Marin |
checksrc: add check for spaces around logical AND operators Closes #15144
|
#
cfae354a |
| 26-Sep-2024 |
Viktor Szakats |
codespell: extend checks to more subdirs - fix issues found. - fix a few more found locally. Closes #15072
|
#
cff75acf |
| 20-Sep-2024 |
Gabriel Marin |
checksrc: Added checks for colon operator in ternary expressions Closes #14990
|
#
a4703dac |
| 19-Sep-2024 |
Gabriel Marin |
checksrc: fixed typo Closes #14968
|
#
e666a678 |
| 18-Sep-2024 |
Daniel Stenberg |
checksrc: check for spaces around '?', '>' and '<' Closes #14921
|
#
80df6a5c |
| 09-Sep-2024 |
Daniel Stenberg |
checksrc: add STRNCPY as an opt-in rule to detect and error on strncpy make "lib/.checksrc" enable it Closes #14830
|
#
23749bfd |
| 21-Aug-2024 |
Daniel Stenberg |
GHA: add a checksrc job This job unconditionally runs checksrc on ALL .c and .h files present in git. checksrc.pl: fixed to look for ".checksrc" in the same directory from w
GHA: add a checksrc job This job unconditionally runs checksrc on ALL .c and .h files present in git. checksrc.pl: fixed to look for ".checksrc" in the same directory from where it loads the file to check so that it an be invoked like this Closes #14625
show more ...
|
#
22cde3ba |
| 03-May-2024 |
Jay Satiro |
curl_multibyte: remove access() function wrapper for Windows - Remove curlx_win32_access() which was a wrapper to use access() in Windows. This is a follow-up to 602fc213, one
curl_multibyte: remove access() function wrapper for Windows - Remove curlx_win32_access() which was a wrapper to use access() in Windows. This is a follow-up to 602fc213, one of two commits which removed access() calls from the codebase and banned use of the function. Closes https://github.com/curl/curl/pull/13529
show more ...
|
#
602fc213 |
| 29-Apr-2024 |
Viktor Szakats |
libssh2: replace `access()` with `stat()` Prefer `stat()` to verify the presence of key files. This drops the last uses of `access()` in the codebase, which was reported to caus
libssh2: replace `access()` with `stat()` Prefer `stat()` to verify the presence of key files. This drops the last uses of `access()` in the codebase, which was reported to cause issues in some cases. Also add `access()` to the list of banned functions in checksrc. Ref: https://github.com/curl/curl/pull/13412#issuecomment-2065505415 Ref: https://github.com/curl/curl/pull/13482#issuecomment-2078980522 Ref: #13497 Co-authored-by: Jay Satiro Closes #13498
show more ...
|
#
10879379 |
| 10-Apr-2024 |
RainRat |
misc: fix typos Closes #13344
|
#
298c120b |
| 18-Feb-2024 |
Evgeny Grin (Karlson2k) |
checksrc.pl: fix handling .checksrc with CRLF - When parsing .checksrc chomp the (CR)LF line ending. Prior to this change on Windows checksrc.pl would not process the symbols in
checksrc.pl: fix handling .checksrc with CRLF - When parsing .checksrc chomp the (CR)LF line ending. Prior to this change on Windows checksrc.pl would not process the symbols in .checksrc properly, since many git repos in Windows use auto crlf to check out files with CRLF line endings. Closes https://github.com/curl/curl/pull/12924
show more ...
|
#
3c4fba8c |
| 04-Dec-2023 |
Daniel Stenberg |
checksrc.pl: support #line instructions makes it identify the correct source file and line
|
#
e9a7d4a1 |
| 21-Nov-2023 |
Viktor Szakats |
windows: use built-in `_WIN32` macro to detect Windows Windows compilers define `_WIN32` automatically. Windows SDK headers or build env defines `WIN32`, or we have to take care of it. T
windows: use built-in `_WIN32` macro to detect Windows Windows compilers define `_WIN32` automatically. Windows SDK headers or build env defines `WIN32`, or we have to take care of it. The agreement seems to be that `_WIN32` is the preferred practice here. Make the source code rely on that to detect we're building for Windows. Public `curl.h` was using `WIN32`, `__WIN32__` and `CURL_WIN32` for Windows detection, next to the official `_WIN32`. After this patch it only uses `_WIN32` for this. Also, make it stop defining `CURL_WIN32`. There is a slight chance these break compatibility with Windows compilers that fail to define `_WIN32`. I'm not aware of any obsolete or modern compiler affected, but in case there is one, one possible solution is to define this macro manually. grepping for `WIN32` remains useful to discover Windows-specific code. Also: - extend `checksrc` to ensure we're not using `WIN32` anymore. - apply minor formatting here and there. - delete unnecessary checks for `!MSDOS` when `_WIN32` is present. Co-authored-by: Jay Satiro Reviewed-by: Daniel Stenberg Closes #12376
show more ...
|
#
e5bb88b8 |
| 28-Sep-2023 |
Viktor Szakats |
tool: use our own stderr variable Earlier this year we changed our own stderr variable to use the standard name `stderr` (to avoid bugs where someone is using `stderr` instead of the
tool: use our own stderr variable Earlier this year we changed our own stderr variable to use the standard name `stderr` (to avoid bugs where someone is using `stderr` instead of the curl-tool specific variable). This solution needed to override the standard `stderr` symbol via the preprocessor. This in turn didn't play well with unity builds and caused curl tool to crash or stay silent due to an uninitialized stderr. This was a hard to find issue, fixed by manually breaking out one file from the unity sources. To avoid two these two tricks, this patch implements a different solution: Restore using our own local variable for our stderr output and leave `stderr` as-is. To avoid using `stderr` by mistake, add a `checksrc` rule (based on logic we already used in lib for `strerror`) that detects any `stderr` use in `src` and points to using our own variable instead: `tool_stderr`. Follow-up to 06133d3e9b8aeb9e9ca0b3370c246bdfbfc8619e Follow-up to 2f17a9b654121dd1ecf4fc043c6d08a9da3522db Closes #11958
show more ...
|
#
959e613e |
| 01-Aug-2023 |
Alexander Jaeger |
misc: fix various typos Closes #11561
|
#
b87e0921 |
| 13-Jul-2023 |
Daniel Stenberg |
checksrc: quote the file name to work with "funny" letters Closes #11437
|
#
7f669aa0 |
| 21-Jun-2023 |
Paul Wise |
checksrc: modernise perl file open Use regular variables and separate file open modes from filenames. Suggested by perlcritic Copied from https://github.com/curl/trurl/comm
checksrc: modernise perl file open Use regular variables and separate file open modes from filenames. Suggested by perlcritic Copied from https://github.com/curl/trurl/commit/f2784a9240f47ee28a845 Closes #11358
show more ...
|
#
f198d33e |
| 18-May-2023 |
Emanuele Torre |
checksrc: disallow spaces before labels Out of 415 labels throughout the code base, 86 of those labels were not at the start of the line. Which means labels always at the start of th
checksrc: disallow spaces before labels Out of 415 labels throughout the code base, 86 of those labels were not at the start of the line. Which means labels always at the start of the line is the favoured style overall with 329 instances. Out of the 86 labels not at the start of the line: * 75 were indented with the same indentation level of the following line * 8 were indented with exactly one space * 2 were indented with one fewer indentation level then the following line * 1 was indented with the indentation level of the following line minus three space (probably unintentional) Co-Authored-By: Viktor Szakats Closes #11134
show more ...
|
#
9ce7eee0 |
| 28-Apr-2023 |
Daniel Stenberg |
checksrc: find bad indentation in conditions without open brace If the previous line starts with if/while/for AND ends with a closed parenthesis and there's an equal number of open and c
checksrc: find bad indentation in conditions without open brace If the previous line starts with if/while/for AND ends with a closed parenthesis and there's an equal number of open and closed parentheses on that line, verify that this line is indented $indent more steps, if not a cpp line. Also adjust the fall-out from this fix. Closes #11054
show more ...
|
#
7f712399 |
| 27-Apr-2023 |
Emanuele Torre |
checksrc: check for spaces before the colon of switch labels Closes #11047
|
#
d567cca1 |
| 27-Apr-2023 |
Daniel Stenberg |
checksrc: fix SPACEBEFOREPAREN for conditions starting with "*" The open paren check wants to warn for spaces before open parenthesis for if/while/for but also for any function call. In
checksrc: fix SPACEBEFOREPAREN for conditions starting with "*" The open paren check wants to warn for spaces before open parenthesis for if/while/for but also for any function call. In order to avoid catching function pointer declarations, the logic allows a space if the first character after the open parenthesis is an asterisk. I also spotted what we did not include "switch" in the check but we should. This check is a little lame, but we reduce this problem by not allowing that space for if/while/for/switch. Reported-by: Emanuele Torre Closes #11044
show more ...
|
#
2bc1d775 |
| 02-Jan-2023 |
Daniel Stenberg |
copyright: update all copyright lines and remove year ranges - they are mostly pointless in all major jurisdictions - many big corporations and projects already don't use them - save
copyright: update all copyright lines and remove year ranges - they are mostly pointless in all major jurisdictions - many big corporations and projects already don't use them - saves us from pointless churn - git keeps history for us - the year range is kept in COPYING checksrc is updated to allow non-year using copyright statements Closes #10205
show more ...
|
#
52cc4a85 |
| 30-Oct-2022 |
Daniel Stenberg |
style: use space after comment start and before comment end /* like this */ /*not this*/ checksrc is updated accordingly Closes #9828
|
#
3678336b |
| 24-Oct-2022 |
Daniel Stenberg |
scripts/checksrc.pl: detect duplicated include files After an idea by Dan Fandrich in #9794 Closes #9796
|
#
ad9bc597 |
| 17-May-2022 |
max.mehl |
copyright: make repository REUSE compliant Add licensing and copyright information for all files in this repository. This either happens in the file itself as a comment header or in the
copyright: make repository REUSE compliant Add licensing and copyright information for all files in this repository. This either happens in the file itself as a comment header or in the file `.reuse/dep5`. This commit also adds a Github workflow to check pull requests and adapts copyright.pl to the changes. Closes #8869
show more ...
|