Commit Graph

10 Commits

Author SHA1 Message Date
Viktor Szakats
7b96563a05
spacecheck.pl: fix to check 3+ newlines in all files
Follow-up to e52e6dac8e #20269

Closes #21237
2026-04-06 04:05:58 +02:00
Viktor Szakats
afa71f1a22
spacecheck: verify filename lengths and characters
Maximum filename length 64, of which 48 maximum for the filename part.
Allowed characters: `A-Za-z0-9/._-`.

Also:
- rename a file to pass the check.
- init max constants outside the loop.
- minor fix to an error message.
  Follow-up to 62d77b12fc #21087

Closes #21095
2026-03-25 18:56:40 +01:00
Viktor Szakats
62d77b12fc
spacecheck: check long lines and repeat spaces, fix fallouts
Verify if lines are not longer than 192 characters. Also verify if lines
have less than 79 repeat spaces (and fix one fallout).

To improve readability by avoiding long lines and to prevent adding
overly long lines with text that may go unnoticed in an editor or diff
viewer.

In addition to pre-existing line length limits: 79 for C, 132 for CMake
sources.

Also:
- spacecheck: fix/harden allowlist regexes.
- spacecheck: tidy-up quotes and simplify escaping.
- spacecheck: allow folding strings with repeat spaces.
- GHA: fix a suppressed shellcheck warning.
- GHA/macos: simplify by dropping brew bundle.
- test1119.pl: precompile a regex.
- FAQ.md: delete very long link to a Windows 7/2008 support article
  that's lost it relevance.

Closes #21087
2026-03-25 11:02:08 +01:00
Viktor Szakats
51f813308e
scripts: harden / tidy up more Perl system() calls
Closes #21007
2026-03-19 14:26:56 +01:00
Viktor Szakats
d4a06862cb
spacecheck: find double newlines in tests/data/test*
Closes #20872
2026-03-10 17:44:15 +01:00
Viktor Szakats
af78b199b2
tidy-up: miscellaneous
- vms/curlmsg_vms.h: delete unused/commented code.
- vtls/schannel_verify: sort includes.
- typecheck-gcc.h: fix indent and alignment.
- lib/config-win32.h: drop idle `#undef`.
- spacecheck: check for stray empty lines before after curly braces.
- make literals more readable: 1048576 -> 1024 * 1024
- scope variables.
- use ISO date in a comment.
- drop redundant parentheses.
- drop empty comments.
- unfold lines.
- duplicate/stray spaces in comments.
- fix indent, whitespace, minor typos.

Closes #20690
2026-02-25 14:44:56 +01:00
Viktor Szakats
453470fab1
spacecheck: double spaces in folded strings, fix fallouts
Closes #20695
2026-02-24 00:48:12 +01:00
Viktor Szakats
3ee1d3b573
tidy-up: merge root packages directory into projects
To simplify the directory layout.

- OS400 and vms support move from `packages` to `projects`.

- Windows README and `generate.bat` files move from `projects`
  to `projects/Windows`.

Closes #20271
2026-01-12 23:49:35 +01:00
Viktor Szakats
e52e6dac8e
spacecheck: show line numbers of duplicate empty lines
Also:
- drop separate check for 3 or more consecutive empty lines.

Ref: https://github.com/curl/curl/pull/20266#issuecomment-3738955165

Closes #20269
2026-01-12 22:21:01 +01:00
Viktor Szakats
13f0ede730
build: add curl-lint/lint targets, CURL_LINT cmake option
To run checksrc and spacecheck on the source tree. Also for cmake
to sync up with autotools' `checksrc` target.

- cmake: `curl-lint`
  With `-DCURL_LINT=ON`, checks run automatically for all targets.
- autotools: `lint`

Closes #20175
2026-01-12 16:45:24 +01:00