Skip to content

[GCI77] rule improvment : pattern declaration not only in a static way #3

@dedece35

Description

@dedece35

Describe the bug
the EC77 rule implementation is not accurate enough. see screenshot below.
the rule wants us to make a pattern as static and not declared directly in method.
But the problem is if the pattern is declared directly in code and use a string with variable concatenation, we can't declare this pattern is a static way.

Expected behavior
Check is the string pattern uses a variable (not static) in string pattern.
if yes, don't raise the issue because we can't declare it to a static way.

Screenshots
pattern

Software Versions

  • SonarQube Version: 10.3
  • Plugin Version: java plugin 1.4.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    🗃️ rulerule improvment or rule development or bug🚀 enhancementNew feature or request
    No fields configured for Feature.

    Projects

    Status

    Ready To Review

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions