ENVY/QA User Guide : Code Critic : Customizing the Reviews
Customizing the Reviews
Each review has properties that affect the way the review checks code elements. Some properties are common to all reviews and others are specific to a review.
Common Properties
All reviews have the property severity level. Severity level is a number (greater than or equal to one) that indicates the severity of results found by the review. All reviews have a default severity level that you can modify to match your project’s guidelines. The following table summarizes the default severity levels for each review. (Severity level 1 is the most severe.)
Review
Default severity
Compiler warnings
2
Could be cascaded
3
Could use self
2
Defeats compiler optimization
3
Direct state variable access
2
Duplicate pool dictionaries
3
Extends base class
2
Identical to inherited method
1
Inefficient convenience method
1
Magic values
3
Missing #yourself
3
Missing class comment
3
Missing config comment/notes
3
Missing dependent method
2
Missing method comment
3
Missing primitive fail code
1
Missing wasRemovedCode
2
Not categorized methods
3
Not implemented in superclass
3
Poorly named method
2
Poorly named state variables
2
Poorly named variables
2
Public/private inconsistency
3
References development classes
2
References global variables
2
References outside prereq chain
2
References own class
2
Reimplements system method
1
Sends system method
1
Sent but not implemented
1
Should call superclass
1
Should not be implemented
2
Should use isEmpty
3
Subclass responsibility
1
Subclasses base class
2
Too many consecutive concatenations
2
Too many consecutive messages
2
Unnecessary #isNil or #notNil
3
Unnecessary parenthesis
3
Unreferenced class
1
Unsent method
2
Unused arguments
3
Unused pool dictionaries
3
Unused state variables
1
Table 5 - Default severity levels.
 
Specific Properties
Some reviews have properties specific to that review. The following table summarizes the properties for those reviews and the default value for the property. You can customize any of these property values using the Advanced Settings dialog. The default values may be different depending on your Smalltalk vendor; consult the Advanced Settings dialog.
Review
Property
Description
Default value
Defeats compiler optimization
Optimized methods
methods that are optimized by the compiler; the format is: ifTrue: ifFalse:
#and: #ifFalse...
Direct state variable access
Ignore same name accessors
If the property is set to true, the review ignores any selectors that have the same name as the state variable. (You can use the property to ignore selectors that perform lazy initialization.)
false
Extends base class
Base classes
base classes
#AdditiveSequenceableCollec...
Inefficient convenience method' Inefficient convenience selectors
the names of inefficient convenience methods
#ifNil: #ifNotNil:
 
Magic values
Ignore values
common values that are not considered to be hard-coded values
-1 0 1 2
Missing #yourself
Instance creation methods
methods that are optimized for instance creation
#basicNew #basicNew: #new...
Missing dependent method
Dependent methods
a list whose elements indicate a method and its dependent method; for example: (= -> #hash)
= -> #hash #loaded ->
Poorly named method
Poor names
the patterns for poor method names
'*0' '*1' '*2' '*3' '*4'...
Poorly named state variables
Poor names
the patterns for poor state variable names
'*0' '*1' '*2' '*3' '*4'...
Poorly named variables
Poor names
the patterns for poor variable names
'*0' '*1' '*2' '*3' '*4'...
References development classes
Development classes
the names of development classes that should not be referenced
#CompilerError #EsAnd...
References global variables
Acceptable global variables
the names of global variables that are commonly used and should not be flagged as a problem
#Compiler #Processor...
Reimplements system method
System (low-level) selectors
the names of low-level system methods
#allClassVarNames...
Sends system method
System (low-level) selectors
the names of low-level system methods
#allClassVarNames...
Table 6 — Specific review properties.
Review
Property
Description
Default value
Sent but not implemented
Ignore capitalized literals
Indicates if literals (symbols) beginning with an uppercase letter will not be considered as potential messages. (This is useful if your application uses symbols for state and by convention your symbols start with an uppercase letter.)
true
Sent but not implemented
Scan entire image
indicates whether the entire image should be scanned instead of only the visible classes scanned
false
Sent but not implemented
Use packager directives
Indicates whether the ENVY/Packager directives are taken into account. (These directives can help ignore symbols that might be mistaken for potential selectors.)
true
Should call superclass
Methods
the names of methods that should call super
#initialize
Subclasses base class
Base classes
base classes
#AdditiveSequenceableCollec...
Too many consecutive concatenations
Maximum allowed consecutive concatenations
the maximum number of allowed concatenations
4
Too many consecutive concatenations
Maximum allowed consecutive messages
the maximum number of allowed consecutive messages
4
Too many consecutive messages
Maximum allowed consecutive messages
the maximum number of allowed consecutive messages
4
Unreferenced class
Ignore superclasses
if the class has subclasses, it is ignored
False
Unsent method
Scan entire image
indicates whether the entire image should be scanned instead of only the visible classes scanned
False
 
Use packager directives
Indicates whether the ENVY/Packager directives are taken into account. (These directives can help ignore symbols that might be mistaken for potential selectors.)
True
Unused arguments
Methods to ignore
the patterns for selectors whose arguments are often not used
'*clientData:callData:'
Table 6 — Specific review properties. (cont.)
Modifying Properties
To modify the default value of review properties start in the Code Critic Settings dialog:
from a development browser, select Tool > Review and click Settings...
from the Transcript, select Tool Settings > Review....
 
C:\Users\documentation\Documents\vastePublisher\stable\VAS Documentation Word\images\eqa\fig3.png
Figure 3 — Code Critic Advanced Settings dialog.
When the dialog opens, proceed as follows:
1. Click Advanced... to open the Advanced Settings (see Figure 3).
2. Select a review in the Reviews list.
The review’s properties appear in the Preferences list.
C:\Users\documentation\Documents\vastePublisher\stable\VAS Documentation Word\images\tips.gif
To access a review easily, you can sort the reviews in the Reviews list either alphabetically or by code element type, using By Label or By Type.
3. Select a property name in the Preferences list.
Its current value appears in the Preference Value text area.
4. Modify the text area to the desired value of the property according to the following table.
Property
Description
single-value property
must be Boolean, Integer, String, or Symbol, depending on the expected type of the property
multi-value property
elements are separated by spaces
values for class property
class names must be valid class names
Table 7 — Code Critic property values and their descriptions.
5. Click Save Value to save the new value of the property.
6. When you have made all modifications, click OK to accept the changes or Cancel to abort the changes.
Last modified date: 05/19/2020