REQ-DDB-GUARD-025: JavaScript and TypeScript (JSDoc) functions are gated when a repo declares them

← Requirements

What it requires

  1. With validate.languages.javascript / typescript declared, function and generator declarations, methods, and names bound to an arrow function or function expression (const f = () => ..., a class field) carry a /** */ JSDoc block, found above the export / const around them.
  2. The JSDoc summary satisfies @brief unless @brief is written. @return is not required unless require_return is true, and then only for a TypeScript return annotation other than void, never, undefined or Promise of those.
  3. Anonymous functions and bodiless signatures are not gated; .tsx parses with the JSX-aware grammar.
  4. Undeclared, these files are not checked.
tier
PASS
declared
implemented
priority
P1

Where it lives

  • Guard: the pre-commit gate2

See it on the map

How it is met

implemented byresults (214 tests)_bound_function_js_returns_void214 passed214 tests, a summary by result: every test is in the tests table below

Show on the map

Implemented by

Tests (214)

Linked directly

204 tests: 204 passed

204 passed
testresultlinked byimplementers exercisedcalls away
test_a_body_edit_is_applied_in_place_and_disclosedpassedmeasured1 of 2: _bound_function—
test_a_checked_tree_says_nothing_extrapassedmeasured1 of 2: _bound_function—
test_a_component_wrapped_in_forwardref_or_memo_is_a_definitionpassedmeasured1 of 2: _bound_function—
test_a_configured_language_is_not_reportedpassedmeasured1 of 2: _bound_function—
test_a_dependency_base_does_not_link_to_a_local_classpassedmeasured1 of 2: _bound_function—
test_a_fast_refresh_does_not_poison_the_full_build_that_followspassedmeasured1 of 2: _bound_function—
test_a_full_build_clears_the_fast_recordpassedmeasured1 of 2: _bound_function—
test_a_js_files_module_row_spans_the_new_filepassedmeasured1 of 2: _bound_function—
test_a_mixin_class_extends_its_declared_constraint_typepassedmeasured1 of 2: _bound_function—
test_a_mixin_composed_class_has_its_argument_classes_as_basespassedmeasured1 of 2: _bound_function—
test_a_namespaced_satisfies_id_resolves_by_its_bare_idpassedmeasured1 of 2: _bound_function—
test_a_non_void_return_type_on_its_own_line_still_needs_onepassedmeasured1 of 2: _bound_function—
test_a_pinned_external_catalogue_is_read_at_its_revisionpassedmeasured1 of 2: _bound_function—
test_a_ratio_at_or_above_the_floor_passespassedmeasured1 of 2: _bound_function—
test_a_ratio_below_the_declared_floor_failspassedmeasured1 of 2: _bound_function—
test_a_relative_alias_or_undeclared_base_still_linkspassedmeasured1 of 2: _bound_function—
test_a_removed_function_leaves_no_row_and_no_dangling_referencepassedmeasured1 of 2: _bound_function—
test_a_renamed_function_is_the_old_removed_and_the_new_addedpassedmeasured1 of 2: _bound_function—
test_a_symlinked_impact_directory_is_refusedpassedmeasured1 of 2: _bound_function—
test_a_tag_with_no_catalogue_to_check_it_is_reportedpassedmeasured1 of 2: _bound_function—
test_a_void_return_type_on_its_own_line_needs_no_return_tagpassedmeasured1 of 2: _bound_function—
test_an_added_class_still_takes_the_full_buildpassedmeasured1 of 2: _bound_function—
test_an_added_function_is_refreshed_in_placepassedmeasured1 of 2: _bound_function—
test_an_external_catalogue_satisfies_cross_reference_without_a_local_onepassedmeasured1 of 2: _bound_function—
test_custom_configpassedmeasured1 of 2: _bound_function—
test_default_subcommand_with_filespassedmeasured1 of 2: _bound_function—
test_definitions_functions_and_classespassedmeasured1 of 2: _bound_function—
test_definitions_in_plain_javascript_and_tsxpassedmeasured1 of 2: _bound_function—
test_editing_one_typescript_file_reparses_only_that_filepassedmeasured1 of 2: _bound_function—
test_impact_no_files_returns_0passedmeasured1 of 2: _bound_function—
test_interface_members_are_declarationspassedmeasured1 of 2: _bound_function—
test_literal_version_resolvespassedmeasured1 of 2: _bound_function—
test_mixin_members_are_definitions_of_a_class_named_for_its_bindingpassedmeasured1 of 2: _bound_function—
test_nested_functions_are_definitions_under_their_enclosing_functionpassedmeasured1 of 2: _bound_function—
test_object_literal_functions_are_definitionspassedmeasured1 of 2: _bound_function—
test_precommit_mode_flags_a_stale_rust_functionpassedmeasured1 of 2: _bound_function—
test_precommit_with_impactpassedmeasured1 of 2: _bound_function—
test_the_counts_are_printed_and_tests_are_left_outpassedmeasured1 of 2: _bound_function—
test_the_edited_files_code_text_is_currentpassedmeasured1 of 2: _bound_function—
test_the_edited_files_outgoing_calls_are_currentpassedmeasured1 of 2: _bound_function—
test_the_edited_files_text_layers_are_currentpassedmeasured1 of 2: _bound_function—
test_the_gate_refuses_a_satisfies_id_no_catalogue_holdspassedmeasured1 of 2: _bound_function—
test_the_pre_commit_hook_runs_the_coverage_gatepassedmeasured1 of 2: _bound_function—
test_two_fast_refreshes_of_one_file_match_a_full_buildpassedmeasured1 of 2: _bound_function—
test_typescript_cached_output_matches_no_cachepassedmeasured1 of 2: _bound_function—
test_unchanged_ifdef_else_duplicate_is_cleanpassedmeasured1 of 2: _bound_function—
test_validate_clean_filepassedmeasured1 of 2: _bound_function—
test_validate_dirty_filepassedmeasured1 of 2: _bound_function—
test_validate_writes_the_format_to_stdout_and_keeps_the_exit_codepassedmeasured1 of 2: _bound_function—
test_verbose_flagpassedmeasured1 of 2: _bound_function—
test_the_gate_checks_mixin_members_and_stays_within_the_indexpassedmeasured2 of 2: _bound_function, _js_returns_void3
test_basic_c_functionpassedmeasured1 of 2: _bound_function3
test_basic_python_functionpassedmeasured1 of 2: _bound_function3
test_body_end_linepassedmeasured1 of 2: _bound_function3
test_cloud_fixturepassedmeasured1 of 2: _bound_function3
test_decorated_functionpassedmeasured1 of 2: _bound_function3
test_doxygen_tags_extractedpassedmeasured1 of 2: _bound_function3
test_exclude_namespassedmeasured1 of 2: _bound_function3
test_forward_declaration_excludedpassedmeasured1 of 2: _bound_function3
test_function_without_doxygenpassedmeasured1 of 2: _bound_function3
test_inline_constructorpassedmeasured1 of 2: _bound_function3
test_inline_destructorpassedmeasured1 of 2: _bound_function3
test_method_not_constructorpassedmeasured1 of 2: _bound_function3
test_multiple_functionspassedmeasured1 of 2: _bound_function3
test_out_of_line_constructorpassedmeasured1 of 2: _bound_function3
test_pairing_fixturepassedmeasured1 of 2: _bound_function3
test_python_body_endpassedmeasured1 of 2: _bound_function3
test_python_no_doxygenpassedmeasured1 of 2: _bound_function3
test_standalone_function_no_enclosingpassedmeasured1 of 2: _bound_function3
test_static_functionpassedmeasured1 of 2: _bound_function3
test_struct_constructorpassedmeasured1 of 2: _bound_function3
test_wifi_fixturepassedmeasured1 of 2: _bound_function3
test_functions_found_and_namedpassedmeasured2 of 2: _bound_function, _js_returns_void5
test_jsdoc_is_found_above_export_and_constpassedmeasured2 of 2: _bound_function, _js_returns_void5
test_plain_comment_is_not_jsdocpassedmeasured2 of 2: _bound_function, _js_returns_void5
test_return_annotation_decides_voidpassedmeasured2 of 2: _bound_function, _js_returns_void5
test_summary_is_the_briefpassedmeasured2 of 2: _bound_function, _js_returns_void5
test_tsx_parses_jsxpassedmeasured2 of 2: _bound_function, _js_returns_void5
test_a_blank_line_inside_the_run_ends_the_blockpassedmeasured1 of 2: _bound_function5
test_block_lines_are_zero_indexed_and_inclusivepassedmeasured1 of 2: _bound_function5
test_doc_reaches_across_attributespassedmeasured1 of 2: _bound_function5
test_explicit_brief_wins_over_summarypassedmeasured1 of 2: _bound_function5
test_fixture_functions_and_blockspassedmeasured1 of 2: _bound_function5
test_generic_impl_names_its_self_typepassedmeasured1 of 2: _bound_function5
test_non_outer_doc_comments_are_not_blockspassedmeasured1 of 2: _bound_function5
test_return_is_not_required_for_rustpassedmeasured1 of 2: _bound_function5
test_staleness_detects_an_unbumped_rust_bodypassedmeasured1 of 2: _bound_function5
test_summary_paragraph_is_the_briefpassedmeasured1 of 2: _bound_function5
test_javascript_extensionspassedmeasured2 of 2: _bound_function, _js_returns_void6
test_opt_inpassedcatalog2 of 2: _bound_function, _js_returns_void6
test_require_return_bites_only_on_valued_annotationspassedmeasured2 of 2: _bound_function, _js_returns_void6
test_tsx_file_uses_typescript_configpassedmeasured2 of 2: _bound_function, _js_returns_void6
test_violationspassedmeasured2 of 2: _bound_function, _js_returns_void6
test_a_broken_toolchain_file_is_reported_not_fatalpassedmeasured1 of 2: _bound_function6
test_all_checks_runpassedmeasured1 of 2: _bound_function6
test_arbitrary_tags_are_parsedpassedmeasured1 of 2: _bound_function6
test_async_def_detectedpassedmeasured1 of 2: _bound_function6
test_attribute_inlinepassedmeasured1 of 2: _bound_function6
test_attribute_unusedpassedmeasured1 of 2: _bound_function6
test_attribute_visibility_hiddenpassedmeasured1 of 2: _bound_function6
test_bad_tags_all_failpassedmeasured1 of 2: _bound_function6
test_block_above_takes_precedence_over_docstringpassedmeasured1 of 2: _bound_function6
test_body_end_trackingpassedmeasured1 of 2: _bound_function6
test_braces_in_strings_body_endpassedmeasured1 of 2: _bound_function6
test_class_level_block_does_not_leak_to_first_memberpassedmeasured1 of 2: _bound_function6
test_class_qualified_methodpassedmeasured1 of 2: _bound_function6
test_clew_specific_ignores_apply_to_the_gatepassedmeasured1 of 2: _bound_function6
test_cpp_fixture_filepassedmeasured1 of 2: _bound_function6
test_custom_tag_single_linepassedmeasured1 of 2: _bound_function6
test_decorative_not_treated_as_doxygenpassedmeasured1 of 2: _bound_function6
test_decorative_triggers_presence_violationpassedmeasured1 of 2: _bound_function6
test_docstring_satisfies_req_tagpassedmeasured1 of 2: _bound_function6
test_docstring_tags_satisfy_presencepassedmeasured1 of 2: _bound_function6
test_docstring_tags_via_regex_parserpassedmeasured1 of 2: _bound_function6
test_documented_file_no_violationspassedmeasured1 of 2: _bound_function6
test_double_star_still_matchespassedmeasured1 of 2: _bound_function6
test_doxygen_associated_correctlypassedmeasured1 of 2: _bound_function6
test_empty_docstring_is_not_a_blockpassedmeasured1 of 2: _bound_function6
test_excluded_path_is_absent_and_gate_skips_itpassedmeasured1 of 2: _bound_function6
test_extern_c_linkagepassedmeasured1 of 2: _bound_function6
test_file_tag_in_prose_does_not_suppress_the_blockpassedmeasured1 of 2: _bound_function6
test_finds_all_functionspassedmeasured1 of 2: _bound_function6
test_first_member_after_access_specifierpassedmeasured1 of 2: _bound_function6
test_first_member_with_no_access_specifierpassedmeasured1 of 2: _bound_function6
test_first_method_version_is_its_ownpassedmeasured1 of 2: _bound_function6
test_fixture_violationspassedmeasured1 of 2: _bound_function6
test_forward_declarations_are_always_skippedpassedmeasured1 of 2: _bound_function6
test_forward_declarations_skippedpassedmeasured1 of 2: _bound_function6
test_fully_documented_pythonpassedmeasured1 of 2: _bound_function6
test_good_tags_all_passpassedmeasured1 of 2: _bound_function6
test_inline_typedef_returnpassedmeasured1 of 2: _bound_function6
test_inner_doc_satisfies_the_file_block_without_at_filepassedmeasured1 of 2: _bound_function6
test_lowercase_typedef_returnpassedmeasured1 of 2: _bound_function6
test_missing_file_block_suggests_inner_docpassedmeasured1 of 2: _bound_function6
test_modified_overload_flags_only_that_overloadpassedmeasured1 of 2: _bound_function6
test_multiline_attribute_is_handled_correctlypassedmeasured1 of 2: _bound_function6
test_multiline_tagspassedmeasured1 of 2: _bound_function6
test_namespaced_return_typepassedmeasured1 of 2: _bound_function6
test_nested_lookalike_path_agreespassedmeasured1 of 2: _bound_function6
test_no_false_positivespassedmeasured1 of 2: _bound_function6
test_no_false_positives_with_attributespassedmeasured1 of 2: _bound_function6
test_only_definitions_checkedpassedmeasured1 of 2: _bound_function6
test_presence_message_c_style_for_c_filepassedmeasured1 of 2: _bound_function6
test_presence_message_includes_return_for_non_voidpassedmeasured1 of 2: _bound_function6
test_presence_message_omits_return_for_voidpassedmeasured1 of 2: _bound_function6
test_presence_message_python_stylepassedmeasured1 of 2: _bound_function6
test_prose_docstring_is_the_block_and_its_summary_the_briefpassedmeasured1 of 2: _bound_function6
test_regular_comment_not_doxygenpassedmeasured1 of 2: _bound_function6
test_return_requirement_can_be_turned_back_onpassedmeasured1 of 2: _bound_function6
test_simple_c_filepassedmeasured1 of 2: _bound_function6
test_single_line_docstring_with_tagspassedmeasured1 of 2: _bound_function6
test_single_line_doxygenpassedmeasured1 of 2: _bound_function6
test_stale_version_detectedpassedmeasured1 of 2: _bound_function6
test_static_macro_qualifierpassedmeasured1 of 2: _bound_function6
test_struct_qualified_returnpassedmeasured1 of 2: _bound_function6
test_tags_parsed_correctlypassedmeasured1 of 2: _bound_function6
test_three_tags_single_linepassedmeasured1 of 2: _bound_function6
test_toolchain_ignore_paths_skip_validationpassedmeasured1 of 2: _bound_function6
test_triple_hash_not_doxygenpassedmeasured1 of 2: _bound_function6
test_typedef_pointer_returnpassedmeasured1 of 2: _bound_function6
test_unbalanced_string_brace_is_handled_correctlypassedmeasured1 of 2: _bound_function6
test_undocumented_definition_after_declpassedmeasured1 of 2: _bound_function6
test_undocumented_detectedpassedmeasured1 of 2: _bound_function6
test_undocumented_typedef_detectedpassedmeasured1 of 2: _bound_function6
test_unmodified_overloads_no_violationpassedmeasured1 of 2: _bound_function6
test_updated_version_no_violationpassedmeasured1 of 2: _bound_function6
test_validate_file_pythonpassedmeasured1 of 2: _bound_function6
test_weak_macro_qualifierpassedmeasured1 of 2: _bound_function6
test_without_toolchain_files_everything_is_checkedpassedmeasured1 of 2: _bound_function6
test_a_changed_signature_with_a_bump_is_cleanpassedmeasured1 of 2: _bound_function7
test_a_changed_signature_without_a_bump_is_stalepassedmeasured1 of 2: _bound_function7
test_a_cpp_member_declaration_is_checked_toopassedmeasured1 of 2: _bound_function7
test_a_dead_req_on_a_documented_declaration_is_refusedpassedmeasured1 of 2: _bound_function7
test_a_declaration_does_not_need_its_own_reqpassedmeasured1 of 2: _bound_function7
test_a_documented_declaration_needs_its_versionpassedmeasured1 of 2: _bound_function7
test_added_copy_leaves_existing_copies_cleanpassedmeasured1 of 2: _bound_function7
test_an_overload_set_keeps_the_exact_matchpassedmeasured1 of 2: _bound_function7
test_class_level_block_does_not_leak_to_first_methodpassedmeasured1 of 2: _bound_function7
test_dg_internal_is_refused_naming_its_replacementpassedmeasured1 of 2: _bound_function7
test_excludes_are_globs_and_a_regex_says_sopassedmeasured1 of 2: _bound_function7
test_first_copy_edited_with_bump_is_cleanpassedmeasured1 of 2: _bound_function7
test_first_copy_edited_without_bump_differing_versions_is_flaggedpassedmeasured1 of 2: _bound_function7
test_first_method_after_class_docstring_still_foundpassedmeasured1 of 2: _bound_function7
test_first_method_directly_after_class_linepassedmeasured1 of 2: _bound_function7
test_guard_knows_the_tag_and_refuses_an_undeclared_idpassedmeasured1 of 2: _bound_function7
test_guard_refuses_a_marker_naming_an_undeclared_modepassedmeasured1 of 2: _bound_function7
test_later_method_still_foundpassedmeasured1 of 2: _bound_function7
test_nested_class_first_methodpassedmeasured1 of 2: _bound_function7
test_removed_copy_leaves_remaining_copy_cleanpassedmeasured1 of 2: _bound_function7
test_second_copy_edited_without_bump_is_flagged_alonepassedmeasured1 of 2: _bound_function7
test_the_refusal_survives_known_tags_warn_offpassedmeasured1 of 2: _bound_function7
test_unchanged_separate_ifdef_blocks_are_cleanpassedmeasured1 of 2: _bound_function7
test_utility_is_acceptedpassedmeasured1 of 2: _bound_function7
test_a_requirement_implemented_by_a_dependency_at_its_pin_is_covered_via_itpassedmeasured1 of 2: _bound_function9
test_an_exempt_status_is_listed_not_counted_as_a_gappassedmeasured1 of 2: _bound_function9
test_analyze_coverage_structurepassedmeasured1 of 2: _bound_function9
test_coverage_treats_a_declaration_and_its_definition_as_onepassedmeasured1 of 2: _bound_function9
test_covering_tests_are_read_from_the_test_treepassedmeasured1 of 2: _bound_function9
test_off_by_default_nothing_changespassedmeasured1 of 2: _bound_function9
test_without_exempt_status_nothing_is_exemptpassedmeasured1 of 2: _bound_function9
test_finds_changed_functionpassedmeasured1 of 2: _bound_function10
test_with_every_gap_exempt_the_gate_passes_and_still_names_thempassedmeasured1 of 2: _bound_function10
test_a_range_with_no_files_reads_the_files_the_range_changedpassedmeasured1 of 2: _bound_function11
test_full_pipelinepassedmeasured1 of 2: _bound_function11
Reached through calls

10 tests: 10 passed

10 passed
testresultlinked byimplementers exercisedcalls away
test_cfg_test_module_is_not_gatedpassedinferred2 of 2: _bound_function, _js_returns_void5
test_test_functions_are_not_gatedpassedinferred2 of 2: _bound_function, _js_returns_void5
test_binary_named_as_source_is_skippedpassedinferred2 of 2: _bound_function, _js_returns_void6
test_excluded_filepassedinferred2 of 2: _bound_function, _js_returns_void6
test_rust_is_opt_inpassedinferred2 of 2: _bound_function, _js_returns_void6
test_unknown_extension_skippedpassedinferred2 of 2: _bound_function, _js_returns_void6
test_an_undocumented_declaration_is_not_a_findingpassedinferred2 of 2: _bound_function, _js_returns_void7
test_unsupported_extension_returns_nonepassedinferred2 of 2: _bound_function, _js_returns_void7
test_a_submodule_in_the_range_is_an_unmapped_file_never_openedpassedinferred2 of 2: _bound_function, _js_returns_void9
test_no_change_no_resultpassedinferred2 of 2: _bound_function, _js_returns_void10

Flows through it