Skip to content

ci(lint): Re-enable clang-tidy checks in CI #138

@coderabbitai

Description

@coderabbitai

Summary

Re-enable C++ static analysis (clang-tidy) in the CI pipeline. This was explicitly skipped in #131 because cleaning up all affected files requires non-trivial effort.

Background

In #131, C++ static analysis was omitted from the lint workflow while clang-format was pinned to v21.1.x and the GitHub Actions triggers were fixed. The PR comments (link) include a trial clang-tidy run that surfaced a broad set of diagnostics across multiple source files under src/clp_ffi_js/ir/, including (but not limited to):

  • misc-include-cleaner: several headers included but not used directly
  • readability-convert-member-functions-to-static: methods that can be made static
  • cppcoreguidelines-rvalue-reference-param-not-moved: rvalue reference parameters not moved inside function bodies
  • readability-identifier-naming: naming style violations (e.g., filter_log_events flagged as a member)
  • cppcoreguidelines-pro-type-member-init: constructors not initialising all member fields
  • clang-diagnostic-error: missing header emscripten/val.h in the include path used by clang-tidy
  • .clang-format config error: ReflowComments: "Always" is not a valid boolean value in the version being used

Tasks

  • Fix all clang-tidy warnings and errors across the codebase (or add justified NOLINT suppressions where appropriate)
  • Fix the .clang-format ReflowComments config error so that clang-format and clang-tidy can run cleanly together
  • Ensure the emscripten headers are available in the build/compile-commands environment used by clang-tidy
  • Add a task lint:check-cpp-static-analysis (or equivalent) step back into .github/workflows/lint.yaml

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions