refactor: Improve code quality throughout the codebase#1642
Merged
anderseknert merged 1 commit intomainfrom Aug 5, 2025
Merged
refactor: Improve code quality throughout the codebase#1642anderseknert merged 1 commit intomainfrom
anderseknert merged 1 commit intomainfrom
Conversation
charlieegan3
reviewed
Aug 5, 2025
| path = strings.TrimPrefix(path, "/") | ||
| // handling case for windows when the drive letter is set | ||
|
|
||
| // TODO; never set? |
Member
Author
There was a problem hiding this comment.
Sure! This was meant as a note to you as I haven't worked much on this. It seemed like your intention was to use this, but I take it this isn't needed then?
// handling case for windows when the drive letter is set
// TODO; never set?
var driveLetter string
if matches := drivePatternMaybeEncoded.FindStringSubmatch(path); len(matches) > 1 {
path = strings.TrimPrefix(path, matches[0])
path = matches[1] + ":" + strings.TrimPrefix(path, driveLetter)
} else {
path = "/" + path
}Should the whole drivePatternMaybeEncoded block be removed?
Contributor
There was a problem hiding this comment.
yeah looks like it's not used... unsure why they didn't get caught in the linter?
This started off as a follow up PR to #1636, but grew somewhat from there :): - Move the new file walker to a separate package + improvements - Merge logic shared by the lint and fix command. Still more to do here but it's a start. - Genral improvements in primarily the linter packages Signed-off-by: Anders Eknert <anders@styra.com>
2336b26 to
3c07aaa
Compare
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.

This started off as a follow up PR to #1636, but grew somewhat from there :)