Set more options in odinfmt.json
This commit is contained in:
@@ -3,7 +3,10 @@
|
|||||||
"align_struct_fields": true,
|
"align_struct_fields": true,
|
||||||
"align_struct_values": true,
|
"align_struct_values": true,
|
||||||
"character_width": 80,
|
"character_width": 80,
|
||||||
|
"indent_cases": true,
|
||||||
|
"newline_limit": 1,
|
||||||
"newline_style": "LF",
|
"newline_style": "LF",
|
||||||
|
"sort_imports": true,
|
||||||
"space_single_line_blocks": true,
|
"space_single_line_blocks": true,
|
||||||
"tabs": true,
|
"tabs": true,
|
||||||
"tabs_width": 4
|
"tabs_width": 4
|
||||||
|
|||||||
+19
-16
@@ -96,23 +96,26 @@ list_dir_queue :: proc(
|
|||||||
|
|
||||||
for entry in entries {
|
for entry in entries {
|
||||||
#partial switch entry.type {
|
#partial switch entry.type {
|
||||||
case os.File_Type.Directory:
|
case os.File_Type.Directory:
|
||||||
append(queue, strings.clone(entry.fullpath, queue^.allocator))
|
append(queue, strings.clone(entry.fullpath, queue^.allocator))
|
||||||
case os.File_Type.Regular:
|
case os.File_Type.Regular:
|
||||||
{
|
{
|
||||||
relpath, was_allocation := strings.replace(
|
relpath, was_allocation := strings.replace(
|
||||||
entry.fullpath,
|
entry.fullpath,
|
||||||
working_dir,
|
working_dir,
|
||||||
".",
|
".",
|
||||||
1,
|
1,
|
||||||
result^.allocator,
|
result^.allocator,
|
||||||
)
|
)
|
||||||
if !was_allocation {
|
if !was_allocation {
|
||||||
relpath = strings.clone(relpath, result^.allocator)
|
relpath = strings.clone(relpath, result^.allocator)
|
||||||
|
}
|
||||||
|
append(
|
||||||
|
result,
|
||||||
|
FileEntry{relpath = relpath, size = entry.size},
|
||||||
|
)
|
||||||
}
|
}
|
||||||
append(result, FileEntry{relpath = relpath, size = entry.size})
|
case: // skip other types
|
||||||
}
|
|
||||||
case: // skip other types
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user