Skip to content

Commit d776f83

Browse files
Frank Guoclaude
andcommitted
Fix lint: remove unused var, apply De Morgan's law
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d067c09 commit d776f83

2 files changed

Lines changed: 1 addition & 5 deletions

File tree

cmd/rekal/cli/scrub/paths.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ func newAnonymizer(username string) *pathAnonymizer {
4848
}
4949
}
5050

51-
// projectRelativeDirs are directories under the home folder where we strip
52-
// the full path and keep only the project-relative portion.
53-
var projectRelativeDirs = []string{"Documents", "Downloads", "Desktop", "Projects", "projects", "src", "repos", "code", "dev", "workspace"}
54-
5551
// AnonymizePath replaces the username in a single file path with the hashed form.
5652
func AnonymizePath(path string) string {
5753
if defaultAnonymizer == nil {

cmd/rekal/cli/scrub/secrets.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ func isAllowedHighEntropy(s string) bool {
162162

163163
func isHexString(s string) bool {
164164
for _, c := range s {
165-
if !((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F')) {
165+
if (c < '0' || c > '9') && (c < 'a' || c > 'f') && (c < 'A' || c > 'F') {
166166
return false
167167
}
168168
}

0 commit comments

Comments
 (0)