fix: ignore hidden and build directories in unicode lint test - #565
Merged
Conversation
This prevents the test from incorrectly failing when build systems (like Void Linux's xbps-src) create hidden or build directories (e.g., _build-surge-xbps) that contain third-party dependencies with raw unicode characters.
❌ Test Failures on
|
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.
Fixes #557
This PR updates the
TestNoRawUnicodeInStringLiteralslint rule to explicitly ignore directories starting with.or_. This prevents the test from incorrectly scanning third-party dependencies downloaded by packaging tools (like Void Linux's xbps-src which creates_build-surge-xbps) during package builds.Greptile Summary
Updates the unicode string-literal lint walk to skip hidden and underscore-prefixed directories while still scanning the module root.
.gitfromskipDirsin favor of a general./_name prefix skip for non-root directories._build-surge-xbpsthat holdgo.modstill have their tree scanned.Confidence Score: 5/5
The PR appears safe to merge; the walk-root skip issue is fixed and no blocking failure remains.
The walk root is returned without SkipDir before prefix checks, so module roots named like
_build-surge-xbpsare still traversed and production.gofiles are linted as intended.Files Needing Attention: No files need further attention.
What T-Rex did
Important Files Changed
./_-prefixed child dirs and vendor/testdata, but never skips the project root, addressing the prior packaging false-pass.Reviews (2): Last reviewed commit: "fix: prevent accidental skipping of the ..." | Re-trigger Greptile