curl-curl/.github
Viktor Szakats ce4db9c2ef
GHA/linux: replace scan-build with clang-tidy
`scan-build` is a (Perl) wrapper around clang's built-in `--analyze`
option. Which look similar or identical to clang-tidy checkers under
the `clang-analyzer-*` namespace:
https://clang.llvm.org/docs/ClangStaticAnalyzer.html

Unless somebody has other information, it appears redundant to run
scan-build in parallel with clang-tidy in CI, now that the latter is
working reliably and with good performance for all curl components.

Another scan-build issue is the lack of a markup to suppress false
positives. It ignores `NOLINT`, yet finds the same false positives as
clang-tidy. This happens with scan-build v20+. v18 is silent, but it's
a blocker to upgrade to a newer version.

scan-build may still be a useful when combined with autotools, where
clang-tidy support is incomplete, slow (no parallelism), and uses
a distinct make target, which does not build binaries in the same pass.
But, scan-build also lacks extra checkers that are now enabled for
clang-tidy.

The clang-tidy job is also 30-40s faster than the one it replaced.

Also:
- drop scan-build job configured the same way as a clang-tidy one.
  CI time saved: 6m30s
- bump to clang-20 (from 18) in the replacement job.
- build tests in the replacement job.
  To verify a cmake command-line reconstruction issue only hit in this
  job in CI.
  CI time cost: 1m40s
- replacement job caught a minor, new, issue.
  Ref: b2076d3c2f #20752
- drop unused scan-build logic.

Bug: https://github.com/curl/curl/pull/20732#issuecomment-3963873838
Ref: https://github.com/curl/curl/pull/20732#issuecomment-3967479228

Closes #20751
2026-02-27 14:08:59 +01:00
..
ISSUE_TEMPLATE VULN-DISCLOSURE-POLICY.md: use hackerone 2026-02-26 07:57:19 +01:00
scripts build: use native file open flags in Windows-specific code 2026-02-04 15:59:35 +01:00
workflows GHA/linux: replace scan-build with clang-tidy 2026-02-27 14:08:59 +01:00
CODEOWNERS CI: add whitespace checker 2024-06-27 13:33:30 +02:00
CONTRIBUTING.md tidy-up: Markdown, clang-format nits 2026-01-22 23:44:47 +01:00
dependabot.yml GHA/dependabot: tidy-ups 2025-11-02 17:45:50 +01:00
FUNDING.yml copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
labeler.yml tidy-up: merge root packages directory into projects 2026-01-12 23:49:35 +01:00
lock.yml copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
stale.yml badwords: fix issues found in scripts and other files 2025-11-17 17:18:07 +01:00