Skip to content

analytics(problems): keep the requested type and distinct same-line findings through dedup #21129

Open

Description

@mrveiss

Follow-ups from review of #21122 (Refs #20493), parent #20491.

  1. GET /problems?problem_type=code_smell_long_method returns the finding relabelled long_function because dedupe_same_location_problems canonicalises every response. Filtered responses should keep the requested type; unfiltered ones stay canonical (api/codebase_analytics/endpoints/stats.py, problem_dedup.py).
  2. Two unclosed-resource findings on one line carry the same type, line and description, so dedup merges them and the count is one short. Carry an occurrence location through analysis, storage and dedup so both survive (problem_dedup.py _location).

Acceptance: a test requests each family member by type and gets that type back; a test with two same-line identical-description findings keeps both.

Metadata

Metadata

Assignees

No one assigned

    Labels

    phase:M4.11Safety net: tests and analysers reach the whole tree

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions