Skip to content

package-type-check: support C++ header extensions in dev package check#340

Open
toabctl wants to merge 1 commit intochainguard-dev:mainfrom
toabctl:fix-devpackage-cpp-headers
Open

package-type-check: support C++ header extensions in dev package check#340
toabctl wants to merge 1 commit intochainguard-dev:mainfrom
toabctl:fix-devpackage-cpp-headers

Conversation

@toabctl
Copy link
Member

@toabctl toabctl commented Mar 5, 2026

Summary

  • HasHeaderFiles only checked for .h files, causing false failures for C++ dev packages that only ship .hpp, .hxx, .hh, or .h++ headers (e.g., boost, tl-expected, toml11)
  • Extracted isHeaderFile() helper that checks all standard C/C++ header extensions
  • Added unit tests covering all extensions plus negative cases

Test plan

  • go test ./pkg/utils/ -run TestIsHeaderFile -v — all 12 cases pass

HasHeaderFiles only checked for .h files, causing false failures for
C++ dev packages that only ship .hpp, .hxx, .hh, or .h++ headers
(e.g., boost, tl-expected, toml11).
@toabctl toabctl requested a review from aborrero March 5, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant