-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Issue
Path construction is inconsistent across the codebase:
Examples:
task/create.go:28: Usesfmt.Sprintf("%s%s", path, name)❌utils/storage.go:13: Usesfilepath.Join(cfg.General.VaultPath, projectName)✓task/finish.go:82: Usesutils.ListMarkdownFiles()✓- Other places mix approaches
Problem
- Some places use unsafe string concatenation
- Inconsistency makes code harder to follow
- Bug-prone (see Issue bug: ignored error in start command #4 about missing separators)
Solution
- Always use
filepath.Joinfor path construction - Create wrapper function in utils if needed:
func GetProjectDir(cfg config.Config, projectName string) string {
return filepath.Join(cfg.General.VaultPath, projectName)
}- Audit entire codebase for consistency
Impact
🟢 Low - Code quality and safety
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels