NVIDIA / NVIDIA/raft

[QST] Discrepancies between the style defs in cpp/.clang-tidy and raft common practice

Open
#591 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

inactive-30d inactive-90d question
Dominant language
Cuda
Stars
1k
Forks
251
Avg merge
1d 8h
Merged PRs (30d)
31

Description

Since a few month ago I've been able to use clang-tidy (CT) on most of the raft's files, and I've noticed its suggestions in the naming style differ from what I'm used to see in raft as common practice (CP). I haven't calculated the statistics of CP, so I'm writing down my subjective feeling about the matter:

  1. Template parameters:
    CT: camel case
    CP: snake case seems to be more common
  2. enum type names:
    CT: camel case
    CP: both variants observed
  3. enum constant names:
    CT: camel case with k prefix
    CP: camel or all caps, but never with the k prefix
  4. constexpr "variables":
    CT: camel case with k prefix
    CP: anything possible

These are the ones disturbing me when I need to make a decision. Please, add more items as needed.

My main question is, (how) shall we modify .clang-tidy rules to better reflect common preferences?

Contributor guide

No contributing guide indexed for this repository

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

Review the naming-style entries in cpp/.clang-tidy at the linked sections, then compare those rules with the naming conventions observed across RAFT's C++ files. Done means the preferred conventions are agreed and the clang-tidy rules are updated to reflect them.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.