Hi,

> I made two changes on Friday.

Can I ask why you didn’t email the list saying you had done this and what the 
purpose of disabling those rules were? Or disabling rules when I suggested that 
you should make a custom profile instead?

> It’s important to note that these changes were only to the “Flex” language. 
> Considering that we’re the only project using this language at all, it does 
> not effect anyone else.

How did you know we are the only project using that profile when you disabled 
those rules? Several other projects do use Actionscript and at least one I know 
has used Flex. What do you think would of happened if you had changed the Java 
default profile which we also use?

> Additionally, as best as I can tell, the language was first defined in the 
> end of December.

Sonar cube has been running against the FlexJS framework and compiler for more 
than a year (probably two). In December Apache updated to a new version of 
Sonar Cube. Going way back it was first suggested to be set up in 2013 and 
Chris had it running externally for a bit before it was set it up at Apache. 
There have been several discussions about it on thd list over that time and no 
one has suggested disabling rules that I can recall.

> Considering we “own” the language, it seems reasonable that we should define 
> sane defaults in case any other project DOES use the language.

I have Sonar Cube running locally and use it to track TD on a current project 
and I don’t disable those rules, in fact I turn on several more.

> "===" and "!==" should be used instead of "==" and "!=“ is simply incorrect 
> for ActionScript. I flies in the face of accepted coding practices for the 
> language, and should be removed completely.

Which is an opinion not held by all JavaScript and ActionScript developers, in 
fact a large number of them consider it harmful to use “==“ and “!=". I use 
“===“ and “!===“ most of the time in my AS code and I know (for instance) Josh 
does as well. It may not made sense to use it everywhere in the Flex JS SDK, 
but there is a fair amount of use off === and !== in the existing FlexJS SDK 
(around a 1000 occurrances from a quick search) so it seems that it’s not 
incorrect to use it even in our own framework.

Rather than turning off the rule I have suggested in my wiki document to make 
it a minor issue. You are free to ignore any minor issues you want. Sonar Cube 
also has good filtering tools to help you do that.

> "public static" fields should be constant is not something that Flex ever 
> enforced. I don’t really see the value for this rule, but I could go either 
> way.

Others may have differing options. It would would be best to discuss it on 
list/wiki first before turning any rules off.

> Feel free to revert my changes, but the discussion should be about defaults 
> for the language, and not just about a custom rule set.

Different projects may have a different set of rules. I think it better to go 
with the defaults as they are provided and have each project tune it. Framework 
code is often different to application code so having one default for both 
sorts of projects may not make sense.

Thanks,
Justin

Reply via email to