SonarCommunity/sonar-javascript — pull request #8 by gshakhn (2013-04-05 20:32:19+00:00)
Title: Fix BoundOrAssignedEvalOrArgumentsCheck to ignore equality expressions.

An easy way for a JS function to check how many arguments it has is
arguments.length === x

The old check thinks the above is a modification. We can change the check to
not fire if it has an ancestor that is an equality expression.

Unfortunately, the new check won't generate a violation for the following:
(arguments = 1) === 1

I'm hoping the latter won't occur too much, while the former is a common
pattern and false positives are annoying. There might be a way to catch
the second case while ignoring the first, but I'm not familiar enough with
the generated AST.