Skip to content

Kotlin analyzer: brace-depth + comment extraction fooled by braces/comments in string literals (CBA-08 / CBA-11) #407

@yusufkaraaslan

Description

@yusufkaraaslan

Split out from the #404 re-review (see docs/BUG_AUDIT.md → 'Deferred' + Low tier CBA-11).

  • CBA-08 (code_analyzer.py:1410): the top-level vs nested Kotlin function check counts raw {/} in the prefix; an unbalanced brace inside a string literal (val s = "}") or comment corrupts the depth and can drop/misclassify a function.
  • CBA-11 (code_analyzer.py:581,588): comment extractors match // / /* */ inside string literals → phantom comments from URLs in strings.

Shared root cause: no string/comment-aware scanning. Fix together with a small tokenizer pass that strips string literals + comments before brace-counting / comment extraction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions