Skip to content

Fix variable and function names #176

Open
@Quincunx271

Description

@Quincunx271

Breaking off from #47. There are two ideas at play here:

  1. We have a lot of shortened names which are hard to read:

    I would also like to suggest renaming of functions and variables. UpdtRdyLst_ is not much shorter than UpdateRdyList_ or UpdateReadyList_, but those are much easier to read. There's a pervasive removal of vowels: Dynmc, PrirtyLst, RcrsvScsr.

    Some shortenings are reasonable (Reg), but there should be very few of these. The pattern I've noticed is that I'm generally fine if it's a single syllable of the larger word, rather than the larger word with vowels removed: Reg vs Rgstr

    Originally posted by @Quincunx271 in General Refactoring Planning #47 (comment)

  2. Many of our names break the clang-tidy check set up by LLVM:

    To be clear on the state of this: Fix clang-tidy warnings #77 fixed the majority of these cases. What's left to fix is the casing of our variable names.

    Originally posted by @Quincunx271 in Fix Clang-Tidy violations? #9 (comment)

This is not an issue that can be fixed in one PR. It must be split into many. This is also significantly easier if we practice short branches rather than long-lived feature branches, else merge conflicts will be rampant and hard to fix.

Some advice on tackling this:

  1. For expanding shortened names:
    • If the expansion can be accomplished by a script, it can be worth committing said script to the repo to aide in merge conflict resolution.
  2. For fixing the remaining clang-tidy check:
    • The check needs to be re-enabled in some form. Currently, it's not very visible in the CI checks. Ideally, it would complain for new names which do not follow the rules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions