NVIDIA / NVIDIA/cuvs

[BUG] cuVS should copy its clang-format from other RAPIDS libs

Open Beginner friendly
#307 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Cuda
Stars
854
Forks
236
Avg merge
3d 3h
Merged PRs (30d)
62

Description

Describe the bug
cuVS .clang-format does not include the header ordering code that was added for all other RAPIDS C++ libraries. E.g. from RAFT:

IncludeCategories:
  - Regex:           '^"' # quoted includes
    Priority:        1
  - Regex:           '^<(common|benchmarks|tests)/' # benchmark/test includes
    Priority:        2
  #- Regex:           '^<(cuspatial_test|cuproj_test)/' # cuSpatial/cuProj test includes
  #  Priority:        3
  - Regex:           '^<raft/' # RAFT includes
    Priority:        3
  - Regex:           '^<(cudf|cuml|raft|kvikio)' # Other RAPIDS includes
    Priority:        4
  - Regex:           '^<rmm/' # RMM includes
    Priority:        5
  - Regex:           '^<(thrust|cub|cuda)/' # CCCL includes
    Priority:        6
  - Regex:           '^<(cooperative_groups|cuco|cuda|device_types|driver_types|math_constants|nvtx3)' # CUDA includes
    Priority:        6
  - Regex:           '^<.*\..*' # other system includes (e.g. with a '.')
    Priority:        7
  - Regex:           '^<[^.]+' # STL includes (no '.')
    Priority:        8

As a result, header ordering is not consistent and not automatically formatted.

Expected behavior
Start from the clang-format of existing RMM libraries.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with cuVS's .clang-format and compare its IncludeCategories with the clang-format used by existing RMM and other RAPIDS libraries. Update the configuration so the RAPIDS header-ordering rules are included, then verify that header ordering is automatically formatted consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.