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

scapegoat failOnError := false #65

Open
fernaspiazu opened this issue Feb 9, 2018 · 8 comments
Open

scapegoat failOnError := false #65

fernaspiazu opened this issue Feb 9, 2018 · 8 comments

Comments

@fernaspiazu
Copy link

Hi,
Is there any way to do NOT fail if an error is found while scapegoat task is executed?
Since I have to upload the scapegoat-report to sonar, wouldn't be better to have this option?
Do you have some example in order to go ahead even if errors are found?
Thanks in advance.

@antoon-r
Copy link

Seems like there is an option to allow some warnings/errors before failing the build, but I could not make it work with 1.0.5. See issue #60

@Cinetik
Copy link

Cinetik commented Apr 3, 2018

Same here, couldn't make it work.
Is making the build fail on the report intended?
I would expect it to go through so you can send report to sonar as well.

@hkupty
Copy link

hkupty commented Apr 11, 2018

I think this is related to #72 .

@thomas-chauvet
Copy link

Any news on it ? Thanks!

@javiercanillas
Copy link

It would be great to have this in place. Any news regarding this? Any workaround?

@GastonTS
Copy link

If you want to upload the report to Sonar you can change the level of Error inspections to Warning. Doing this the run don't fail (even with warnings) and given that what you really want is to see the quality profile of Sonar not the real scapegoat report it "solves the problem".

You can add to you project settings
scalacOptions in Scapegoat ++= Seq("-P:scapegoat:overrideLevels:ArraysInFormat=Warning:CatchNpe=Warning:ComparingFloatingPointTypes=Warning:ComparingUnrelatedTypes=Warning:EitherGet=Warning:EmptyInterpolatedString=Warning:IllegalFormatString=Warning:ImpossibleOptionSizeCondition=Warning:IncorrectNumberOfArgsToFormat=Warning:IncorrectlyNamedExceptions=Warning:LonelySealedTrait=Warning:MapGetAndGetOrElse=Warning:NanComparison=Warning:OptionGet=Warning:OptionSize=Warning:StripMarginOnRegex=Warning:TraversableHead=Warning:TraversableLast=Warning:TryGet=Warning:UnsafeContains=Warning")

Is not the best option but it works at least with Sonar. Anyway as you say, it would be great to have this failOnError := false option instead of doing this hack.

@n3ziniuka5
Copy link

Another workaround is to do sbt scapegoat || true. This will ignore any errors and with the next command you can upload the report to SonarQube.

@portikCoder
Copy link

I can see the situation haven't changed anything.
It's sad, that we have to do those workarounds. I would like to help in order to inject this failOnError := false, but im only a grey-user, who doesn't really know how to Scala :D

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

9 participants