Code Inspections in CoffeeScript
This topic lists all PhpStorm code inspections available in CoffeeScript.
You can toggle specific inspections or change their severity level on the Editor | Inspections page of the Settings/Preferences Ctrl+Alt+S.
Probable bugs
Inspection | Description | Default Severity |
---|---|---|
'switch' statement with no default branch | Reports any switch statements in CoffeeScript content which lack default branches. Such statements may result in difficult bugs, if unexpected cases are silently ignored. | Warning |
Arguments object outside function | Checks if arguments object used outside function | Warning |
Infinite loop statement | Reports any instances of for, while, or do statements which can only exit by throwing an exception. While such statements may be correct, they are often a symptom of coding errors. | Warning |
Literal is not a function | Reports when literal expression used as function call. | Error |
Missing import statement | Checks that all modules are referenced through import statements. | Weak warning |
Variable is assigned to itself | Reports any assignments of the form x = x in CoffeeScript content. These are pointless, and usually indicate programmer error. | Warning |
General
Inspection | Description | Default Severity |
---|---|---|
Signature mismatch | Checks CoffeeScript called function arguments | Weak warning |
Unused local symbols | Checks CoffeeScript parameter, local variable, function, classes and private member declarations to be used in given file scope. | Warning |