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
This commit is contained in:
Viktor Szakats 2026-01-03 17:08:18 +01:00
parent 9dc2552ed1
commit 13f0ede730
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
6 changed files with 22 additions and 3 deletions

View file

@ -200,6 +200,9 @@ checksrc:
(cd docs/examples && $(MAKE) checksrc)
(cd packages && $(MAKE) checksrc)
lint: checksrc
@PERL@ $(top_srcdir)/scripts/spacecheck.pl
tidy:
(cd src && $(MAKE) tidy)
(cd lib && $(MAKE) tidy)