Skip to content

Sonar: 138 issues around error handling, dead code, and TODOs #45

@sirdeggen

Description

@sirdeggen

Tracking issue for #38.

Rule Count Description
typescript:S2486 75 Exceptions should not be ignored
typescript:S1854 63 Unused assignments should be removed
typescript:S125 58 Sections of code should not be commented out
typescript:S1135 63 Track uses of TODO tags
typescript:S7718 59 Error parameters in catch clauses should follow consistent naming
typescript:S2681 12 Multiline blocks should be enclosed in curly braces
typescript:S7059 36 Constructors should not contain asynchronous operations
typescript:S1186 9 Functions should not be empty
typescript:S1199 9 Nested code blocks should not be used
typescript:S4123 12 await should only be used with promises
typescript:S1788 9 Function parameters with default values should be last
typescript:S1874 12 Deprecated APIs should not be used

Suggested approach

  • S2486 (75) is the highest-signal: each silently swallowed exception is a real bug risk. Audit and either rethrow, log, or document why ignored.
  • S125 (58) and S1135 (63): delete dead/commented code; convert lingering TODOs to GH issues.
  • S1854 (63): dead-store removal — usually safe.
  • S7059 (36): async work in constructors is a legitimate design issue — needs case-by-case factory-method refactor.
  • S1874 (12): deprecated API usage may indicate impending breakage — investigate per call site.

Refs: #38

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions