Re: [Codenarc-user] GrailsStatelessService - bean properties and dependencies
Brought to you by:
chrismair
From: <chr...@we...> - 2011-12-15 15:44:23
|
You can set the addToIgnoreFieldNames property of the rule to add your own custom field names, either in the ruleset definition or in "codenarc.properties". e.g. GrailsStatelessService { addToIgnoreFieldNames = '*Holder, fooHelper, thing1, thing2' } You can also ignore fields by type using the ignoreFieldTypes property. See http://codenarc.sourceforge.net/codenarc-rules-grails.html for more info on these properties. Chris From: Roshan Dawrani [mailto:ros...@gm...] Sent: Thursday, December 15, 2011 5:21 AM To: cod...@li... Subject: [Codenarc-user] GrailsStatelessService - bean properties and dependencies Hi, I am trying to use CodeNarc on a Grails app. The Grails services have other dependencies - some are injected through the app context configuration, and others that need more logic are set in afterPropertiesSet(), etc. CodeNarc gives (GrailsStatelessService ) warnings for the fields defined to hold these dependencies. I don't want to turn the rule off. Is there a way to tell CodeNarc that these fields do not make "state" in typical sense but actually dependencies satisfied through Spring? -- Roshan Lucy.me: http://www.lucy.me/roshan Blog: http://roshandawrani.wordpress.com/ |