REQ-DDB-GUARD-005: Return tag enforcement

← Requirements

What it requires

  1. Non-void functions without a return tag produce violations; void functions and exemption-tagged functions are exempt; require_return config controls enforcement
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 (84 tests)_is_rust_unit_fn_is_void_function_require_returncheck_return_presence84 passed84 tests, a summary by result: every test is in the tests table below

Show on the map

Implemented by

Tests (84)

Linked directly

64 tests: 64 passed

64 passed
testresultlinked byimplementers exercisedcalls away
test_a_checked_tree_says_nothing_extrapassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence—
test_a_configured_language_is_not_reportedpassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence—
test_a_namespaced_satisfies_id_resolves_by_its_bare_idpassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence—
test_a_non_void_return_type_on_its_own_line_still_needs_onepassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence—
test_a_pinned_external_catalogue_is_read_at_its_revisionpassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence—
test_a_symlinked_impact_directory_is_refusedpassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence—
test_a_tag_with_no_catalogue_to_check_it_is_reportedpassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence—
test_a_void_return_type_on_its_own_line_needs_no_return_tagpassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence—
test_an_external_catalogue_satisfies_cross_reference_without_a_local_onepassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence—
test_default_subcommand_with_filespassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence—
test_literal_version_resolvespassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence—
test_precommit_with_impactpassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence—
test_the_gate_refuses_a_satisfies_id_no_catalogue_holdspassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence—
test_the_pre_commit_hook_runs_the_coverage_gatepassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence—
test_validate_clean_filepassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence—
test_validate_dirty_filepassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence—
test_validate_writes_the_format_to_stdout_and_keeps_the_exit_codepassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence—
test_verbose_flagpassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence—
test_a_clean_repo_passespassedmeasured2 of 4: _require_return, check_return_presence—
test_an_excluded_file_is_counted_as_not_checkedpassedmeasured2 of 4: _require_return, check_return_presence—
test_custom_configpassedmeasured2 of 4: _require_return, check_return_presence—
test_precommit_mode_flags_a_stale_rust_functionpassedmeasured2 of 4: _require_return, check_return_presence—
test_constructor_skipped_for_return_checkpassedmeasured2 of 4: _require_return, check_return_presence1
test_destructor_skipped_for_return_checkpassedmeasured2 of 4: _require_return, check_return_presence1
test_fixture_violationspassedmeasured4 of 4: _is_rust_unit_fn, _is_void_function, _require_return, check_return_presence2
test_inner_doc_satisfies_the_file_block_without_at_filepassedmeasured4 of 4: _is_rust_unit_fn, _is_void_function, _require_return, check_return_presence2
test_return_is_not_required_for_rustpassedmeasured4 of 4: _is_rust_unit_fn, _is_void_function, _require_return, check_return_presence2
test_return_requirement_can_be_turned_back_onpassedmeasured4 of 4: _is_rust_unit_fn, _is_void_function, _require_return, check_return_presence2
test_a_broken_toolchain_file_is_reported_not_fatalpassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence2
test_all_checks_runpassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence2
test_clew_specific_ignores_apply_to_the_gatepassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence2
test_decorative_triggers_presence_violationpassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence2
test_docstring_satisfies_req_tagpassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence2
test_documented_file_no_violationspassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence2
test_excluded_path_is_absent_and_gate_skips_itpassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence2
test_fully_documented_pythonpassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence2
test_javascript_extensionspassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence2
test_nested_lookalike_path_agreespassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence2
test_no_false_positivespassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence2
test_no_false_positives_with_attributespassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence2
test_only_definitions_checkedpassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence2
test_presence_message_c_style_for_c_filepassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence2
test_presence_message_includes_return_for_non_voidpassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence2
test_presence_message_omits_return_for_voidpassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence2
test_presence_message_python_stylepassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence2
test_require_return_bites_only_on_valued_annotationspassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence2
test_toolchain_ignore_paths_skip_validationpassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence2
test_tsx_file_uses_typescript_configpassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence2
test_validate_file_pythonpassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence2
test_violationspassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence2
test_without_toolchain_files_everything_is_checkedpassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence2
test_docstring_tags_satisfy_presencepassedmeasured2 of 4: _require_return, check_return_presence2
test_missing_file_block_suggests_inner_docpassedmeasured2 of 4: _require_return, check_return_presence2
test_class_level_block_does_not_leak_to_first_methodpassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence3
test_excludes_are_globs_and_a_regex_says_sopassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence3
test_first_method_after_class_docstring_still_foundpassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence3
test_first_method_directly_after_class_linepassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence3
test_later_method_still_foundpassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence3
test_nested_class_first_methodpassedmeasured3 of 4: _is_void_function, _require_return, check_return_presence3
test_a_cpp_member_declaration_is_checked_toopassedmeasured2 of 4: _require_return, check_return_presence3
test_a_dead_req_on_a_documented_declaration_is_refusedpassedmeasured2 of 4: _require_return, check_return_presence3
test_a_declaration_does_not_need_its_own_reqpassedmeasured2 of 4: _require_return, check_return_presence3
test_a_documented_declaration_needs_its_versionpassedmeasured2 of 4: _require_return, check_return_presence3
test_an_undocumented_declaration_is_not_a_findingpassedmeasured2 of 4: _require_return, check_return_presence3
Reached through calls

20 tests: 20 passed

20 passed
testresultlinked byimplementers exercisedcalls away
test_binary_named_as_source_is_skippedpassedinferred4 of 4: _is_rust_unit_fn, _is_void_function, _require_return, check_return_presence2
test_excluded_filepassedinferred4 of 4: _is_rust_unit_fn, _is_void_function, _require_return, check_return_presence2
test_opt_inpassedinferred4 of 4: _is_rust_unit_fn, _is_void_function, _require_return, check_return_presence2
test_rust_is_opt_inpassedinferred4 of 4: _is_rust_unit_fn, _is_void_function, _require_return, check_return_presence2
test_unknown_extension_skippedpassedinferred4 of 4: _is_rust_unit_fn, _is_void_function, _require_return, check_return_presence2
test_configured_tag_satisfies_presencepassedinferred2 of 4: _is_rust_unit_fn, _is_void_function2
test_default_remains_versionpassedinferred2 of 4: _is_rust_unit_fn, _is_void_function2
test_line_numbers_1_indexedpassedinferred2 of 4: _is_rust_unit_fn, _is_void_function2
test_missing_both_tagspassedinferred2 of 4: _is_rust_unit_fn, _is_void_function2
test_missing_briefpassedinferred2 of 4: _is_rust_unit_fn, _is_void_function2
test_missing_brief_has_fix_hintpassedinferred2 of 4: _is_rust_unit_fn, _is_void_function2
test_missing_configured_tag_is_reported_by_that_namepassedinferred2 of 4: _is_rust_unit_fn, _is_void_function2
test_missing_doxygenpassedinferred2 of 4: _is_rust_unit_fn, _is_void_function2
test_missing_doxygen_has_fix_hintpassedinferred2 of 4: _is_rust_unit_fn, _is_void_function2
test_missing_versionpassedinferred2 of 4: _is_rust_unit_fn, _is_void_function2
test_multiple_functionspassedinferred2 of 4: _is_rust_unit_fn, _is_void_function2
test_no_violations_when_documentedpassedinferred2 of 4: _is_rust_unit_fn, _is_void_function2
test_presence_disabledpassedinferred2 of 4: _is_rust_unit_fn, _is_void_function2
test_undocumented_definition_after_declpassedinferred2 of 4: _is_rust_unit_fn, _is_void_function2
test_version_not_requiredpassedinferred2 of 4: _is_rust_unit_fn, _is_void_function2

Flows through it