# How do I get the CodeNarc plugin to find codenarc.properties?

**URL:** <https://discuss.gradle.org/t/how-do-i-get-the-codenarc-plugin-to-find-codenarc-properties/4208>\
**Category:** Old Forum Archive\
**Created:** [December 23, 2014, 9:24pm UTC](https://discuss.gradle.org/t/how-do-i-get-the-codenarc-plugin-to-find-codenarc-properties/4208 "2014-12-23T21:24:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ronald\_Kurr](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/ronald_kurr/32/838_2.png) [@Ronald\_Kurr](https://discuss.gradle.org/u/Ronald_Kurr)\
**Post date:** [December 23, 2014, 9:24pm UTC](https://discuss.gradle.org/t/how-do-i-get-the-codenarc-plugin-to-find-codenarc-properties/4208/1 "2014-12-23T21:24:00Z")

</div>

I’m using Gradle 2.2.1 and CodeNarc 0.22. I have a class that I need to suppress a check on. According to the CodeNarc documentation I need to put the suppression in a codenarc.properties file in CodeNarc’s classpath. When I run the build I see this message:

RuleSet configuration properties file [codenarc.properties] not found.

I’ve looked through Gradle documentation and source but haven’t figured out how to configure the build to find my codenarc.properties file. Can anybody lend a hand?

Thanks, Ron

---

<div class="post-metadata">

**Author:** ![erdi](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/erdi/32/24_2.png) [@erdi](https://discuss.gradle.org/u/erdi)\
**Post date:** [December 31, 2014, 10:48am UTC](https://discuss.gradle.org/t/how-do-i-get-the-codenarc-plugin-to-find-codenarc-properties/4208/2 "2014-12-31T10:48:00Z")

</div>

It’s usually easier to use a codenarc ruleset file (either [xml](http://codenarc.sourceforge.net/codenarc-creating-ruleset.html#Creating_an_XML_RuleSet_File) or [groovy](http://codenarc.sourceforge.net/codenarc-creating-ruleset.html#Creating_a_Groovy_RuleSet_File), you can use one of the starter rulesets if you want to initially run all rules) and pass the file location to [‘configFile’](http://www.gradle.org/docs/current/dsl/org.gradle.api.plugins.quality.CodeNarcExtension.html#org.gradle.api.plugins.quality.CodeNarcExtension:configFile) property of ‘codenarc’ extension, e.g. ‘codenarc.configFile = file(“path/to/rulesets.groovy”)’.
