CRITICAL
Rule Definition
It does not help readability
Remediation
Use qualified names.
Violation Code Sample
package
{
public class AvoidUseOfWithKeyword
{
function polar(r:Number):void {
var a:Number, x:Number, y:Number;
with (Math) {
a = PI * pow(r, 2);
x = r * cos(PI);
y = r * sin(PI / 2);
}
trace("area = " + a);
trace("x = " + x);
trace("y = " + y);
}
}
}
Reference
http://opensource.adobe.com/wiki/display/flexpmd/FlexPMD
Related Technologies
Technical Criterion
Programming Practices - Structuredness
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.