scapegoat icon indicating copy to clipboard operation
scapegoat copied to clipboard

"-P: scapegoat: overrideLevels" parameter is invalid in maven

Open lrt12333 opened this issue 5 years ago • 1 comments

Because the "error" level error in scapegoat will cause my project to fail to compile (my project has java and scala code), so I want to change the error level to "warning", but this configuration does not seem to take effect. There will still be "error" errors in the report. The configuration in my pom.xml is as follows:

                <configuration>
                    <args>
						<arg>-P:scapegoat:overrideLevels:all=Warning</arg>
						<arg>-P:scapegoat:reportOnly:true</arg>
                        <arg>-P:scapegoat:dataDir:${project.build.directory}</arg>
                        <arg>-P:scapegoat:reports:xml</arg>
                    </args>
                    <compilerPlugins>
                        <compilerPlugin>
                            <groupId>com.sksamuel.scapegoat</groupId>
                            <artifactId>scalac-scapegoat-plugin_${scala.binary.version}</artifactId>
                            <version>${scapegoat.version}</version>
                        </compilerPlugin>
                    </compilerPlugins>
                </configuration> 

(edited by @mccartney for minor formatting)

lrt12333 avatar Feb 26 '20 03:02 lrt12333

the way of your scapegoat:overrideLevels is not right. please see my example -P:scapegoat:dataDir:${project.build.directory} -P:scapegoat:reports:xml -P:scapegoat:overrideLevels:OptionGet=Warning:NullAssignment=Warning:TraversableHead=Warning:EmptyInterpolatedString=Warning

hugeshi avatar Mar 17 '20 07:03 hugeshi