fix: Fixed vet errors.

This commit is contained in:
2026-06-19 15:24:02 -04:00
parent c7c254f6f2
commit 1562fb3665
13 changed files with 18 additions and 5 deletions

View File

@@ -103,9 +103,10 @@ parse_args :: proc(args: []string, out: io.Stream, err: io.Stream) -> (cmd: Comm
}
}
if val, ok := cmd.flags["config-file"]; ok {
val: string = ---
if val, ok = cmd.flags["config-file"]; ok {
cmd.config_path = val
} else if val, ok := cmd.flags["c"]; ok {
} else if val, ok = cmd.flags["c"]; ok {
cmd.config_path = val
} else {
// FIXME: Handle err

View File

@@ -1,5 +1,6 @@
#+feature dynamic-literals
#+test
package main
import "core:bufio"
import "core:fmt"

View File

@@ -1,3 +1,4 @@
#+test
package main
import "core:fmt"

View File

@@ -1,3 +1,4 @@
#+test
package main
import "core:path/filepath"

View File

@@ -1,3 +1,4 @@
#+test
package main
import "core:fmt"

View File

@@ -1,3 +1,4 @@
#+test
package main
import "core:fmt"

View File

@@ -1,3 +1,4 @@
#+test
package main
import "core:fmt"

View File

@@ -535,8 +535,8 @@ shares_remote :: proc(f: ^EnvFile, remotes: []string) -> bool {
get_git_remotes :: proc(dir: string, allocator: mem.Allocator) -> [dynamic]string {
config_path, _ := filepath.join({dir, ".git", "config"}, context.temp_allocator)
// TODO: Handle error
m, _, ok := ini.load_map_from_path(config_path, context.temp_allocator)
if !ok {
m, _, read_ok := ini.load_map_from_path(config_path, context.temp_allocator)
if !read_ok {
return nil
}

View File

@@ -1,3 +1,4 @@
#+test
package main
import "core:fmt"

View File

@@ -1,3 +1,4 @@
#+test
package main
import "core:crypto/hash"
@@ -513,7 +514,8 @@ test_db_sync_dir_missing :: proc(t: ^testing.T) {
db_insert(&d, f)
result, err := db_sync(&d, &f)
testing.expect(t, err == .DirMissing, "should return DirMissing error")
testing.expect_value(t, err, SyncError.DirMissing)
testing.expect_value(t, result, nil)
}
@(test)

View File

@@ -1,3 +1,4 @@
#+test
package main
import "core:fmt"

View File

@@ -1,3 +1,4 @@
#+test
package main
import "core:fmt"

View File

@@ -1,3 +1,4 @@
#+test
package main
import "core:encoding/json"