danth / stylix

System-wide colorscheming and typography for NixOS
https://stylix.danth.me/
MIT License
902 stars 105 forks source link

treewide: add linters and apply pending suggestions #426

Closed danth closed 2 weeks ago

danth commented 2 weeks ago

This includes two linters:

Lints are provided in the form of warnings under the "Files changed" tab.

Addresses #236

trueNAHO commented 2 weeks ago

I acknowledge pre-commit hooks being controversial. Nonetheless, they integrate nicely with nix flake check and nix develop, simplifying GitHub Actions and arguably improving the developer feedback loop.

For reference, I use git-hooks.nix to set up the following linter and formatter hooks in my dotfiles repository:

  • Statix: provides general suggestions such as using inherit, not using == true, replacing outdated lib functions with builtin versions, eta reduction.

I never heard about Statix, but it sounds great.

danth commented 2 weeks ago

Interesting, hooks might make it more convenient for regular contributors. Having it run on CI too ensures nothing is missed.

Should we merge this now, and possibly rework it to use hooks as a follow up?

(Due to the high chance of merge conflicts, I think it's a good idea to get the treewide changes in as quickly as possible.)

trueNAHO commented 2 weeks ago

Should we merge this now, and possibly rework it to use hooks as a follow up?

(Due to the high chance of merge conflicts, I think it's a good idea to get the treewide changes in as quickly as possible.)

Good idea.

Interesting, hooks might make it more convenient for regular contributors. Having it run on CI too ensures nothing is missed.

I updated and converted https://github.com/danth/stylix/issues/236 into a tracking issue, reflecting our latest roadmap.