While it is technically correct to assign to parameters from within function bodies, it is better to use temporary variables to store intermediate
results.
Allowing parameters to be assigned to also reduces the code readability as developers will not be able to know whether the original parameter or
some temporary variable is being accessed without going through the whole function.
Noncompliant code example
int glob = 0;
void function (int a) {
a = glob; // Noncompliant
...
}
Compliant solution
int glob = 0;
void function (int a) {
int b = glob;
...
}