aboutsummaryrefslogtreecommitdiff
path: root/src/server/check.odin
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2026-02-12 14:38:39 +1100
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2026-02-12 14:52:27 +1100
commitb32550a87edcbd71d1084eec76c316161066bb06 (patch)
treee8ad7fd5fd209adca67d6f4a9304da44116f99a1 /src/server/check.odin
parent92b8c767d233c6556ebf46072f32a02d06277363 (diff)
Update ols to use the new os and filepath packages
Diffstat (limited to 'src/server/check.odin')
-rw-r--r--src/server/check.odin15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/server/check.odin b/src/server/check.odin
index 78eb25f..1280b76 100644
--- a/src/server/check.odin
+++ b/src/server/check.odin
@@ -36,24 +36,11 @@ Json_Errors :: struct {
//If the user does not specify where to call odin check, it'll just find all directory with odin, and call them seperately.
fallback_find_odin_directories :: proc(config: ^common.Config) -> []string {
- walk_proc :: proc(info: os.File_Info, in_err: os.Errno, user_data: rawptr) -> (err: os.Errno, skip_dir: bool) {
- data := cast(^[dynamic]string)user_data
-
- if !info.is_dir && filepath.ext(info.name) == ".odin" {
- dir := filepath.dir(info.fullpath, context.temp_allocator)
- if !slice.contains(data[:], dir) {
- append(data, dir)
- }
- }
-
- return in_err, false
- }
-
data := make([dynamic]string, context.temp_allocator)
if len(config.workspace_folders) > 0 {
if uri, ok := common.parse_uri(config.workspace_folders[0].uri, context.temp_allocator); ok {
- filepath.walk(uri.path, walk_proc, &data)
+ append_packages(uri.path, &data, context.temp_allocator)
}
}