Skip to content

[java] Improve AvoidUsingOctalValues documentation #3401

@oowekyala

Description

@oowekyala

Is your feature request related to a problem? Please describe. The rule AvoidUsingOctalValues has no justification. The documentation

Integer literals should not start with zero since this denotes that the rest of literal will be interpreted as an octal value.

is vacuous, boiling down to "integer literals should not be octal literals since it denotes that the literal is octal". The message is even worse:

Do not start a literal by 0 unless it's an octal value

Good enough documentation would explain why octal literals should be avoided (being unusual is the only reason I can find though).

Describe the solution you'd like Rewrite the documentation and message of the rule.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    an:enhancementAn improvement on existing features / rulesin:documentationAffects the documentation [doc]

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions