Skip to content

Commit 0dbf1cc

Browse files
authored
Merge pull request #2911 from GaijinEntertainment/bbatkin/docs-uncategorized-gate
docs: categorize all stdlib functions + CI Uncategorized-gate
2 parents 6c077b4 + ccc60ca commit 0dbf1cc

2 files changed

Lines changed: 31 additions & 15 deletions

File tree

.github/workflows/doc.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,15 @@ jobs:
5959
exit 1
6060
fi
6161
62+
- name: "Check for Uncategorized sections"
63+
run: |
64+
set -eux
65+
if grep -rl '^Uncategorized$' doc/source/stdlib/generated/; then
66+
echo "ERROR: Found Uncategorized sections in generated docs."
67+
echo "Add the function(s) to a group_by_regex() in doc/reflections/das2rst.das."
68+
exit 1
69+
fi
70+
6271
- name: "Check for new untracked RST files"
6372
run: |
6473
set -eux

doc/reflections/das2rst.das

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def document_module_builtin(root : string) {
156156
find_for_edit|find_if_exists|find_index|find_index_if|has_value|key_exists|keys|values|get_key|lock|each_enum|each_ref|
157157
find_for_edit_if_exists|lock_forever|next|nothing|pop|push|push_from|push_clone|push_clone_from|back|sort|to_array|to_table|to_array_move|
158158
to_table_move|empty|subarray|insert|move_to_ref|copy_to_local|move_to_local|get|remove_value|erase_if|resize_and_init|
159-
get_value|insert_clone|emplace_new|insert_default|emplace_default|get_with_default|modify)$%%),
159+
get_value|insert_clone|emplace_new|insert_default|emplace_default|get_with_default|modify|long_length|long_capacity|long_find_index)$%%),
160160
group_by_regex("Character set groups", mod, %regex~(is_alpha|is_number|is_white_space|is_char_in_set)$%%),
161161
group_by_regex("das::string manipulation", mod, %regex~(peek|set)$%%),
162162
group_by_regex("String builder", mod, %regex~(build_string|write|write_char|write_chars|write_escape_string)$%%),
@@ -180,7 +180,7 @@ get_value|insert_clone|emplace_new|insert_default|emplace_default|get_with_defau
180180
group_by_regex("RTTI", mod, %regex~(class_rtti_size)$%%),
181181
hide_group(group_by_regex("Jit", mod,%regex~(invoke_code|.*jit.*)$%%)),
182182
group_by_regex("Initialization and finalization", mod, %regex~(using|clone|finalize)$%%),
183-
group_by_regex("Algorithms", mod, %regex~(swap|iter_range|count|ucount)$%%),
183+
group_by_regex("Algorithms", mod, %regex~(swap|iter_range|count|ucount|long_iter_range)$%%),
184184
group_by_regex("Memset", mod, %regex~(memset.*)$%%),
185185
group_by_regex("Malloc", mod, %regex~(malloc|free|malloc_usable_size)$%%),
186186
group_by_regex("Compilation and AOT", mod, %regex~(is_aot_enabled|set_aot|reset_aot|compiling_file_name|compiling_module_name|get_module_file_name)$%%),
@@ -289,7 +289,7 @@ def document_module_rtti(root : string) {
289289
group_by_regex("Compilation and simulation", mod, %regex~(compile|compile_file|for_each_expected_error|for_each_require_declaration|simulate|create_ast_serializer|create_ast_deserializer|delete_ast_serializer|serialize_program|deserialize_program|ast_serializer_get_data)$%%),
290290
group_by_regex("File access", mod, %regex~(make_file_access|set_file_source|add_file_access_root|add_extra_module)$%%),
291291
group_by_regex("Structure access", mod, %regex~(rtti_builtin_structure_for_each_annotation|basic_struct_for_each_field|structure_for_each_annotation|basic_struct_for_each_parent)$%%),
292-
group_by_regex("Data walking and printing", mod, %regex~(sprint_data|describe|get_mangled_name)$%%),
292+
group_by_regex("Data walking and printing", mod, %regex~(sprint_data|sprint_json_at|sscan_json_at|describe|get_mangled_name)$%%),
293293
group_by_regex("Function and mangled name hash", mod, %regex~(get_function_by_mangled_name_hash|get_function_mangled_name_hash|get_function_address)$%%),
294294
group_by_regex("Context and mutex locking", mod, %regex~(lock_this_context|lock_context|lock_mutex)$%%),
295295
group_by_regex("Runtime data access", mod, %regex~(get_table_key_index)$%%),
@@ -400,7 +400,7 @@ def document_module_functional(root : string) {
400400
group_by_regex("Transformations", mod, %regex~(filter|map|flat_map|flatten|sorted|scan)$%%),
401401
group_by_regex("Aggregation", mod, %regex~(reduce|reduce_or_default|fold|sum|any|all|count)$%%),
402402
group_by_regex("Search and split", mod, %regex~(find|find_index|partition)$%%),
403-
group_by_regex("Iteration", mod, %regex~(for_each|tap|echo|enumerate)$%%),
403+
group_by_regex("Iteration", mod, %regex~(for_each|tap|echo|enumerate|long_enumerate)$%%),
404404
group_by_regex("Generators", mod, %regex~(repeat_ref|repeat|cycle|iterate|chain|pairwise|islice)$%%),
405405
group_by_regex("Predicates", mod, %regex~(is_equal|is_not_equal|not)$%%)
406406
)
@@ -625,7 +625,7 @@ def document_module_templates_boost(root : string) {
625625
group_by_regex("Template application", mod, %regex~(apply_template)$%%),
626626
group_by_regex("Expression helpers", mod, %regex~(remove_deref|visit_expression|expression_at)$%%),
627627
group_by_regex("Expression generation", mod, %regex~(make_expression_block)$%%),
628-
group_by_regex("Block helpers", mod, %regex~(unquote_block|move_unquote_block)$%%),
628+
group_by_regex("Block helpers", mod, %regex~(unquote_block|move_unquote_block|push_block_list)$%%),
629629
group_by_regex("Global variable helpers", mod, %regex~(add_global_var|add_global_let|add_global_private_var|add_global_private_let)$%%),
630630
group_by_regex("Hygienic names", mod, %regex~(make_unique_private_name)$%%),
631631
group_by_regex("Quoting macros", mod, %regex~(apply_qmacro|apply_qblock|apply_qblock_to_array|apply_qblock_expr|apply_qtype|apply_qmacro_function|apply_qmacro_method|apply_qmacro_variable|apply_qmacro_template_class|apply_qmacro_template_function)$%%),
@@ -756,14 +756,16 @@ def document_module_ast_match(root : string) {
756756
var mod = find_module("ast_match")
757757
var groups <- array<DocGroup>(
758758
group_by_regex("Match execution", mod, %regex~.*(qm_run|qm_run_function)$%%),
759+
group_by_regex("Call matching", mod, %regex~.*(match_call_in_module|match_call_in_linq)$%%),
759760
group_by_regex("Result builders", mod, %regex~.*(qm_ok|qm_fail_.*)$%%),
760-
group_by_regex("Value extraction", mod, %regex~.*(qm_extract)$%%),
761+
group_by_regex("Value extraction", mod, %regex~.*(qm_extract|extract_const_string)$%%),
761762
group_by_regex("Name and type extraction", mod, %regex~.*(qm_extract_name|qm_extract_call_name|qm_extract_field_name|qm_extract_type|qm_rtti|qm_call_name_matches)$%%),
762763
group_by_regex("Argument filtering", mod, %regex~.*(qm_count_real_args|qm_real_arg_index|qm_extract_remaining_args|qm_is_fake_arg|qm_count_real_call_args|qm_real_call_arg_index)$%%),
763764
group_by_regex("Block scanning", mod, %regex~.*(qm_scan|qm_extract_stmts)$%%),
764765
group_by_regex("Constant construction", mod, %regex~.*(qm_make_zero_const)$%%),
765766
group_by_regex("AST reconstruction", mod, %regex~.*(qm_convert_local_function|qm_resolve_local_function|qm_convert_comprehension|qm_resolve_comprehension)$%%),
766-
group_by_regex("AST normalization", mod, %regex~.*(qm_peel_ref2value)$%%)
767+
group_by_regex("AST normalization", mod, %regex~.*(qm_peel_ref2value|peel_lambda.*|peel_tuple_field_read)$%%),
768+
group_by_regex("Hygienic names", mod, %regex~.*(qn)$%%)
767769
)
768770
document("AST pattern matching", mod, "ast_match.rst", groups)
769771
}
@@ -842,7 +844,7 @@ def document_module_enum_trait(root : string) {
842844
var mod = find_module("enum_trait")
843845
var groups <- array<DocGroup>(
844846
group_by_regex("Enumeration iteration", mod, %regex~(each|each_name|find_value)$%%),
845-
group_by_regex("Enumeration conversion", mod, %regex~(string|to_enum|enum_to_table)$%%)
847+
group_by_regex("Enumeration conversion", mod, %regex~(string|to_enum|enum_to_table|bool|\!)$%%)
846848
)
847849
document("Enumeration traits", mod, "enum_trait.rst", groups)
848850
}
@@ -860,7 +862,7 @@ def document_module_decs(root : string) {
860862
var groups <- array<DocGroup>(
861863
group_by_regex("Comparison and access", mod, %regex~(\=\=|\!\=|\.)$%%),
862864
group_by_regex("Access (get/set/clone)", mod, %regex~(has|get|set|set_direct|set_direct_at|clone|remove|get_component|find_component_index)$%%),
863-
group_by_regex("Entity status", mod, %regex~(is_alive|entity_count)$%%),
865+
group_by_regex("Entity status", mod, %regex~(is_alive|entity_count|long_entity_count)$%%),
864866
group_by_regex("Debug and serialization", mod, %regex~(describe|serialize|finalize|debug_dump.*)$%%),
865867
group_by_regex("Stages", mod, %regex~(register_decs_stage_call|decs_stage|commit)$%%),
866868
group_by_regex("Deferred actions", mod, %regex~(update_entity|create_entity|create_entities|create_entities_from_cmp|delete_entity)$%%),
@@ -894,7 +896,8 @@ def document_module_macro_boost(root : string) {
894896
var mod = find_module("macro_boost")
895897
var groups <- array<DocGroup>(
896898
group_by_regex("Implementation details", mod, %regex~(macro_verify)$%%),
897-
group_by_regex("Block analysis", mod, %regex~(capture_block|collect_finally|collect_labels)$%%)
899+
group_by_regex("Block analysis", mod, %regex~(capture_block|collect_finally|collect_labels)$%%),
900+
group_by_regex("Expression analysis", mod, %regex~(has_sideeffects)$%%)
898901
)
899902
document("Boost package for macro manipulations", mod, "macro_boost.rst", groups)
900903
}
@@ -958,7 +961,7 @@ def document_module_linq(root : string) {
958961
var mod = find_module("linq")
959962
var groups <- array<DocGroup>(
960963
group_by_regex("Sorting data", mod, %regex~(reverse.*|order.*)$%%),
961-
group_by_regex("Top-N selection", mod, %regex~(top_n.*)$%%),
964+
group_by_regex("Top-N selection", mod, %regex~(top_n.*|spliced_push_heap|spliced_pop_heap)$%%),
962965
group_by_regex("Set operations", mod, %regex~(distinct.*|union.*|intersect.*|except.*|unique.*)$%%),
963966
group_by_regex("Concatenation operations", mod, %regex~(concat.*|append.*|prepend.*)$%%),
964967
group_by_regex("Generation operations", mod, %regex~(default_empty|repeat|empty|range_sequence)$%%),
@@ -986,7 +989,10 @@ def document_module_linq_boost(root : string) {
986989

987990
def document_module_linq_fold(root : string) {
988991
var mod = find_module("linq_fold")
989-
var groups : array<DocGroup>
992+
var groups <- array<DocGroup>(
993+
group_by_regex("Pattern slot construction", mod, %regex~(m_literal|m_alias|c_one|c_opt|c_chain|slot_chain_of)$%%),
994+
group_by_regex("Pattern table validation", mod, %regex~(chain_prefix_of|check_pattern_table_reachable)$%%)
995+
)
990996
document("LINQ fold macros (_fold / _old_fold)", mod, "linq_fold.rst", groups)
991997
}
992998

@@ -1161,7 +1167,7 @@ def document_module_lint(root : string) {
11611167
def document_module_lint_config(root : string) {
11621168
var mod = find_module("lint_config")
11631169
var groups <- array<DocGroup>(
1164-
group_by_regex("Configuration", mod, %regex~(load_lint_config|load_lint_config_from_path|seed_default_disabled)$%%)
1170+
group_by_regex("Configuration", mod, %regex~(load_lint_config|load_lint_config_from_path|seed_default_disabled|build_lint_macro_disabled)$%%)
11651171
)
11661172
document("Repo-level lint configuration", mod, "lint_config.rst", groups)
11671173
}
@@ -1409,12 +1415,13 @@ def document_module_audio_boost(root : string) {
14091415
var groups <- array<DocGroup>(
14101416
group_by_regex("Audio system lifecycle", mod, %regex~(with_audio_system|audio_system_create|audio_system_finalize|audio_system_release_context)$%%),
14111417
group_by_regex("Sound playback", mod, %regex~(play_sound|play_3d_sound)%%),
1412-
group_by_regex("Sound control", mod, %regex~(set_volume|set_pan|set_pitch|set_pause|set_global_pitch|set_global_pause|stop|set_playback_position)$%%),
1418+
group_by_regex("Sound control", mod, %regex~(set_volume|set_pan|set_pitch|set_pause|set_global_pitch|set_global_pause|set_global_volume|set_ignore_global_volume|stop|set_playback_position)$%%),
14131419
group_by_regex("3D audio", mod, %regex~(set_head_position|set_position)$%%),
1420+
group_by_regex("HRTF", mod, %regex~(hrtf_budget_classify|set_hrtf_budget)$%%),
14141421
group_by_regex("Reverb", mod, %regex~(set_reverb|set_reverb_preset)$%%),
14151422
group_by_regex("Chorus", mod, %regex~(set_chorus|set_chorus_default)$%%),
14161423
group_by_regex("Attenuation", mod, %regex~(compute_attenuation|default_attenuation|inverse_distance_attenuation|linear_attenuation|quadratic_attenuation|inverse_square_attenuation)$%%),
1417-
group_by_regex("Status monitoring", mod, %regex~(set_status_update|clear_status|unset_status_update)$%%),
1424+
group_by_regex("Status monitoring", mod, %regex~(set_status_update|clear_status|unset_status_update|set_audio_stats_box)$%%),
14181425
group_by_regex("Command batching", mod, %regex~(begin_batch|end_batch|batch)$%%),
14191426
group_by_regex("PCM stream", mod, %regex~(append_to_pcm|append_box_to_pcm)$%%),
14201427
group_by_regex("Decoding", mod, %regex~(decode_audio)$%%),

0 commit comments

Comments
 (0)