Skip to content

Add typos check into CI - #16491

Merged
xokdvium merged 2 commits into
NixOS:masterfrom
antonkesy:add-typos-into-ci
Oct 17, 2026
Merged

xokdvium merged 2 commits into
NixOS:masterfrom
antonkesy:add-typos-into-ci

Conversation

@antonkesy

Copy link
Copy Markdown
Contributor

Motivation

Adds typos into the CI, so that there is no need for recurring and manual typo fixing anymore.

Context

As suggested by @xokdvium in #16479 this PR adds typos into the CI.

There are two commits:

  1. Adds the typos into the CI and creates config of files/words to exclude
  2. Applies the automatic checks using nix develop -c ./maintainers/format.sh

The excluded words file is definitely still open for discussion because for example:

[type.allow-thr]
extend-glob = ["thread-pool.cc", "substitution-goal.cc", "substitution-goal.hh"] # std::thread variable name
extend-identifiers = { thr = "thr" }

[type.allow-ths]
extend-glob = ["nix_api_store.cc"] # `this`-like parameter name in LambdaAdapter
extend-identifiers = { ths = "ths" }

Could simply be removed by changing the few spaces where these variable names occur.

$ grep -Rnw --exclude-dir=.git -e 'ths' .
./src/libstore-tests/nix_api_store.cc:282:    static inline auto call(LambdaAdapter<F> * ths, Args... args)
./src/libstore-tests/nix_api_store.cc:284:        return ths->fun(args...);
./src/libstore-tests/nix_api_store.cc:288:    static auto call_void(void * ths, Args... args)
./src/libstore-tests/nix_api_store.cc:290:        return call(static_cast<LambdaAdapter<F> *>(ths), args...);

Tbh I don't have the experience or knowledge of this repository to say what should be fixed or what should just be excluded, so some feedback/pointers would be appreciated :)


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@github-actions github-actions Bot added documentation new-cli Relating to the "nix" command c api Nix as a C library with a stable interface labels Sep 19, 2026

@xokdvium xokdvium left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot! One tiny note :)

Comment thread src/nix/nix-channel/nix-channel.cc Outdated
@xokdvium

Copy link
Copy Markdown
Contributor

[type.allow-thr]
extend-glob = ["thread-pool.cc", "substitution-goal.cc", "substitution-goal.hh"] # std::thread variable name
extend-identifiers = { thr = "thr" }

[type.allow-ths]
extend-glob = ["nix_api_store.cc"] # this-like parameter name in LambdaAdapter
extend-identifiers = { ths = "ths" }

ths could probably be changed to self but thr seems fine a short-hand (typos does indeed think it's it's a typo for the).

@xokdvium xokdvium left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, seems nice. Might be a bit annoying to maintain the exclusion lists but it's probably better than constantly cleaning up the manual.

@antonkesy

Copy link
Copy Markdown
Contributor Author

thanks, seems nice. Might be a bit annoying to maintain the exclusion lists but it's probably better than constantly cleaning up the manual.

<3

Yeah, but I have to say: For the size, kind and age of this project, there are really few exceptions ^^ Could be much worse. Once you go into low level names where everything is just a 3-char abbreviation etc ...

@xokdvium
xokdvium added this pull request to the merge queue Oct 17, 2026
@xokdvium

Copy link
Copy Markdown
Contributor

Let's see if this lands cleanly now.

Merged via the queue into NixOS:master with commit fcb6e33 Oct 17, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c api Nix as a C library with a stable interface documentation new-cli Relating to the "nix" command

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants