Skip to content

checksrc: warn for leading spaces before the hash#20282

Closed
bagder wants to merge 3 commits intomasterfrom
bagder/checksrc-space
Closed

checksrc: warn for leading spaces before the hash#20282
bagder wants to merge 3 commits intomasterfrom
bagder/checksrc-space

Conversation

@bagder
Copy link
Member

@bagder bagder commented Jan 13, 2026

Fix the 40+ fallouts

@bagder bagder marked this pull request as ready for review January 13, 2026 08:24
@github-actions github-actions bot added the tests label Jan 13, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new checksrc warning to detect and fix leading spaces before preprocessor directives (the # symbol). The PR implements the warning check and fixes all 40+ instances of this style violation found in the codebase.

Changes:

  • Added CPPSPACE warning to checksrc.pl to detect leading spaces before preprocessor hash symbols
  • Fixed all instances of improperly indented preprocessor directives across library files
  • Updated test expectations to reflect the new warning

Reviewed changes

Copilot reviewed 2 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
scripts/checksrc.pl Added CPPSPACE warning and detection logic for leading spaces before #
tests/data/test1185 Updated test expectations to include new CPPSPACE warning and incremented warning count
lib/vssh/libssh.c Removed leading spaces from preprocessor directives
lib/vquic/curl_ngtcp2.c Removed leading spaces from #error directive
lib/sha256.c Removed leading spaces from preprocessor directives
lib/md5.c Removed leading spaces from preprocessor directives
lib/md4.c Removed leading spaces from nested preprocessor directives (using # define convention)
lib/http_negotiate.c Removed leading spaces from preprocessor directives
lib/file.c Removed leading spaces from preprocessor directives
lib/curl_ntlm_core.c Removed leading spaces from nested preprocessor directives (using # define convention)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bagder bagder closed this in f057ed0 Jan 13, 2026
@bagder bagder deleted the bagder/checksrc-space branch January 13, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants