treefmt-nix icon indicating copy to clipboard operation
treefmt-nix copied to clipboard

chore: fix default value for undefined `cfg.enable`

Open mdqst opened this issue 8 months ago • 1 comments

Fixed an issue where cfg.enable would not default to false if undefined, ensuring the config block is skipped when missing or set to false. Also used lib.mkIf for proper conditional application.

mdqst avatar Apr 06 '25 10:04 mdqst

@mdqst do you have a way to reproduce this?

That PR doesn't make sense to me. In my mental model, cfg.enable always exists and defaults to false since it's defined by the module system.

That being said, this is the second submission. https://github.com/numtide/treefmt-nix/pull/333 also pointed to the same issue

zimbatm avatar Apr 28 '25 08:04 zimbatm

It feels like AI

zimbatm avatar May 16 '25 17:05 zimbatm