Re: [Codenarc-user] GrailsStatelessService - bean properties and dependencies
Brought to you by:
chrismair
From: Roshan D. <ros...@gm...> - 2011-12-15 15:48:42
|
There are many services for us with many dependencies (very many of them do not have a common type) and it's a pain maintaining a long list in codenarc.properties. Can there be a better way of informing CodeNarc that "it is an injected property and do not complain about it"? On Thu, Dec 15, 2011 at 9:13 PM, <chr...@we...> wrote: > 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. **** > > ** ** > McAfee SiteAdvisor Warning > This e-mail message contains potentially unsafe links to these sites: > lucy.me [image: more info...]<http://www.siteadvisor.com/sites/lucy.me?pip=false&premium=true&client_uid=1010617928&client_ver=3.4.0.143&client_type=IEPlugin&suite=true&aff_id=0&locale=en_au&ui=1&os_ver=6.1.1.0> > > 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/**** > > ** ** > -- Roshan Lucy.me: http://www.lucy.me/roshan Blog: http://roshandawrani.wordpress.com/ |