Note draft / work in progress

Rule violations:

Fixed here means fixed if there is a bug or marked as won't fix or false positive in the Sonar Cube web interface if it isn't bug.

Note rules that are not commonly encountered, don't occur in the current code base or are minor are not mentioned here.

The resulting rule changes will result in a more relaxed set of rules that match the current development code style of the FlexJS framework and that make the Sonar Cube reports more useful.

For a list of all rules, code example and rule references see here.

New Rules

These rules (currently disabled) should be added:

Critical or Blocking Rules

Any class extending the Event class should override Event.clone()

This is often a bug as without the clone (or similar) method events will not bubble correctly. A false positive may be the case when bubbles is not passed into the constructor but that may also be an omission.

Other rules while probably require no discussion as they generally indicate a serious issue or outdated coding style include:

Move Rules

These critical rues can be moved to major.

At some point we may want to consider moving the trace rule back and replacing trace statements with logging calls. (This has been discussed on the dev list.)

Major Rules

Current major rules we should keep. Most of these are simple and safe to fix in some cases provide performance and or code size improvements.

Move Some Major Rules to Minor

List of current major rules to moved to minor. These currently add a lot of noise  or would require a fair amount of effort to comply with or may come with the risk of adding bugs. Moving them to minor would make it easier to see other major issues listed above.

Move from Minor to Major

Missing semicolons may introduce errors when optimising and minimising JS code so the missing semicolons rule will move for minor to major. This are possibly other ways to get around this issue but the change is easy and the risk of introducing bugs very low.