Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lrt12333 opened this issue Feb 26, 2020 · 1 comment
Open

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

lrt12333 opened this issue Feb 26, 2020 · 1 comment

Comments

@lrt12333
Copy link

lrt12333 commented Feb 26, 2020

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 lrt12333 changed the title 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: "-P: scapegoat: overrideLevels" parameter is invalid in maven Feb 26, 2020
@hugeshi
Copy link

hugeshi commented Mar 17, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants