@@ -66,8 +66,7 @@ static int is_kustomize_list_key(const char *key) {
6666
6767// Walk a block_sequence node and emit one CBMImport per block_sequence_item
6868// scalar child, using key_name as the local_name.
69- static void emit_kustomize_sequence (CBMExtractCtx * ctx , TSNode seq_node ,
70- const char * key_name ) {
69+ static void emit_kustomize_sequence (CBMExtractCtx * ctx , TSNode seq_node , const char * key_name ) {
7170 CBMArena * a = ctx -> arena ;
7271 uint32_t n = ts_node_child_count (seq_node );
7372 for (uint32_t i = 0 ; i < n ; i ++ ) {
@@ -84,7 +83,7 @@ static void emit_kustomize_sequence(CBMExtractCtx *ctx, TSNode seq_node,
8483 continue ;
8584 }
8685 CBMImport imp = {
87- .local_name = cbm_arena_strdup (a , key_name ),
86+ .local_name = cbm_arena_strdup (a , key_name ),
8887 .module_path = cbm_arena_strdup (a , scalar ),
8988 };
9089 cbm_imports_push (& ctx -> result -> imports , a , imp );
@@ -157,11 +156,10 @@ static void extract_kustomize(CBMExtractCtx *ctx) {
157156
158157// Descend into the first block_mapping of a document and extract apiVersion,
159158// kind, and metadata.name. Returns void; fills kind_buf and meta_name_buf.
160- static void extract_k8s_scalars (CBMExtractCtx * ctx , TSNode mapping ,
161- char * kind_buf , size_t kind_sz ,
162- char * meta_name_buf , size_t meta_sz ) {
159+ static void extract_k8s_scalars (CBMExtractCtx * ctx , TSNode mapping , char * kind_buf , size_t kind_sz ,
160+ char * meta_name_buf , size_t meta_sz ) {
163161 CBMArena * a = ctx -> arena ;
164- kind_buf [0 ] = '\0' ;
162+ kind_buf [0 ] = '\0' ;
165163 meta_name_buf [0 ] = '\0' ;
166164
167165 uint32_t n = ts_node_child_count (mapping );
@@ -255,7 +253,7 @@ static void extract_k8s_manifest(CBMExtractCtx *ctx) {
255253 continue ;
256254 }
257255
258- char kind_buf [256 ] = {0 };
256+ char kind_buf [256 ] = {0 };
259257 char meta_name_buf [256 ] = {0 };
260258 extract_k8s_scalars (ctx , mapping , kind_buf , sizeof (kind_buf ), meta_name_buf ,
261259 sizeof (meta_name_buf ));
@@ -269,12 +267,12 @@ static void extract_k8s_manifest(CBMExtractCtx *ctx) {
269267 snprintf (def_name , sizeof (def_name ), "%s/%s" , kind_buf , meta_name_buf );
270268
271269 CBMDefinition def = {0 };
272- def .name = cbm_arena_strdup (a , def_name );
270+ def .name = cbm_arena_strdup (a , def_name );
273271 def .qualified_name = cbm_arena_sprintf (a , "%s.%s" , ctx -> module_qn , def_name );
274- def .label = "Resource" ;
275- def .file_path = ctx -> rel_path ;
276- def .start_line = ts_node_start_point (mapping ).row + 1 ;
277- def .end_line = ts_node_end_point (mapping ).row + 1 ;
272+ def .label = "Resource" ;
273+ def .file_path = ctx -> rel_path ;
274+ def .start_line = ts_node_start_point (mapping ).row + 1 ;
275+ def .end_line = ts_node_end_point (mapping ).row + 1 ;
278276 cbm_defs_push (& ctx -> result -> defs , a , def );
279277
280278 break ; // Only the first document per file
0 commit comments