Dive into the depths of code quality by learning about the main
rules around dead code, code optimization, security, multi-screen
development as well as language and framework specific smells.
We will explore different techniques to streamline your personal and
team development workflow in regards to code quality and team best
practices by using FlexPMD seamlessly in your development and
continuos integration environments.
Discover how you can tune FlexPMD by modifying and adding custom
rules to reinforce your team practices in a healthy, effective and
transparent manner.
Dead code:
Unused private methods
Unused method parameters
Unused local variable
Unused private class members
Bad Architecture:
Cairngorm 2 possible issues:
Huge ModelLocator
Reference ModelLocator from outside the main file
Call explicitly EventDispatcher
PureMVC possible issues:
Huge mediators (low testability)
Too many switch case statements
Monkey patching
Reference a view class from a model class:
Potential bugs:
Event class missing clone function
Listen or dispatch hard coded event name
Switch statements should have default
Identical switch cases
Default event name
Maintainability:
Only one return statement per method
Avoid public static variable (global variable)
Use of unsafe type (Object, Dictionnary, *)
Class and extended class have same name
Dynamic class
Performance:
Cyclomatic complexity
Heavily complex constructor
CreationPolicy set to "all”
Bindable class
Deeply nested condition
Sizing:
Too many functions per class
Too long functions
Too many parameters per function
Too many public members
Too many public fields
Naming:
Too short variable name
Package case
Variable name ends with a figure
Class member hidden by a local variable
Incorrect class case