Skip to content

fix(clang-format): preserve SPDX comments#1560

Open
bdice wants to merge 4 commits into
NVIDIA:mainfrom
bdice:fix-clang-format-comment-pragmas
Open

fix(clang-format): preserve SPDX comments#1560
bdice wants to merge 4 commits into
NVIDIA:mainfrom
bdice:fix-clang-format-comment-pragmas

Conversation

@bdice

@bdice bdice commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Description

Contributes to rapidsai/build-planning#303.

This updates clang-format's CommentPragmas to preserve SPDX copyright and license lines. Without this, clang-format reflows the canonical notice produced by verify-copyright, so consecutive pre-commit runs keep modifying the same block comment. Where a header was already corrupted, this also restores its canonical two-line form.

Signed-off-by: Bradley Dice <bdice@bradleydice.com>
@bdice bdice added bug Something isn't working non-breaking Introduces a non-breaking change labels Jul 10, 2026
@copy-pr-bot

copy-pr-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

bdice added 3 commits July 10, 2026 17:02
Signed-off-by: Bradley Dice <bdice@bradleydice.com>
Signed-off-by: Bradley Dice <bdice@bradleydice.com>
Signed-off-by: Bradley Dice <bdice@bradleydice.com>
@bdice bdice marked this pull request as ready for review July 11, 2026 00:58
@bdice bdice requested review from a team as code owners July 11, 2026 00:58
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: d7d45ae5-e22e-4b4a-94e1-85a49957f3d1

📥 Commits

Reviewing files that changed from the base of the PR and between 940ec59 and 3e31f8f.

📒 Files selected for processing (55)
  • .clang-format
  • .pre-commit-config.yaml
  • cpp/include/cuopt/grpc/cython_grpc_client.hpp
  • cpp/include/cuopt/grpc/grpc_client_env.hpp
  • cpp/include/cuopt/mathematical_optimization/utilities/segmented_sum_handler.cuh
  • cpp/src/branch_and_bound/node_queue.hpp
  • cpp/src/grpc/client/grpc_client.cpp
  • cpp/src/grpc/client/grpc_client.hpp
  • cpp/src/grpc/cuopt_default_grpc_port.h
  • cpp/src/grpc/grpc_chunk_key.hpp
  • cpp/src/grpc/grpc_problem_mapper.cpp
  • cpp/src/grpc/grpc_problem_mapper.hpp
  • cpp/src/grpc/grpc_service_mapper.cpp
  • cpp/src/grpc/grpc_service_mapper.hpp
  • cpp/src/grpc/grpc_settings_mapper.cpp
  • cpp/src/grpc/grpc_settings_mapper.hpp
  • cpp/src/grpc/grpc_solution_mapper.cpp
  • cpp/src/grpc/grpc_solution_mapper.hpp
  • cpp/src/grpc/server/grpc_field_element_size.hpp
  • cpp/src/grpc/server/grpc_incumbent_proto.hpp
  • cpp/src/grpc/server/grpc_job_management.cpp
  • cpp/src/grpc/server/grpc_pipe_io.cpp
  • cpp/src/grpc/server/grpc_pipe_serialization.hpp
  • cpp/src/grpc/server/grpc_server_logger.cpp
  • cpp/src/grpc/server/grpc_server_logger.hpp
  • cpp/src/grpc/server/grpc_server_main.cpp
  • cpp/src/grpc/server/grpc_server_threads.cpp
  • cpp/src/grpc/server/grpc_server_types.hpp
  • cpp/src/grpc/server/grpc_service_impl.cpp
  • cpp/src/grpc/server/grpc_worker.cpp
  • cpp/src/grpc/server/grpc_worker_infra.cpp
  • cpp/src/mip_heuristics/diversity/lns/rins.cu
  • cpp/src/mip_heuristics/diversity/lns/rins.cuh
  • cpp/src/mip_heuristics/presolve/conflict_graph/clique_table.cu
  • cpp/src/mip_heuristics/presolve/conflict_graph/clique_table.cuh
  • cpp/src/mip_heuristics/utilities/work_unit_ordered_queue.cuh
  • cpp/src/pdlp/pdlp_climber_strategy.hpp
  • cpp/src/utilities/producer_sync.hpp
  • cpp/src/utilities/work_limit_context.hpp
  • cpp/src/utilities/work_unit_scheduler.cpp
  • cpp/src/utilities/work_unit_scheduler.hpp
  • cpp/tests/linear_programming/grpc/grpc_client_test.cpp
  • cpp/tests/linear_programming/grpc/grpc_client_test_helper.hpp
  • cpp/tests/linear_programming/grpc/grpc_integration_test.cpp
  • cpp/tests/linear_programming/grpc/grpc_pipe_serialization_test.cpp
  • cpp/tests/linear_programming/grpc/grpc_test_log_capture.hpp
  • cpp/tests/qp/unit_tests/lp_parser_solve_test.cu
  • cpp/tests/qp/unit_tests/no_constraints.cu
  • cpp/tests/qp/unit_tests/two_variable_test.cu
  • docs/cuopt/source/cuopt-c/convex/examples/general_quadratic_example.c
  • docs/cuopt/source/cuopt-c/convex/examples/rotated_socp_example.c
  • docs/cuopt/source/cuopt-c/convex/examples/simple_qp_example.c
  • docs/cuopt/source/cuopt-c/convex/examples/simple_socp_example.c
  • docs/cuopt/source/cuopt-server/nim-operator/guide/deploy.sh
  • regression/config.sh

📝 Walkthrough

Walkthrough

Updated formatter and pre-commit configuration, normalized SPDX header formatting across production and supporting files, and added a targeted hardcoded-version check suppression in the regression configuration.

Changes

Header and tooling alignment

Layer / File(s) Summary
Formatter and pre-commit configuration
.clang-format, .pre-commit-config.yaml
Updated SPDX/IWYU comment matching, bumped the RAPIDS hook revision, and added a documentation-path exclusion.
Production SPDX header normalization
cpp/include/..., cpp/src/...
Reformatted or condensed SPDX copyright and license headers without changing implementation code.
Test, documentation, and script headers
cpp/tests/..., docs/cuopt/..., regression/config.sh
Normalized SPDX headers and added a targeted hardcoded-version suppression for the regression script.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested labels: improvement

Suggested reviewers: Iroy30, KyleFromNVIDIA, tmckayus

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: preserving SPDX comments via clang-format.
Description check ✅ Passed The description matches the changeset and explains the SPDX/clang-format fix and header restoration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

CI Test Summary

✅ All 31 test job(s) passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants