rspec/rules/S2011/comments-and-links.adoc

36 lines
1.6 KiB
Plaintext
Raw Normal View History

=== Related: RSPEC-2536
=== On 2014-09-17T10:38:27Z Freddy Mallet Wrote:
@Ann, I would have associated this rule to the "Reliability" SQALE characteristic. I'm using the "Changeability - Data related changeability" mainly when a design flaw may prevent the developer from changing a structure of data.
=== On 2014-10-08T15:46:04Z Ann Campbell Wrote:
This rule should be only about the use of the global keyword. Instead of grabbing value from global scope, fcn should receive it as a parameter
=== On 2014-10-08T16:23:30Z Ann Campbell Wrote:
\[~linda.martin], see what you think about the rewrite. Also, I'm not sure brain-overload still applies...? convention?
=== On 2014-10-09T07:27:49Z Linda Martin Wrote:
\[~ann.campbell.2]
1. I just have a small suggestion for the description, WDYT about something like:
"_{color:grey}Global variables are a useful construct, but they should not be abused{color}_.
A function can access the global scope through the global keyword.This practice considerably reduces the readability of a function. The global variable should be passed as a parameter of the function."
2. About the tag I agree, convention suits well for me.
3. Also, maybe we could the add in this rule the use of $GLOBALS array, see: \http://jira.codehaus.org/browse/SONARPHP-131, sorry for realising this only now.
=== On 2014-10-09T14:19:12Z Ann Campbell Wrote:
\[~linda.martin] all 3 suggestions taken, but you'll want to double-check my syntax/usage of $GLOBALS in the noncompliant example.
=== On 2014-10-23T08:02:54Z Linda Martin Wrote:
\[~ann.campbell.2] Thanks! Perfect for me.