Rule that checks for references to the session object from within Grails controller and taglib classes.
This rule is intended as a "governance" rule to enable monitoring and controlling access to the session from within application source code. Storing objects in the session may inhibit scalability and/or performance and should be carefully considered. Enabling this rule may make most sense in a team environment where team members exhibit a broad range of skill and experience levels. Appropriate session access can be configured as exceptions to this rule by configuring either thedoNotApplyToFilenames
or
doNotApplyToFilesMatching
property of the rule.
This rule sets the default value of applyToFilesMatching
to only match files
under the 'grails-app/controllers' or 'grails-app/taglib' folders. You can override this
with a different regular expression value if appropriate.Type | Name and description |
---|---|
String |
applyToFilesMatching |
Class |
astVisitorClass |
String |
name |
int |
priority |
Constructor and description |
---|
GrailsSessionReferenceRule
() |
Groovy Documentation