Skip to content

Conversation

@vic
Copy link
Owner

@vic vic commented Jun 25, 2025

No description provided.

Copilot AI review requested due to automatic review settings June 25, 2025 18:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the README to reflect usage on the Dendrix project and refactors the flag-matching example code to use lib.hasInfix-based filters instead of regex.

  • Renamed project reference from “Dennix” to “Dendrix” and consolidated the bullet.
  • Replaced flagRe and regex-based match/matchNot with filter(hasInfix)/filterNot(hasInfix).
  • Updated the exclusive composition to call the new top-level on/off functions directly.
Comments suppressed due to low confidence (2)

README.md:353

  • Add a brief comment to explain that 'on' and 'off' now filter entries based on substring matching, clarifying the switch from regex to 'hasInfix'.
  off = self: flag: self.filterNot (lib.hasInfix "+${flag}");

README.md:354

  • Consider adding unit tests for 'on', 'off', and 'exclusive' functions to verify the new filtering behavior with 'hasInfix'.
  exclusive = self: onFlag: offFlag: lib.pipe self [

Comment on lines +352 to +356
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)
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
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)
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.
@vic vic merged commit 1d9268a into main Jun 25, 2025
1 check passed
@vic vic deleted the vic/jj-change-wplpsovqxqrm branch June 26, 2025 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants