Closed danth closed 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 outdatedlib
functions with builtin versions, eta reduction.
I never heard about Statix, but it sounds great.
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.)
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.
This includes two linters:
inherit
, not using== true
, replacing outdatedlib
functions with builtin versions, eta reduction.{ pkgs, config, lib, ... }
, and unusedlet
bindings.Lints are provided in the form of warnings under the "Files changed" tab.
Addresses #236