inconsistent-array-declaration (S261)
Fix is always available.
This rule is turned on by default.
What it does
Checks for variable declarations that have both the dimension attribute
and an inline array specification.
Why is this bad?
Having both methods of declaring an array in one statement may be confusing
for the reader who may expect that all variables in the declaration have the
same shape as given by the dimension attribute. Prefer to declare
variables with different shapes to the dimension attribute on different
lines.
Automatic Fix
The automatic fix for this moves the variable declaration to a new statement, and is unsafe as it may clobber comments.
You can use check.inconsistent-dimension.prefer-attribute to control
whether to put a dimension attribute on the new declaration or not.
Example
Use instead: