Skip to content

build: disable typecheck for analyzers and Fil-C#19941

Closed
vszakats wants to merge 3 commits intocurl:masterfrom
vszakats:distypecheck
Closed

build: disable typecheck for analyzers and Fil-C#19941
vszakats wants to merge 3 commits intocurl:masterfrom
vszakats:distypecheck

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Dec 12, 2025

  • cmake: automatically disable typecheck when running clang-tidy,
    to avoid possible interference, and to improve performance.

  • INSTALL-CMAKE: document both this, and unity=off for clang-tidy.

  • GHA/linux: disable for some static analyzers CI jobs to avoid possible
    interference.

  • GHA/linux: disable in Fil-C job to improve build performance.

Follow-up to 9e6f1c5 #19637
Follow-up to fd2ca23 #17955


Linux before: https://github.com/curl/curl/actions/runs/20149750343/job/57839502023
Linux after: https://github.com/curl/curl/actions/runs/20151549169/job/57845262990?pr=19941
macOS before: https://github.com/curl/curl/actions/runs/20149750331/job/57839501850
macOS after: https://github.com/curl/curl/actions/runs/20151549184?pr=19941

@vszakats vszakats marked this pull request as draft December 12, 2025 00:07
@github-actions github-actions bot added the CI Continuous Integration label Dec 12, 2025
@vszakats vszakats changed the title build: disable typecheck when using static analyzers build: disable typecheck in some cases Dec 12, 2025
@vszakats vszakats marked this pull request as ready for review December 12, 2025 00:24
@vszakats vszakats changed the title build: disable typecheck in some cases build: disable typecheck for analyzers and Fil-C Dec 12, 2025
@vszakats vszakats added the cmake label Dec 12, 2025
@vszakats vszakats requested a review from Copilot December 12, 2025 01:02
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 disables typecheck for static analyzer and Fil-C builds to improve performance and avoid potential interference between the type checking mechanism and analysis tools. The change affects both CMake and autotools build systems, ensuring consistent behavior across different analyzer configurations.

  • Automatically disables typecheck when CURL_CLANG_TIDY is enabled in CMake builds
  • Adds --disable-typecheck to autotools-based analyzer jobs (clang-tidy, scan-build)
  • Documents the automatic typecheck disabling behavior for CURL_CLANG_TIDY option

Reviewed changes

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

File Description
CMakeLists.txt Automatically sets CURL_DISABLE_TYPECHECK=ON when CURL_CLANG_TIDY is enabled
docs/INSTALL-CMAKE.md Documents that CURL_CLANG_TIDY implies both CMAKE_UNITY_BUILD=OFF and CURL_DISABLE_TYPECHECK=ON
.github/workflows/linux.yml Adds --disable-typecheck to clang-tidy, scan-build, and Fil-C jobs using autotools

The implementation is clean and consistent. The CMake changes will automatically apply to macOS clang-tidy jobs which use the CMake-based approach, while the Linux workflow correctly adds the flag to autotools-based analyzer jobs. The documentation accurately reflects the implementation.


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

- GHA/linux: in some sanitizier CI jobs to avoid possible interference.
- cmake: automatically disable typecheck when running clang-tidy.
@vszakats vszakats closed this in e413a38 Dec 12, 2025
@vszakats vszakats deleted the distypecheck branch December 12, 2025 11:22
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