Repository navigation
update to dendrix - #10
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
flagReand regex-basedmatch/matchNotwithfilter(hasInfix)/filterNot(hasInfix). - Updated the
exclusivecomposition to call the new top-levelon/offfunctions 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) |
There was a problem hiding this comment.
[nitpick] The parameter name 'flag' shadows conceptually distinct entities and differs from the original 'flagName'; consider renaming it to 'flagName' for clarity and consistency.
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) |
There was a problem hiding this comment.
[nitpick] This lambda argument 'self' shadows the outer attribute set; consider using a distinct parameter name (e.g., 'attrs') to avoid confusion.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.