REQ-DDB-GUARD-018: Function detection

← Requirements

What it requires

  1. Functions matched by pattern with correct name capture; excludes filtered; forward declarations skipped
tier
PASS
declared
implemented
priority
P1

Where it lives

  • Guard: the pre-commit gate4

See it on the map

How it is met

implemented byresults (172 tests)parse_content_for_fileparse_functionsparse_source_fileparse_source_file_with_content172 passed172 tests, a summary by result: every test is in the tests table below

Show on the map

Implemented by

Tests (172)

Linked directly

168 tests: 168 passed

168 passed
testresultlinked byimplementers exercisedcalls away
test_a_checked_tree_says_nothing_extrapassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content—
test_a_clean_repo_passespassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content—
test_a_configured_language_is_not_reportedpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content—
test_a_namespaced_satisfies_id_resolves_by_its_bare_idpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content—
test_a_non_void_return_type_on_its_own_line_still_needs_onepassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content—
test_a_pinned_external_catalogue_is_read_at_its_revisionpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content—
test_a_symlinked_impact_directory_is_refusedpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content—
test_a_tag_with_no_catalogue_to_check_it_is_reportedpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content—
test_a_void_return_type_on_its_own_line_needs_no_return_tagpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content—
test_an_excluded_file_is_counted_as_not_checkedpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content—
test_an_external_catalogue_satisfies_cross_reference_without_a_local_onepassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content—
test_custom_configpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content—
test_default_subcommand_with_filespassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content—
test_impact_no_files_returns_0passedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content—
test_literal_version_resolvespassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content—
test_precommit_mode_flags_a_stale_rust_functionpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content—
test_precommit_with_impactpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content—
test_the_gate_refuses_a_satisfies_id_no_catalogue_holdspassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content—
test_the_pre_commit_hook_runs_the_coverage_gatepassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content—
test_validate_clean_filepassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content—
test_validate_dirty_filepassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content—
test_validate_writes_the_format_to_stdout_and_keeps_the_exit_codepassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content—
test_verbose_flagpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content—
test_a_non_source_file_stays_silentpassedmeasured3 of 4: parse_content_for_file, parse_source_file, parse_source_file_with_content—
test_a_ratio_at_or_above_the_floor_passespassedmeasured3 of 4: parse_content_for_file, parse_functions, parse_source_file_with_content—
test_a_ratio_below_the_declared_floor_failspassedmeasured3 of 4: parse_content_for_file, parse_functions, parse_source_file_with_content—
test_an_opt_in_language_left_unconfigured_is_namedpassedmeasured3 of 4: parse_content_for_file, parse_source_file, parse_source_file_with_content—
test_the_counts_are_printed_and_tests_are_left_outpassedmeasured3 of 4: parse_content_for_file, parse_functions, parse_source_file_with_content—
test_unchanged_ifdef_else_duplicate_is_cleanpassedmeasured1 of 4: parse_functions—
test_guard_knows_the_tag_and_refuses_an_undeclared_idpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content1
test_guard_refuses_a_marker_naming_an_undeclared_modepassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content1
test_unsupported_extension_returns_nonepassedmeasured3 of 4: parse_content_for_file, parse_source_file, parse_source_file_with_content1
test_staleness_detects_an_unbumped_rust_bodypassedmeasured2 of 4: parse_content_for_file, parse_functions1
test_a_broken_toolchain_file_is_reported_not_fatalpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_all_checks_runpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_clew_specific_ignores_apply_to_the_gatepassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_decorative_triggers_presence_violationpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_docstring_satisfies_req_tagpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_docstring_tags_satisfy_presencepassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_documented_file_no_violationspassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_excluded_path_is_absent_and_gate_skips_itpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_fixture_violationspassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_fully_documented_pythonpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_inner_doc_satisfies_the_file_block_without_at_filepassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_javascript_extensionspassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_missing_file_block_suggests_inner_docpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_nested_lookalike_path_agreespassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_no_false_positivespassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_no_false_positives_with_attributespassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_only_definitions_checkedpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_presence_message_c_style_for_c_filepassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_presence_message_includes_return_for_non_voidpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_presence_message_omits_return_for_voidpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_presence_message_python_stylepassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_require_return_bites_only_on_valued_annotationspassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_return_is_not_required_for_rustpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_return_requirement_can_be_turned_back_onpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_toolchain_ignore_paths_skip_validationpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_tsx_file_uses_typescript_configpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_validate_file_pythonpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_violationspassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_without_toolchain_files_everything_is_checkedpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_opt_inpassedmeasured3 of 4: parse_content_for_file, parse_source_file, parse_source_file_with_content2
test_rust_is_opt_inpassedmeasured3 of 4: parse_content_for_file, parse_source_file, parse_source_file_with_content2
test_unknown_extension_skippedpassedmeasured3 of 4: parse_content_for_file, parse_source_file, parse_source_file_with_content2
test_a_blank_line_inside_the_run_ends_the_blockpassedmeasured1 of 4: parse_functions2
test_block_lines_are_zero_indexed_and_inclusivepassedmeasured1 of 4: parse_functions2
test_cfg_test_module_is_not_gatedpassedmeasured1 of 4: parse_functions2
test_doc_reaches_across_attributespassedmeasured1 of 4: parse_functions2
test_explicit_brief_wins_over_summarypassedmeasured1 of 4: parse_functions2
test_fixture_functions_and_blockspassedmeasured1 of 4: parse_functions2
test_functions_found_and_namedpassedmeasured1 of 4: parse_functions2
test_generic_impl_names_its_self_typepassedmeasured1 of 4: parse_functions2
test_jsdoc_is_found_above_export_and_constpassedmeasured1 of 4: parse_functions2
test_non_outer_doc_comments_are_not_blockspassedmeasured1 of 4: parse_functions2
test_plain_comment_is_not_jsdocpassedmeasured1 of 4: parse_functions2
test_return_annotation_decides_voidpassedmeasured1 of 4: parse_functions2
test_summary_is_the_briefpassedmeasured1 of 4: parse_functions2
test_summary_paragraph_is_the_briefpassedmeasured1 of 4: parse_functions2
test_test_functions_are_not_gatedpassedmeasured1 of 4: parse_functions2
test_tsx_parses_jsxpassedmeasured1 of 4: parse_functions2
test_a_cpp_member_declaration_is_checked_toopassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content3
test_a_dead_req_on_a_documented_declaration_is_refusedpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content3
test_a_declaration_does_not_need_its_own_reqpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content3
test_a_documented_declaration_needs_its_versionpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content3
test_an_undocumented_declaration_is_not_a_findingpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content3
test_class_level_block_does_not_leak_to_first_methodpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content3
test_covering_tests_are_read_from_the_test_treepassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content3
test_excludes_are_globs_and_a_regex_says_sopassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content3
test_first_method_after_class_docstring_still_foundpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content3
test_first_method_directly_after_class_linepassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content3
test_later_method_still_foundpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content3
test_nested_class_first_methodpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content3
test_arbitrary_tags_are_parsedpassedmeasured1 of 4: parse_functions3
test_async_def_detectedpassedmeasured1 of 4: parse_functions3
test_attribute_inlinepassedmeasured1 of 4: parse_functions3
test_attribute_unusedpassedmeasured1 of 4: parse_functions3
test_attribute_visibility_hiddenpassedmeasured1 of 4: parse_functions3
test_bad_tags_all_failpassedmeasured1 of 4: parse_functions3
test_block_above_takes_precedence_over_docstringpassedmeasured1 of 4: parse_functions3
test_body_end_trackingpassedmeasured1 of 4: parse_functions3
test_braces_in_strings_body_endpassedmeasured1 of 4: parse_functions3
test_class_level_block_does_not_leak_to_first_memberpassedmeasured1 of 4: parse_functions3
test_class_qualified_methodpassedmeasured1 of 4: parse_functions3
test_cpp_fixture_filepassedmeasured1 of 4: parse_functions3
test_custom_tag_single_linepassedmeasured1 of 4: parse_functions3
test_decorative_not_treated_as_doxygenpassedmeasured1 of 4: parse_functions3
test_docstring_tags_via_regex_parserpassedmeasured1 of 4: parse_functions3
test_double_star_still_matchespassedmeasured1 of 4: parse_functions3
test_doxygen_associated_correctlypassedmeasured1 of 4: parse_functions3
test_empty_docstring_is_not_a_blockpassedmeasured1 of 4: parse_functions3
test_exclude_namespassedmeasured1 of 4: parse_functions3
test_extern_c_linkagepassedmeasured1 of 4: parse_functions3
test_file_tag_in_prose_does_not_suppress_the_blockpassedmeasured1 of 4: parse_functions3
test_finds_all_functionspassedmeasured1 of 4: parse_functions3
test_first_member_after_access_specifierpassedmeasured1 of 4: parse_functions3
test_first_member_with_no_access_specifierpassedmeasured1 of 4: parse_functions3
test_first_method_version_is_its_ownpassedmeasured1 of 4: parse_functions3
test_forward_declarations_are_always_skippedpassedmeasured1 of 4: parse_functions3
test_forward_declarations_skippedpassedmeasured1 of 4: parse_functions3
test_good_tags_all_passpassedmeasured1 of 4: parse_functions3
test_inline_typedef_returnpassedmeasured1 of 4: parse_functions3
test_lowercase_typedef_returnpassedmeasured1 of 4: parse_functions3
test_modified_overload_flags_only_that_overloadpassedmeasured1 of 4: parse_functions3
test_multiline_attribute_is_handled_correctlypassedmeasured1 of 4: parse_functions3
test_multiline_tagspassedmeasured1 of 4: parse_functions3
test_namespaced_return_typepassedmeasured1 of 4: parse_functions3
test_prose_docstring_is_the_block_and_its_summary_the_briefpassedmeasured1 of 4: parse_functions3
test_regular_comment_not_doxygenpassedmeasured1 of 4: parse_functions3
test_simple_c_filepassedmeasured1 of 4: parse_functions3
test_single_line_docstring_with_tagspassedmeasured1 of 4: parse_functions3
test_single_line_doxygenpassedmeasured1 of 4: parse_functions3
test_stale_version_detectedpassedmeasured1 of 4: parse_functions3
test_static_macro_qualifierpassedmeasured1 of 4: parse_functions3
test_struct_qualified_returnpassedmeasured1 of 4: parse_functions3
test_tags_parsed_correctlypassedmeasured1 of 4: parse_functions3
test_three_tags_single_linepassedmeasured1 of 4: parse_functions3
test_triple_hash_not_doxygenpassedmeasured1 of 4: parse_functions3
test_typedef_pointer_returnpassedmeasured1 of 4: parse_functions3
test_unbalanced_string_brace_is_handled_correctlypassedmeasured1 of 4: parse_functions3
test_undocumented_definition_after_declpassedmeasured1 of 4: parse_functions3
test_undocumented_detectedpassedmeasured1 of 4: parse_functions3
test_undocumented_typedef_detectedpassedmeasured1 of 4: parse_functions3
test_unmodified_overloads_no_violationpassedmeasured1 of 4: parse_functions3
test_updated_version_no_violationpassedmeasured1 of 4: parse_functions3
test_weak_macro_qualifierpassedmeasured1 of 4: parse_functions3
test_finds_changed_functionpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content4
test_a_requirement_implemented_by_a_dependency_at_its_pin_is_covered_via_itpassedmeasured3 of 4: parse_content_for_file, parse_functions, parse_source_file_with_content4
test_an_exempt_status_is_listed_not_counted_as_a_gappassedmeasured3 of 4: parse_content_for_file, parse_functions, parse_source_file_with_content4
test_analyze_coverage_structurepassedmeasured3 of 4: parse_content_for_file, parse_functions, parse_source_file_with_content4
test_coverage_treats_a_declaration_and_its_definition_as_onepassedmeasured3 of 4: parse_content_for_file, parse_functions, parse_source_file_with_content4
test_off_by_default_nothing_changespassedmeasured3 of 4: parse_content_for_file, parse_functions, parse_source_file_with_content4
test_without_exempt_status_nothing_is_exemptpassedmeasured3 of 4: parse_content_for_file, parse_functions, parse_source_file_with_content4
test_a_changed_signature_with_a_bump_is_cleanpassedmeasured1 of 4: parse_functions4
test_a_changed_signature_without_a_bump_is_stalepassedmeasured1 of 4: parse_functions4
test_added_copy_leaves_existing_copies_cleanpassedmeasured1 of 4: parse_functions4
test_an_overload_set_keeps_the_exact_matchpassedmeasured1 of 4: parse_functions4
test_dg_internal_is_refused_naming_its_replacementpassedmeasured1 of 4: parse_functions4
test_first_copy_edited_with_bump_is_cleanpassedmeasured1 of 4: parse_functions4
test_first_copy_edited_without_bump_differing_versions_is_flaggedpassedmeasured1 of 4: parse_functions4
test_removed_copy_leaves_remaining_copy_cleanpassedmeasured1 of 4: parse_functions4
test_second_copy_edited_without_bump_is_flagged_alonepassedmeasured1 of 4: parse_functions4
test_the_refusal_survives_known_tags_warn_offpassedmeasured1 of 4: parse_functions4
test_unchanged_separate_ifdef_blocks_are_cleanpassedmeasured1 of 4: parse_functions4
test_utility_is_acceptedpassedmeasured1 of 4: parse_functions4
test_a_range_with_no_files_reads_the_files_the_range_changedpassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content5
test_full_pipelinepassedmeasured4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content5
test_with_every_gap_exempt_the_gate_passes_and_still_names_thempassedmeasured3 of 4: parse_content_for_file, parse_functions, parse_source_file_with_content5
Reached through calls

4 tests: 4 passed

4 passed
testresultlinked byimplementers exercisedcalls away
test_binary_named_as_source_is_skippedpassedinferred4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_excluded_filepassedinferred4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content2
test_a_submodule_in_the_range_is_an_unmapped_file_never_openedpassedinferred4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content3
test_no_change_no_resultpassedinferred4 of 4: parse_content_for_file, parse_functions, parse_source_file, parse_source_file_with_content4

Flows through it