[ax] Migrate filepath.* to core.Path*, add usage-example comments #4

Open
opened 2026-03-22 16:39:14 +00:00 by Virgil · 2 comments
Member

AX sweep findings:

HIGH — filepath. usage in production code (8 hits)*

  • cache.go:47 filepath.Join
  • cache.go:69 filepath.Join
  • cache.go:72 filepath.Abs
  • cache.go:76 filepath.Abs
  • cache.go:81 filepath.Separator
  • cache.go:130 filepath.Dir
  • cache.go:206 filepath.Join
  • cache.go:211 filepath.Join

MEDIUM — strings. usage*

  • cache.go:81 strings.HasPrefix → core.HasPrefix

MEDIUM — Documentation uses filepath/strings

  • docs/architecture.md:165 filepath.Join
  • docs/architecture.md:169 filepath.Join
  • docs/architecture.md:181 strings.HasPrefix

MEDIUM — Missing usage-example comments on all 11 exported identifiers

  • Cache, Entry, New, Path, Get, Set, Delete, Clear, Age, GitHubReposKey, GitHubRepoKey

No os.Getenv, fmt.Sprintf, errors.New, or fmt.Errorf found. No UK spelling issues.

AX sweep findings: **HIGH — filepath.* usage in production code (8 hits)** - cache.go:47 filepath.Join - cache.go:69 filepath.Join - cache.go:72 filepath.Abs - cache.go:76 filepath.Abs - cache.go:81 filepath.Separator - cache.go:130 filepath.Dir - cache.go:206 filepath.Join - cache.go:211 filepath.Join **MEDIUM — strings.* usage** - cache.go:81 strings.HasPrefix → core.HasPrefix **MEDIUM — Documentation uses filepath/strings** - docs/architecture.md:165 filepath.Join - docs/architecture.md:169 filepath.Join - docs/architecture.md:181 strings.HasPrefix **MEDIUM — Missing usage-example comments on all 11 exported identifiers** - Cache, Entry, New, Path, Get, Set, Delete, Clear, Age, GitHubReposKey, GitHubRepoKey No os.Getenv, fmt.Sprintf, errors.New, or fmt.Errorf found. No UK spelling issues.
Author
Member

Fix Applied

Commit cabb7b1: fix(cache): resolve issue 4 findings

  • filepath.* → core.JoinPath/PathAbs/PathDir throughout cache.go
  • strings.HasPrefix → core.HasPrefix
  • Usage-example comments added to exported identifiers
  • SPDX headers added
  • 100 additions across 5 files
## Fix Applied Commit cabb7b1: fix(cache): resolve issue 4 findings - filepath.* → core.JoinPath/PathAbs/PathDir throughout cache.go - strings.HasPrefix → core.HasPrefix - Usage-example comments added to exported identifiers - SPDX headers added - 100 additions across 5 files
Author
Member

Verification: PASS

Naming, security, tests all pass.

## Verification: PASS Naming, security, tests all pass.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

-

Dependencies

No dependencies set.

Reference: core/go-cache#4
No description provided.