mirror of
https://github.com/sbrow/envr.git
synced 2026-06-27 18:48:33 -04:00
fix: Added proper help text to all commands.
This commit is contained in:
18
TODOS.md
18
TODOS.md
@@ -10,6 +10,8 @@ Note: These todos can wait until all the subcommands have been ported.
|
||||
|
||||
3. **config.odin:52-54** — `os.user_home_dir` error silently ignored. If it fails, `home` is `""` and all paths become relative (`".envr"` instead of `"~/.envr"`).
|
||||
|
||||
30. **cmd_sync.odin:46-50, 64-68** — Double `db_insert` when `BackedUp`: first insert on line 48, then `db_update_required` is also true for `BackedUp` so second insert runs on line 65. Redundant and wasteful.
|
||||
|
||||
## MEDIUM
|
||||
|
||||
4. **db.odin:29-35** — `make_temp_path` never calls `strings.builder_destroy`. Leaks builder buffer every call.
|
||||
@@ -32,6 +34,12 @@ Note: These todos can wait until all the subcommands have been ported.
|
||||
|
||||
13. [x] **cmd_list.odin:31-35, 58-61** — Uses a `strings.Builder` (never destroyed) for what is just `row.Dir + "/"`. Also `filepath.rel` used where `filepath.base` would suffice since dir is always the parent.
|
||||
|
||||
33. **config.odin:178** — `search_paths` silently ignores `os.user_home_dir` error. If home is empty, `~` isn't expanded. Same class of bug as issue 3.
|
||||
|
||||
34. **table.odin:84-88** — `render_json_rows` creates `map[string]string` per row, copies into dynamic array. `delete(entries)` frees the array but not individual map internals — potential map bucket leak per row.
|
||||
|
||||
35. **prompt.odin:124** — `make([dynamic]bool, len(options))` creates N zero-initialized elements. Works because `false` is the default, but same footgun as original issue 1. Should be `make([dynamic]bool, 0, len(options))`.
|
||||
|
||||
## LOW
|
||||
|
||||
14. [x] **db.odin:338-341** — Unnecessary `strings.clone` before `filepath.dir` (which already returns a slice into the input).
|
||||
@@ -44,6 +52,10 @@ Note: These todos can wait until all the subcommands have been ported.
|
||||
|
||||
19. **main.odin:42-46** — Dynamic array in `fallback_to_go` never deleted. Harmless since process exits.
|
||||
|
||||
36. **cli.odin:59-76** — Single-dash multi-char flags (e.g. `-force`) silently misparse. `-force` becomes flag `f` with value `o`, then `rce` as positional arg. Only `--force` and `-f` work correctly.
|
||||
|
||||
37. **cmd_sync.odin:80, cmd_list.odin:33, cmd_deps.odin:9** — `make([]string, 2)` for table rows never freed. Leaks per row. Defer to memory pass.
|
||||
|
||||
## REFACTOR
|
||||
|
||||
20. **cmd_list.odin** — Non-TTY branch builds `ListEntry` structs and marshals JSON separately. Now that `render_json_rows` (issue 1) accepts an `io.Writer` and uses `json.marshal`, unify both branches to use it. Note: will change JSON keys from `"directory"/"path"` to `"Directory"/"Path"`.
|
||||
@@ -59,3 +71,9 @@ Note: These todos can wait until all the subcommands have been ported.
|
||||
25. Add tests for untested commands.
|
||||
|
||||
26. Add a global --config -c flag to use an alternate config.
|
||||
|
||||
27. version --long Odin only prints version; Go also prints commit hash and build date
|
||||
|
||||
28. 2 scan tests silently skip Low When fd isn't installed, tests pass without actually testing anything. These should use #assert to be sure that fd is in path.
|
||||
|
||||
29. nushell completions?
|
||||
|
||||
Reference in New Issue
Block a user