Skip to content

Exclude SPDX copyright lines from .clang-format#2275

Merged
cjnolet merged 1 commit into
mainfrom
fix-spdx-clang-format
Jun 29, 2026
Merged

Exclude SPDX copyright lines from .clang-format#2275
cjnolet merged 1 commit into
mainfrom
fix-spdx-clang-format

Conversation

@achirkin

Copy link
Copy Markdown
Contributor

NVIDIA's full copyright notice may exceed ColumnLimit: 100 and cause clang-format to corrupt the header for multi-year files.
This PR excludes the copyright line from clang-format checks to workaround this problem.

@achirkin achirkin self-assigned this Jun 29, 2026
@achirkin achirkin added bug Something isn't working non-breaking Introduces a non-breaking change labels Jun 29, 2026
@copy-pr-bot

copy-pr-bot Bot commented Jun 29, 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.

@achirkin achirkin marked this pull request as ready for review June 29, 2026 12:16
@achirkin achirkin requested a review from a team as a code owner June 29, 2026 12:16
@achirkin

Copy link
Copy Markdown
Contributor Author

Note, the error was first encountered in #2237 , which now includes the same fix to test it.
Here's how the CI looks with the error:

clang-format.............................................................Failed
- hook id: clang-format
- files were modified by this hook
...
verify-copyright-cuvs....................................................Failed
- hook id: verify-copyright
- exit code: 1
- files were modified by this hook

In file cpp/src/neighbors/detail/cagra/compute_distance.hpp:2:28:
  * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION &
AFFILIATES. All rights
warning: copyright notice does not match canonical notice

In file cpp/src/neighbors/detail/cagra/compute_distance.hpp:2:28:
- * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION &
AFFILIATES. All rights
+ * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION &
AFFILIATES. All rights reserved.
note: suggested fix applied

@cjnolet

cjnolet commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

/merge

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

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants