Conversation
|
Here's where we're currently at: {
hooks.ormolu.enable = true;
hooks.ormolu.package = pkgs.ormolu.override { ... }; # still need to add lib.mkDefault everywhere
hooks.ormolu.settings.defaultExtensions = [ "lhs" "hs" ];
}What else do we want to include here? I've outlined what needs to get done above, but there are some bits I don't fully understand, like the non-pre-commit hook stuff. |
There's |
These should be reused by all the hooks that use rust bits. |
Nice! Does that always work? What should we do with hooks like this? It's suggesting to set a local path. Should all hooks be able to override the path to the binary? Is
|
|
🥳 🥳 🥳 |
Based on #196.
e750d99 to
8af5964
Compare
|
Looks good to me. Do we need some kind of migration guide or will the warnings system take care of it all (minus the bugs)? |
A good idea either way! @domenkozar, what do you think of this fee04a7? |
|
Nice :) let's ship this. |
|
I think this PR is causing the following issue (specifically with the flake.parts module?): |
@nifoc, thanks, will fix |
|
Damn, I didn't see the ping. What happened to I'm getting |
|
@sandydoo do you know? |
|
Not sure I understand where the error is coming from. Like the per-hook enable? It should be there 🤷 |
- Remove `before` and `after` from the `raw` config. These are not valid pre-commit configuration options and should not be here. - Remove code to filter out `before` and `after` from the `raw` config. - Expose the `id` inside the hook to make it easier to reference and sort. - Set `id` to the attr name of the hook, instead of the `name`. This corrects a mistake make in the module transition (#397). Technically, a breaking change, but we haven't seen feedback on the initial mistake.
- Remove `before` and `after` from the `raw` config. These are not valid pre-commit configuration options and should not be here. - Remove code to filter out `before` and `after` from the `raw` config. This is not needed if they're not in the config in the first place. - Expose the `id` inside the hook to make it easier to reference and sort. - Set `id` to the attr name of the hook, instead of the `name`. This corrects a mistake made in the module transition (#397). Technically, a breaking change, but we haven't had feedback from the initial mistake.
Consolidates previous work from #533 and #536. - Removes `before` and `after` from the `raw` config. These are not valid pre-commit configuration options and should not be here. - Removes code to filter out `before` and `after` from the `raw` config. There's nothing to filter out if they're not in the config in the first place. - Set `id` to the attr name of the hook, instead of the `name`. This corrects a mistake made in the module transition (#397). Technically, a breaking change, but we haven't had feedback from the initial mistake. - Expose `id` in options.
Consolidates previous work from #533 and #536. - Removes `before` and `after` from the `raw` config. These are not valid pre-commit configuration options and should not be here. - Removes code to filter out `before` and `after` from the `raw` config. There's nothing to filter out if they're not in the config in the first place. - Set `id` to the attr name of the hook, instead of the `name`. This corrects a mistake made in the module transition (#397). Technically, a breaking change, but we haven't had feedback from the initial mistake. - Expose `id` in options.
Tackles #196.
Tasks
options.settings.<name>tooptions.hooks.<name>.settingspackageto the hook modulesettings.rust.lib.mkDefaulton hook definitions to make overrides easierhooks.<name>.settings.packagetohooks.<name>.package.nix build .#checks.<system>.doc-check.Out of scope
tools? Breaking change 🤔options.hooksso that they appear in the docs.Issues to tackle
Some hooks depend on a custom, more complex package. These are difficult to override.
Many hooks have adopted
binPathin lieu ofpackage. Should these be deprecated and migrated topackage?Here's an interesting case: you can provide a path to the local
node_modulesfolder instead.Solved: I've kept
binPatharound, but set it tonullby default. Hooks will usebinPathif it's set, but otherwise default topackage.There is a special
options.settings.rustoption that is shared amongst some hooks. It's not a hook itself. We need to define the module type foroptions.settings.Solved: moved to
options.settings.rust.Some packages already use
packageas a setting. Need to migrate these.Solved: renamed and deprecated.
mkRenamedOptionModuleisn't showing any warnings. Is it because of the submodules?Solved: added assertions/warnings handling
Misc fixes
credo.settings.strictis enabled.