chore(lint): exclude bidichk from test files#959
Conversation
Test files legitimately need to construct dangerous Unicode inputs (RLO, ZWSP, BOM, etc.) to verify validation logic rejects them. bidichk treats decoded \u escape literals as Trojan Source risks, which is a false positive for intentional test data. Change-Id: I555028a992ab008da16129eb41075c333d0099b8
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA single-line addition to ChangesLinter configuration update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #959 +/- ##
=======================================
Coverage 66.96% 66.96%
=======================================
Files 568 568
Lines 53317 53317
=======================================
Hits 35703 35703
Misses 14649 14649
Partials 2965 2965 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@dd01b0a1fa2f882276588ab16f270f237bc65905🧩 Skill updatenpx skills add larksuite/cli#fix/golangci-bidichk-exclude-tests -y -g |
Summary
internal/vfs/localfileio/path_test.go) need to construct strings with dangerous Unicode codepoints (RLO, ZWSP, BOM, LSEP, LRI) to verify path validation rejects them.bidichkdecodes-style escape literals and flags them as Trojan Source attack risks — a false positive for intentional test data.bidichkfor_test\.go$keeps the production-code protection intact while unblocking lint on PRs that add such tests (e.g. fix: accept absolute paths in file flags; add dry-run chat membership warning #955).Test plan
golangci-lint run ./internal/vfs/localfileio/...passes locally (0 issues)Summary by CodeRabbit