Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spell fixes by codespell #860

Open
inkdot7 opened this issue May 6, 2023 · 3 comments
Open

Spell fixes by codespell #860

inkdot7 opened this issue May 6, 2023 · 3 comments

Comments

@inkdot7
Copy link
Contributor

inkdot7 commented May 6, 2023

For someone wanting some fun with git diff --word-diff and other such games, the nice tool codespell can be used to clean up some misspellings in the sources.

git diff --word-diff is needed to check the results, since not all changes are good. But experience from other places is that it is quite rewarding. The options -L and -w, as well as -i 2 of codespell are useful to look up to.

One does not need to deal with the entire repository at once.

@klenze
Copy link
Contributor

klenze commented May 6, 2023

Vaguely related, perhaps we should have an identifier policy.

An identifier:

  • Shall be at least eight characters long
  • Shall start with the letters "R3B" if it names any type
    (debate: using Unicode, we could transition to R³B instead)
  • Shall start with the letter "f" if it names a class member variable
  • Shall contain at least one special character, one lowercase letter, and one digit each
  • May not be reused in another scope
  • Must have a Damerau–Levenshtein distance of at least four with respect to all other identifiers in scope to prevent typos causing bugs
  • Variable names must use (Systems) Hungarian notation, plus a postfix denoting the unit

Checking for identifiers in C++ is easy (the hard part is figuring out what they mean), so we could possibly just feed them to some password policy checker.

@inkdot7
Copy link
Contributor Author

inkdot7 commented May 7, 2023

I take it that @klenze 's comment fall in the "Surely You're Joking ?" category.

The original suggestion is intended as a small one-time action unrelated to any CI or policy.

@klenze
Copy link
Contributor

klenze commented May 7, 2023

Yes, I was.

No harm in anyone checking and fixing misspellings, I guess. Not in my top ten complaints about the code base, but that may be because I am the one doing the misspelling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants