A module representing a sniffer.
Methods
-
<inner> define(factory)
-
Override AMD `define` function for RequireJS
Parameters:
Name Type Description factory
function -
<protected, inner> isConstant(text) → {boolean}
-
Check if it is a constant
Parameters:
Name Type Description text
string Returns:
- Type
- boolean
-
<inner> run(rule, node, parentNode)
-
Run the sniffer according a given rule if a given node type matches the case
Parameters:
Name Type Description rule
Object node
Object parentNode
Object -
<protected, inner> sniffCase(rule, node)
-
Report to the mediator if name contained in a given node doesn't match specified case (camel, pascal)
Parameters:
Name Type Description rule
Object node
Object -
<protected, inner> sniffNumbers(rule, node)
-
Report to the mediator if name contained in a given node doesn't match specified `numbers in name allowed` convention
Parameters:
Name Type Description rule
Object node
Object -
<protected, inner> sniffRepeatingUc(rule, node)
-
Report to the mediator if name contained in a given node doesn't match specified `repeating uppercaser` convention
Parameters:
Name Type Description rule
Object node
Object -
<inner> validateRule(rule)
-
Check the contract
Parameters:
Name Type Description rule
Object