Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,7 @@ filters at configuration time, configuration-library authors can
provide custom import-tree instances with an API suited for their
particular idioms.

@vic is using this on [Dennix](https://github.com/vic/dennix) for [community conventions](https://github.com/vic/dennix/blob/main/dev/modules/community/_pipeline.nix)
on tagging files.
@vic is using this on [Dendrix](https://github.com/vic/dendrix) for [community conventions](https://github.com/vic/dendrix/blob/main/dev/modules/community/_pipeline.nix) on tagging files.

</summary>

Expand All @@ -350,14 +349,11 @@ let
(i: i.addAPI { vim-btw = self: self.exclusive "vim" "emacs"; })
];

flagRe = flag: ".*/.*?\+${flag}.*/.*"; # matches +foo on dir path

on = self: flagName: self.match (flagRe flagName);
off = self: flagName: self.matchNot (flagRe flagName);

on = self: flag: self.filter (lib.hasInfix "+${flag}");
off = self: flag: self.filterNot (lib.hasInfix "+${flag}");
exclusive = self: onFlag: offFlag: lib.pipe self [
(self: self.on onFlag)
(self: self.off offFlag)
(self: on self onFlag)
(self: off self offFlag)
Comment on lines +352 to +356
Copy link

Copilot AI Jun 25, 2025

Choose a reason for hiding this comment

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

[nitpick] The parameter name 'flag' shadows conceptually distinct entities and differs from the original 'flagName'; consider renaming it to 'flagName' for clarity and consistency.

Copilot uses AI. Check for mistakes.
Comment on lines +352 to +356
Copy link

Copilot AI Jun 25, 2025

Choose a reason for hiding this comment

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

[nitpick] This lambda argument 'self' shadows the outer attribute set; consider using a distinct parameter name (e.g., 'attrs') to avoid confusion.

Copilot uses AI. Check for mistakes.
];
in
{
Expand Down