You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In ktlint, the team ran into the following issue describing this problem in full: pinterest/ktlint#942
The fix there simply works around calling the Glob.from() method completely, but causes other issue in doing so. Please see Pull Request coming in shortly.
Regarding the actual issue in code, the problem is an optimization in the visit() method that sorts and folds the given patterns, removing any that overlap. I removed this optimization because:
It would optimize out paths that are substrings of each other as seen in this issue, unless it does further checks.
By performing this optimization it goes against the inclusion, exclusion, inclusion possibilities of patterns because it changes their order, forcing all exclusion patterns to one place in the chain. This seems to go against the goal stated here in the code
The text was updated successfully, but these errors were encountered:
thecoden
added a commit
to codetactics/klob
that referenced
this issue
Dec 7, 2020
In ktlint, the team ran into the following issue describing this problem in full:
pinterest/ktlint#942
The fix there simply works around calling the Glob.from() method completely, but causes other issue in doing so. Please see Pull Request coming in shortly.
Regarding the actual issue in code, the problem is an optimization in the visit() method that sorts and folds the given patterns, removing any that overlap. I removed this optimization because:
The text was updated successfully, but these errors were encountered: