Introduce codenarc to keep this groovy tidy
This commit is contained in:
parent
28756c36c4
commit
072210343f
|
@ -15,6 +15,7 @@ buildscript {
|
|||
|
||||
apply plugin: 'com.jfrog.bintray'
|
||||
apply plugin: 'org.ysb33r.gradletest'
|
||||
apply plugin: 'codenarc'
|
||||
apply plugin: 'groovy'
|
||||
apply plugin: 'maven'
|
||||
|
||||
|
@ -42,6 +43,11 @@ dependencies {
|
|||
}
|
||||
}
|
||||
|
||||
codenarc {
|
||||
sourceSets = [sourceSets.main]
|
||||
configFile = file('gradle/codenarc.xml')
|
||||
}
|
||||
|
||||
test {
|
||||
testLogging {
|
||||
showStandardStreams = true
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<ruleset xmlns="http://codenarc.org/ruleset/1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://codenarc.org/ruleset/1.0 http://codenarc.org/ruleset-schema.xsd"
|
||||
xsi:noNamespaceSchemaLocation="http://codenarc.org/ruleset-schema.xsd">
|
||||
|
||||
<description>Sample rule set</description>
|
||||
|
||||
<ruleset-ref path='rulesets/imports.xml'>
|
||||
<rule-config name='DuplicateImport'>
|
||||
<property name='priority' value='1'/>
|
||||
</rule-config>
|
||||
</ruleset-ref>
|
||||
|
||||
<ruleset-ref path='rulesets/basic.xml'>
|
||||
<exclude name='StringInstantiation'/>
|
||||
</ruleset-ref>
|
||||
|
||||
<rule class='org.codenarc.rule.generic.IllegalRegexRule'>
|
||||
<property name="name" value="AuthorTagNotAllowed"/>
|
||||
<property name='regex' value='\@author'/>
|
||||
</rule>
|
||||
|
||||
</ruleset>
|
|
@ -3,7 +3,6 @@ package com.github.jrubygradle.storm
|
|||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
|
||||
/**
|
||||
* @author R. Tyler Croy
|
||||
*/
|
||||
class JRubyStorm extends ShadowJar {
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@ import org.gradle.api.Project
|
|||
|
||||
|
||||
/**
|
||||
* @author R. Tyler Croy
|
||||
*/
|
||||
class JRubyStormLocal extends JavaExec {
|
||||
|
||||
|
|
|
@ -6,14 +6,10 @@ import groovy.transform.PackageScope
|
|||
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.Task
|
||||
import org.gradle.api.tasks.bundling.Jar
|
||||
import org.gradle.api.tasks.testing.Test
|
||||
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
|
||||
/**
|
||||
* @author R. Tyler Croy
|
||||
*/
|
||||
class JRubyStormPlugin implements Plugin<Project> {
|
||||
void apply(Project project) {
|
||||
|
|
Loading…
Reference in New Issue