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

Results of running Scapegoat against Scapegoat #305

Open
mwz opened this issue Mar 13, 2020 · 6 comments
Open

Results of running Scapegoat against Scapegoat #305

mwz opened this issue Mar 13, 2020 · 6 comments

Comments

@mwz
Copy link
Contributor

mwz commented Mar 13, 2020

I've run the current Scapegoat snapshot against the codebase and you can find the full report below. It would be good to fix some of those issues and also set it up so that it gets run against the codebase as a PR check (and fails the PR on errors).

Scapegoat Inspections
Errors 3 Warnings 109 Infos 19

com.sksamuel.scapegoat.Feedback.scala:73
Info  Missing final modifier on case class  com.sksamuel.scapegoat.inspections.FinalModifierOnCaseClass
Using case classes without final modifier can lead to surprising breakage.

com.sksamuel.scapegoat.Feedback.scala:8
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val consoleOutput: Boolean = _

com.sksamuel.scapegoat.Feedback.scala:8
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val reporter: scala.tools.nsc.reporters.Reporter = _

com.sksamuel.scapegoat.Feedback.scala:8
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val sourcePrefix: String = _

com.sksamuel.scapegoat.Feedback.scala:8
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val minimalLevel: com.sksamuel.scapegoat.Level = Levels.Info

com.sksamuel.scapegoat.Feedback.scala:74
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val text: String = _

com.sksamuel.scapegoat.Feedback.scala:75
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val line: Int = _

com.sksamuel.scapegoat.Feedback.scala:76
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val level: com.sksamuel.scapegoat.Level = _

com.sksamuel.scapegoat.Feedback.scala:77
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val sourceFileFull: String = _

com.sksamuel.scapegoat.Feedback.scala:78
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val sourceFileNormalized: String = _

com.sksamuel.scapegoat.Feedback.scala:79
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val snippet: Option[String] = _

com.sksamuel.scapegoat.Feedback.scala:80
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val explanation: String = _

com.sksamuel.scapegoat.Feedback.scala:81
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val inspection: String = _

com.sksamuel.scapegoat.Inspection.scala:40
Warning  Empty method  com.sksamuel.scapegoat.inspections.empty.EmptyMethod
An empty method is considered as dead code.
def postInspection(): Unit = ()

com.sksamuel.scapegoat.Inspection.scala:43
Info  Missing final modifier on case class  com.sksamuel.scapegoat.inspections.FinalModifierOnCaseClass
Using case classes without final modifier can lead to surprising breakage.

com.sksamuel.scapegoat.Inspection.scala:8
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val text: String = _

com.sksamuel.scapegoat.Inspection.scala:9
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val defaultLevel: com.sksamuel.scapegoat.Level = _

com.sksamuel.scapegoat.Inspection.scala:10
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val description: String = _

com.sksamuel.scapegoat.Inspection.scala:11
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val explanation: String = _

com.sksamuel.scapegoat.Inspection.scala:19
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val context: com.sksamuel.scapegoat.InspectionContext = _

com.sksamuel.scapegoat.Inspection.scala:43
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val global: scala.tools.nsc.Global = _

com.sksamuel.scapegoat.Inspection.scala:43
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val feedback: com.sksamuel.scapegoat.Feedback = _

com.sksamuel.scapegoat.inspections.DoubleNegation.scala:18
Warning  Looks like interpolated String  com.sksamuel.scapegoat.inspections.string.LooksLikeInterpolatedString
Did you forget to prefix this string with an s, f or raw to interpolate it?

com.sksamuel.scapegoat.inspections.MaxParameters.scala:19
Info  List.size is O(n)  com.sksamuel.scapegoat.inspections.collections.ListSize
List.size is O(n). Consider using a different data type with O(1) size lookup such as Vector or an Array.

com.sksamuel.scapegoat.inspections.NoOpOverride.scala:19
Info  List.size is O(n)  com.sksamuel.scapegoat.inspections.collections.ListSize
List.size is O(n). Consider using a different data type with O(1) size lookup such as Vector or an Array.

com.sksamuel.scapegoat.inspections.NoOpOverride.scala:19
Info  List.size is O(n)  com.sksamuel.scapegoat.inspections.collections.ListSize
List.size is O(n). Consider using a different data type with O(1) size lookup such as Vector or an Array.

com.sksamuel.scapegoat.inspections.NoOpOverride.scala:29
Info  List.size is O(n)  com.sksamuel.scapegoat.inspections.collections.ListSize
List.size is O(n). Consider using a different data type with O(1) size lookup such as Vector or an Array.

com.sksamuel.scapegoat.inspections.NoOpOverride.scala:29
Error  Use of unsafe Traversable methods.  com.sksamuel.scapegoat.inspections.collections.UnsafeTraversableMethods
The following methods on Traversable are considered to be unsafe (head, tail, init, last, reduce, reduceLeft, reduceRight, max, maxBy, min, minBy).
vparamss.head

com.sksamuel.scapegoat.inspections.TypeShadowing.scala:26
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val tparam: this.context.global.TypeDef = _

com.sksamuel.scapegoat.inspections.VarClosure.scala:20
Info  List append is slow  com.sksamuel.scapegoat.inspections.collections.ListAppend
List append is O(n). For large lists, consider using cons (::) or another data structure such as ListBuffer, Vector or a cats.data.Chain (which has constant prepend and append).

com.sksamuel.scapegoat.inspections.VarClosure.scala:20
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
<synthetic> val tree: this.context.global.Tree = _

com.sksamuel.scapegoat.inspections.VarUse.scala:23
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
<synthetic> val tree: this.context.global.Tree = _

com.sksamuel.scapegoat.inspections.VarUse.scala:24
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
<synthetic> val tree: this.context.global.Tree = _

com.sksamuel.scapegoat.inspections.VariableShadowing.scala:37
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
<synthetic> val tree: this.context.global.Tree = _

com.sksamuel.scapegoat.inspections.collections.DuplicateMapKey.scala:24
Info  List append is slow  com.sksamuel.scapegoat.inspections.collections.ListAppend
List append is O(n). For large lists, consider using cons (::) or another data structure such as ListBuffer, Vector or a cats.data.Chain (which has constant prepend and append).

com.sksamuel.scapegoat.inspections.collections.DuplicateMapKey.scala:27
Info  List.size is O(n)  com.sksamuel.scapegoat.inspections.collections.ListSize
List.size is O(n). Consider using a different data type with O(1) size lookup such as Vector or an Array.

com.sksamuel.scapegoat.inspections.collections.DuplicateSetValue.scala:23
Info  List.size is O(n)  com.sksamuel.scapegoat.inspections.collections.ListSize
List.size is O(n). Consider using a different data type with O(1) size lookup such as Vector or an Array.

com.sksamuel.scapegoat.inspections.collections.NegationIsEmpty.scala:19
Warning  Looks like interpolated String  com.sksamuel.scapegoat.inspections.string.LooksLikeInterpolatedString
Did you forget to prefix this string with an s, f or raw to interpolate it?

com.sksamuel.scapegoat.inspections.collections.NegationNonEmpty.scala:19
Warning  Looks like interpolated String  com.sksamuel.scapegoat.inspections.string.LooksLikeInterpolatedString
Did you forget to prefix this string with an s, f or raw to interpolate it?

com.sksamuel.scapegoat.inspections.collections.UnsafeContains.scala:27
Warning  Use of isInstanceOf  com.sksamuel.scapegoat.inspections.unsafe.IsInstanceOf
Use of isInstanceOf is considered a bad practice - consider using pattern matching instead.
elem.isInstanceOf[Any]

com.sksamuel.scapegoat.inspections.exception.CatchException.scala:6
Error  Incorrectly named exceptions  com.sksamuel.scapegoat.inspections.exception.IncorrectlyNamedExceptions
Class named exception does not derive from Exception / class derived from Exception is not named *Exception.
class CatchException extends com.sksamuel.scapegoat.Inspection { def <init>(): com.sksamuel.scapegoat.inspections.exception.CatchException = { CatchException.super.<init>("Catch exception", com.sksamuel.scapegoat.Levels.Warning, "Checks for try blocks that catch exception.", "Did you intend to catch all exceptions? Consider catching a more specific exception class."); () }; def inspector(context: com.sksamuel.scapegoat.InspectionContext): com.sksamuel.scapegoat.Inspector = { fi

com.sksamuel.scapegoat.inspections.exception.SwallowedException.scala:6
Error  Incorrectly named exceptions  com.sksamuel.scapegoat.inspections.exception.IncorrectlyNamedExceptions
Class named exception does not derive from Exception / class derived from Exception is not named *Exception.
class SwallowedException extends com.sksamuel.scapegoat.Inspection { def <init>(): com.sksamuel.scapegoat.inspections.exception.SwallowedException = { SwallowedException.super.<init>("Empty catch block", com.sksamuel.scapegoat.Levels.Warning, "Finds catch blocks that don\'t handle caught exceptions.", "If you use a try/catch block to deal with an exception, you should handle all of the caught exceptions and if for some reason you\'re throwing another exception in the result, you should inc

com.sksamuel.scapegoat.inspections.inference.ProductWithSerializableInferred.scala:26
Info  List.size is O(n)  com.sksamuel.scapegoat.inspections.collections.ListSize
List.size is O(n). Consider using a different data type with O(1) size lookup such as Vector or an Array.

com.sksamuel.scapegoat.inspections.matching.RepeatedCaseBody.scala:21
Info  List.size is O(n)  com.sksamuel.scapegoat.inspections.collections.ListSize
List.size is O(n). Consider using a different data type with O(1) size lookup such as Vector or an Array.

com.sksamuel.scapegoat.inspections.matching.RepeatedCaseBody.scala:26
Info  List.size is O(n)  com.sksamuel.scapegoat.inspections.collections.ListSize
List.size is O(n). Consider using a different data type with O(1) size lookup such as Vector or an Array.

com.sksamuel.scapegoat.inspections.math.UseLog10.scala:9
Warning  Looks like interpolated String  com.sksamuel.scapegoat.inspections.string.LooksLikeInterpolatedString
Did you forget to prefix this string with an s, f or raw to interpolate it?

com.sksamuel.scapegoat.inspections.math.UseLog1P.scala:9
Warning  Looks like interpolated String  com.sksamuel.scapegoat.inspections.string.LooksLikeInterpolatedString
Did you forget to prefix this string with an s, f or raw to interpolate it?

com.sksamuel.scapegoat.inspections.math.UseSqrt.scala:9
Warning  Looks like interpolated String  com.sksamuel.scapegoat.inspections.string.LooksLikeInterpolatedString
Did you forget to prefix this string with an s, f or raw to interpolate it?

com.sksamuel.scapegoat.inspections.naming.MethodNames.scala:20
Warning  Looks like interpolated String  com.sksamuel.scapegoat.inspections.string.LooksLikeInterpolatedString
Did you forget to prefix this string with an s, f or raw to interpolate it?

com.sksamuel.scapegoat.inspections.nulls.NullAssignment.scala:23
Warning  Looks like interpolated String  com.sksamuel.scapegoat.inspections.string.LooksLikeInterpolatedString
Did you forget to prefix this string with an s, f or raw to interpolate it?

com.sksamuel.scapegoat.inspections.string.IncorrectNumberOfArgsToFormat.scala:37
Info  List.size is O(n)  com.sksamuel.scapegoat.inspections.collections.ListSize
List.size is O(n). Consider using a different data type with O(1) size lookup such as Vector or an Array.

com.sksamuel.scapegoat.inspections.unneccesary.UnusedMethodParameter.scala:65
Info  Redundant final modifier on a method  com.sksamuel.scapegoat.inspections.RedundantFinalModifierOnMethod
A final modifier on methods that cannot be overridden is redundant.

com.sksamuel.scapegoat.inspections.unneccesary.VarCouldBeVal.scala:22
Info  List append is slow  com.sksamuel.scapegoat.inspections.collections.ListAppend
List append is O(n). For large lists, consider using cons (::) or another data structure such as ListBuffer, Vector or a cats.data.Chain (which has constant prepend and append).

com.sksamuel.scapegoat.inspections.unneccesary.VarCouldBeVal.scala:61
Info  List append is slow  com.sksamuel.scapegoat.inspections.collections.ListAppend
List append is O(n). For large lists, consider using cons (::) or another data structure such as ListBuffer, Vector or a cats.data.Chain (which has constant prepend and append).

com.sksamuel.scapegoat.inspections.unneccesary.VarCouldBeVal.scala:58
Info  Redundant final modifier on a method  com.sksamuel.scapegoat.inspections.RedundantFinalModifierOnMethod
A final modifier on methods that cannot be overridden is redundant.

com.sksamuel.scapegoat.inspections.unsafe.AsInstanceOf.scala:25
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
<synthetic> val tree: this.context.global.Tree = _

com.sksamuel.scapegoat.inspections.unsafe.FinalizerWithoutSuper.scala:21
Info  List append is slow  com.sksamuel.scapegoat.inspections.collections.ListAppend
List append is O(n). For large lists, consider using cons (::) or another data structure such as ListBuffer, Vector or a cats.data.Chain (which has constant prepend and append).

com.sksamuel.scapegoat.inspections.unsafe.FinalizerWithoutSuper.scala:21
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
<synthetic> val tree: this.context.global.Tree = _

com.sksamuel.scapegoat.inspections.unsafe.IsInstanceOf.scala:24
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
<synthetic> val tree: this.context.global.Tree = _

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:10
Warning  Null parameter  com.sksamuel.scapegoat.inspections.nulls.NullParameter
Use an Option instead when the value can be empty and pass down a None instead.
new scala.xml.Elem(null, "bugcollection", $md, scala.xml.TopScope, false, (xml.this.NodeSeq.seqToNodeSeq({ val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer(); $buf.&+(new scala.xml.Text("\n ")); $buf.&+({ { var $md: scala.xml.MetaData = scala.xml.Null; $md = new s

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:11
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:11
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:13
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:13
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:14
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:15
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:16
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:16
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:17
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:17
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:18
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:20
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:22
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:22
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:23
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:24
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:26
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:26
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:27
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:30
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:31
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:31
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:32
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:33
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:34
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:35
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:35
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:36
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:38
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:38
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:39
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:41
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:41
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:42
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.FindbugsReportWriter.scala:43
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:64
Warning  Null parameter  com.sksamuel.scapegoat.inspections.nulls.NullParameter
Use an Option instead when the value can be empty and pass down a None instead.
new scala.xml.Elem(null, "head", scala.xml.Null, scala.xml.TopScope, false, (xml.this.NodeSeq.seqToNodeSeq({ val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer(); $buf.&+(new scala.xml.Text("\n ")); $buf.&+({ { new scala.xml.Elem(null, "title", scala.xml.Null, scala.xml.T

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:79
Warning  Null parameter  com.sksamuel.scapegoat.inspections.nulls.NullParameter
Use an Option instead when the value can be empty and pass down a None instead.
new scala.xml.Elem(null, "body", scala.xml.Null, scala.xml.TopScope, false, (xml.this.NodeSeq.seqToNodeSeq({ val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer(); $buf.&+(new scala.xml.Text("\n ")); $buf.&+({ { new scala.xml.Elem(null, "h1", scala.xml.Null, scala.xml.TopS

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:125
Warning  Null parameter  com.sksamuel.scapegoat.inspections.nulls.NullParameter
Use an Option instead when the value can be empty and pass down a None instead.
new scala.xml.Elem(null, "html", scala.xml.Null, scala.xml.TopScope, false, (xml.this.NodeSeq.seqToNodeSeq({ val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer(); $buf.&+(new scala.xml.Text("\n ")); $buf.&+(HtmlReportWriter.this.header); $buf.&+(HtmlReportWriter.this.body(reporte

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:65
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:73
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:80
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:81
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:96
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:96
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:99
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:99
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:102
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:102
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:103
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:103
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:104
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:104
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:108
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:108
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:110
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:116
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:116
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.IOUtils.scala:38
Warning  Unused parameter  com.sksamuel.scapegoat.inspections.unneccesary.UnusedMethodParameter
Unused constructor or method parameters should be removed.
Unused method parameter (val reporter: com.sksamuel.scapegoat.Feedback = _).

com.sksamuel.scapegoat.io.ScalastyleReportWriter.scala:14
Warning  Null parameter  com.sksamuel.scapegoat.inspections.nulls.NullParameter
Use an Option instead when the value can be empty and pass down a None instead.
new scala.xml.Elem(null, "checkstyle", $md, scala.xml.TopScope, false, (xml.this.NodeSeq.seqToNodeSeq({ val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer(); $buf.&+(new scala.xml.Text("\n ")); $buf.&+(feedback.warningsWithMinimalLevel.groupBy[String](((x$1: com.sksamuel.scapegoat.

com.sksamuel.scapegoat.io.ScalastyleReportWriter.scala:21
Warning  Null parameter  com.sksamuel.scapegoat.inspections.nulls.NullParameter
Use an Option instead when the value can be empty and pass down a None instead.
new scala.xml.Elem(null, "file", $md, scala.xml.TopScope, false, (xml.this.NodeSeq.seqToNodeSeq({ val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer(); $buf.&+(new scala.xml.Text("\n ")); $buf.&+(warnings.map[scala.xml.Elem](((warning: com.sksamuel.scapegoat.Warning) => ScalastyleR

com.sksamuel.scapegoat.io.ScalastyleReportWriter.scala:27
Warning  Null parameter  com.sksamuel.scapegoat.inspections.nulls.NullParameter
Use an Option instead when the value can be empty and pass down a None instead.
new scala.xml.Elem(null, "error", $md, scala.xml.TopScope, false)

com.sksamuel.scapegoat.io.XmlReportWriter.scala:11
Warning  Null parameter  com.sksamuel.scapegoat.inspections.nulls.NullParameter
Use an Option instead when the value can be empty and pass down a None instead.
new scala.xml.Elem(null, "scapegoat", $md, scala.xml.TopScope, false, (xml.this.NodeSeq.seqToNodeSeq({ val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer(); $buf.&+(new scala.xml.Text("\n ")); $buf.&+(feedback.warningsWithMinimalLevel.map[scala.xml.Elem](((warning: com.sksamuel.sca

com.sksamuel.scapegoat.io.XmlReportWriter.scala:17
Warning  Null parameter  com.sksamuel.scapegoat.inspections.nulls.NullParameter
Use an Option instead when the value can be empty and pass down a None instead.
new scala.xml.Elem(null, "warning", $md, scala.xml.TopScope, true)

com.sksamuel.scapegoat.plugin.scala:44
Warning  Use of asInstanceOf  com.sksamuel.scapegoat.inspections.unsafe.AsInstanceOf
Use of asInstanceOf is considered a bad practice - consider using pattern matching instead.
java.lang.Class.forName(inspection).getConstructor().newInstance().asInstanceOf[com.sksamuel.scapegoat.Inspection]

com.sksamuel.scapegoat.plugin.scala:239
Warning  Use of asInstanceOf  com.sksamuel.scapegoat.inspections.unsafe.AsInstanceOf
Use of asInstanceOf is considered a bad practice - consider using pattern matching instead.
tree.asInstanceOf[inspector.context.global.Tree]

com.sksamuel.scapegoat.plugin.scala:12
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val global: scala.tools.nsc.Global = _

com.sksamuel.scapegoat.plugin.scala:136
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val name: String = _

com.sksamuel.scapegoat.plugin.scala:140
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val global: scala.tools.nsc.Global = _

com.sksamuel.scapegoat.plugin.scala:140
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val inspections: Seq[com.sksamuel.scapegoat.Inspection] = _

com.sksamuel.scapegoat.plugin.scala:176
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val inspection: com.sksamuel.scapegoat.Inspection = _

com.sksamuel.scapegoat.plugin.scala:225
Warning  Variable shadowing  com.sksamuel.scapegoat.inspections.VariableShadowing
Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.
val unit: ScapegoatComponent.this.global.CompilationUnit = _
@mccartney
Copy link
Collaborator

mccartney commented Mar 22, 2020

Hmm. How can we run against our code base?
I tried adding the sbt plugin and it fails with:

sbt:scalac-scapegoat-plugin> scapegoat
[info] [scapegoat] Removing scapegoat class directory: git/scapegoat/target/scala-2.13.1/scapegoat-classes
[error] a module is not authorized to depend on itself: com.sksamuel.scapegoat#scalac-scapegoat-plugin_2.13.1;1.4.2
[error] stack trace is suppressed; run last update for the full output
[error] (update) java.lang.IllegalArgumentException: a module is not authorized to depend on itself: com.sksamuel.scapegoat#scalac-scapegoat-plugin_2.13.1;1.4.2
[error] Total time: 1 s, completed 22-Mar-2020 19:46:23

@mccartney
Copy link
Collaborator

More than half of the warnings reported above are VariableShadowing which got fixed in #313 (I hope)

@mwz
Copy link
Contributor Author

mwz commented Mar 22, 2020

Hmm. How can we run against our code base?
I tried adding the sbt plugin and it fails with:

You need to temporarily change the name of the project so it's different from scalac-scapegoat-plugin, e.g. in sbt set name := "scapegoat-test". See here for an example of how I automated this in the new PR workflow.

@mccartney
Copy link
Collaborator

With current master we are at:

Errors 3 Warnings 89 Infos 19
vs. previous:
Errors 3 Warnings 109 Infos 19

@mccartney
Copy link
Collaborator

After #322 and #325 we are at:

Errors 0 Warnings 52 Infos 19

@mccartney
Copy link
Collaborator

Fresh run:

Scapegoat Inspections

Errors: 0

Warnings: 42

Infos: 19

Report

com.sksamuel.scapegoat.Feedback.scala:83

Level: Info

Inspection: com.sksamuel.scapegoat.inspections.FinalModifierOnCaseClass

Missing final modifier on case class

Using case classes without final modifier can lead to surprising breakage.

com.sksamuel.scapegoat.Inspection.scala:37

Level: Info

Inspection: com.sksamuel.scapegoat.inspections.FinalModifierOnCaseClass

Missing final modifier on case class

Using case classes without final modifier can lead to surprising breakage.

com.sksamuel.scapegoat.inspections.DoubleNegation.scala:23

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.string.LooksLikeInterpolatedString

Looks like interpolated String

Did you forget to prefix this string with an s, f or raw to interpolate it?

com.sksamuel.scapegoat.inspections.MaxParameters.scala:25

Level: Info

Inspection: com.sksamuel.scapegoat.inspections.collections.ListSize

List.size is O(n)

List.size is O(n). Consider using a different data type with O(1) size lookup such as Vector or an Array.

com.sksamuel.scapegoat.inspections.NoOpOverride.scala:24

Level: Info

Inspection: com.sksamuel.scapegoat.inspections.collections.ListSize

List.size is O(n)

List.size is O(n). Consider using a different data type with O(1) size lookup such as Vector or an Array.

com.sksamuel.scapegoat.inspections.NoOpOverride.scala:24

Level: Info

Inspection: com.sksamuel.scapegoat.inspections.collections.ListSize

List.size is O(n)

List.size is O(n). Consider using a different data type with O(1) size lookup such as Vector or an Array.

com.sksamuel.scapegoat.inspections.NoOpOverride.scala:34

Level: Info

Inspection: com.sksamuel.scapegoat.inspections.collections.ListSize

List.size is O(n)

List.size is O(n). Consider using a different data type with O(1) size lookup such as Vector or an Array.

com.sksamuel.scapegoat.inspections.VarClosure.scala:26

Level: Info

Inspection: com.sksamuel.scapegoat.inspections.collections.ListAppend

List append is slow

List append is O(n). For large lists, consider using cons (::) or another data structure such as ListBuffer, Vector or a cats.data.Chain (which has constant prepend and append).

com.sksamuel.scapegoat.inspections.collections.CollectionPromotionToAny.scala:44

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.nulls.NullParameter

Null parameter

Use an Option instead when the value can be empty and pass down a None instead.

select.symbol.!=(null)

com.sksamuel.scapegoat.inspections.collections.DuplicateMapKey.scala:30

Level: Info

Inspection: com.sksamuel.scapegoat.inspections.collections.ListAppend

List append is slow

List append is O(n). For large lists, consider using cons (::) or another data structure such as ListBuffer, Vector or a cats.data.Chain (which has constant prepend and append).

com.sksamuel.scapegoat.inspections.collections.DuplicateMapKey.scala:34

Level: Info

Inspection: com.sksamuel.scapegoat.inspections.collections.ListSize

List.size is O(n)

List.size is O(n). Consider using a different data type with O(1) size lookup such as Vector or an Array.

com.sksamuel.scapegoat.inspections.collections.DuplicateSetValue.scala:28

Level: Info

Inspection: com.sksamuel.scapegoat.inspections.collections.ListSize

List.size is O(n)

List.size is O(n). Consider using a different data type with O(1) size lookup such as Vector or an Array.

com.sksamuel.scapegoat.inspections.collections.NegationIsEmpty.scala:24

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.string.LooksLikeInterpolatedString

Looks like interpolated String

Did you forget to prefix this string with an s, f or raw to interpolate it?

com.sksamuel.scapegoat.inspections.collections.NegationNonEmpty.scala:24

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.string.LooksLikeInterpolatedString

Looks like interpolated String

Did you forget to prefix this string with an s, f or raw to interpolate it?

com.sksamuel.scapegoat.inspections.collections.UnsafeContains.scala:35

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.unsafe.IsInstanceOf

Use of isInstanceOf

Use of isInstanceOf is considered a bad practice - consider using pattern matching instead.

elem.isInstanceOf[Any]

com.sksamuel.scapegoat.inspections.equality.ComparingUnrelatedTypes.scala:35

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.nulls.NullParameter

Null parameter

Use an Option instead when the value can be empty and pass down a None instead.

literal.value.convertTo(targetType).!=(null)

com.sksamuel.scapegoat.inspections.inference.ProductWithSerializableInferred.scala:32

Level: Info

Inspection: com.sksamuel.scapegoat.inspections.collections.ListSize

List.size is O(n)

List.size is O(n). Consider using a different data type with O(1) size lookup such as Vector or an Array.

com.sksamuel.scapegoat.inspections.matching.RepeatedCaseBody.scala:26

Level: Info

Inspection: com.sksamuel.scapegoat.inspections.collections.ListSize

List.size is O(n)

List.size is O(n). Consider using a different data type with O(1) size lookup such as Vector or an Array.

com.sksamuel.scapegoat.inspections.matching.RepeatedCaseBody.scala:30

Level: Info

Inspection: com.sksamuel.scapegoat.inspections.collections.ListSize

List.size is O(n)

List.size is O(n). Consider using a different data type with O(1) size lookup such as Vector or an Array.

com.sksamuel.scapegoat.inspections.math.UseLog10.scala:10

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.string.LooksLikeInterpolatedString

Looks like interpolated String

Did you forget to prefix this string with an s, f or raw to interpolate it?

com.sksamuel.scapegoat.inspections.math.UseLog1P.scala:10

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.string.LooksLikeInterpolatedString

Looks like interpolated String

Did you forget to prefix this string with an s, f or raw to interpolate it?

com.sksamuel.scapegoat.inspections.math.UseSqrt.scala:10

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.string.LooksLikeInterpolatedString

Looks like interpolated String

Did you forget to prefix this string with an s, f or raw to interpolate it?

com.sksamuel.scapegoat.inspections.naming.MethodNames.scala:26

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.string.LooksLikeInterpolatedString

Looks like interpolated String

Did you forget to prefix this string with an s, f or raw to interpolate it?

com.sksamuel.scapegoat.inspections.nulls.NullAssignment.scala:28

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.string.LooksLikeInterpolatedString

Looks like interpolated String

Did you forget to prefix this string with an s, f or raw to interpolate it?

com.sksamuel.scapegoat.inspections.string.IllegalFormatString.scala:39

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.nulls.NullParameter

Null parameter

Use an Option instead when the value can be empty and pass down a None instead.

scala.collection.immutable.Nil.padTo[Null](argCount, null)

com.sksamuel.scapegoat.inspections.string.IncorrectNumberOfArgsToFormat.scala:47

Level: Info

Inspection: com.sksamuel.scapegoat.inspections.collections.ListSize

List.size is O(n)

List.size is O(n). Consider using a different data type with O(1) size lookup such as Vector or an Array.

com.sksamuel.scapegoat.inspections.unneccesary.UnusedMethodParameter.scala:74

Level: Info

Inspection: com.sksamuel.scapegoat.inspections.RedundantFinalModifierOnMethod

Redundant final modifier on a method

A final modifier on methods that cannot be overridden is redundant.

com.sksamuel.scapegoat.inspections.unneccesary.VarCouldBeVal.scala:27

Level: Info

Inspection: com.sksamuel.scapegoat.inspections.collections.ListAppend

List append is slow

List append is O(n). For large lists, consider using cons (::) or another data structure such as ListBuffer, Vector or a cats.data.Chain (which has constant prepend and append).

com.sksamuel.scapegoat.inspections.unneccesary.VarCouldBeVal.scala:68

Level: Info

Inspection: com.sksamuel.scapegoat.inspections.collections.ListAppend

List append is slow

List append is O(n). For large lists, consider using cons (::) or another data structure such as ListBuffer, Vector or a cats.data.Chain (which has constant prepend and append).

com.sksamuel.scapegoat.inspections.unneccesary.VarCouldBeVal.scala:65

Level: Info

Inspection: com.sksamuel.scapegoat.inspections.RedundantFinalModifierOnMethod

Redundant final modifier on a method

A final modifier on methods that cannot be overridden is redundant.

com.sksamuel.scapegoat.inspections.unsafe.FinalizerWithoutSuper.scala:28

Level: Info

Inspection: com.sksamuel.scapegoat.inspections.collections.ListAppend

List append is slow

List append is O(n). For large lists, consider using cons (::) or another data structure such as ListBuffer, Vector or a cats.data.Chain (which has constant prepend and append).

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:68

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.nulls.NullParameter

Null parameter

Use an Option instead when the value can be empty and pass down a None instead.

new scala.xml.Elem(null, "head", scala.xml.Null, scala.xml.TopScope, false, (xml.this.NodeSeq.seqToNodeSeq({
  val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer();
  $buf.&+(new scala.xml.Text("\n      "));
  $buf.&+({
    {
      new scala.xml.Elem(null, "title", scala.xml.Null, scala.xml.T

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:87

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.nulls.NullParameter

Null parameter

Use an Option instead when the value can be empty and pass down a None instead.

new scala.xml.Elem(null, "body", scala.xml.Null, scala.xml.TopScope, false, (xml.this.NodeSeq.seqToNodeSeq({
  val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer();
  $buf.&+(new scala.xml.Text("\n      "));
  $buf.&+({
    {
      new scala.xml.Elem(null, "h1", scala.xml.Null, scala.xml.TopS

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:133

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.nulls.NullParameter

Null parameter

Use an Option instead when the value can be empty and pass down a None instead.

new scala.xml.Elem(null, "html", scala.xml.Null, scala.xml.TopScope, false, (xml.this.NodeSeq.seqToNodeSeq({
  val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer();
  $buf.&+(new scala.xml.Text("\n      "));
  $buf.&+(HtmlReportWriter.this.header);
  $buf.&+(HtmlReportWriter.this.body(reporte

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:69

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.VariableShadowing

Variable shadowing

Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.

val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:81

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.VariableShadowing

Variable shadowing

Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.

val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:88

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.VariableShadowing

Variable shadowing

Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.

val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:89

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.VariableShadowing

Variable shadowing

Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.

val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:103

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.VariableShadowing

Variable shadowing

Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.

var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:103

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.VariableShadowing

Variable shadowing

Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.

val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:106

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.VariableShadowing

Variable shadowing

Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.

var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:106

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.VariableShadowing

Variable shadowing

Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.

val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:109

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.VariableShadowing

Variable shadowing

Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.

var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:109

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.VariableShadowing

Variable shadowing

Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.

val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:110

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.VariableShadowing

Variable shadowing

Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.

var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:110

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.VariableShadowing

Variable shadowing

Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.

val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:111

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.VariableShadowing

Variable shadowing

Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.

var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:111

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.VariableShadowing

Variable shadowing

Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.

val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:113

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.VariableShadowing

Variable shadowing

Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.

var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:113

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.VariableShadowing

Variable shadowing

Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.

val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:117

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.VariableShadowing

Variable shadowing

Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.

val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:123

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.VariableShadowing

Variable shadowing

Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.

var $md: scala.xml.MetaData = scala.xml.Null

com.sksamuel.scapegoat.io.HtmlReportWriter.scala:123

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.VariableShadowing

Variable shadowing

Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.

val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer()

com.sksamuel.scapegoat.io.ScalastyleReportWriter.scala:15

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.nulls.NullParameter

Null parameter

Use an Option instead when the value can be empty and pass down a None instead.

new scala.xml.Elem(null, "checkstyle", $md, scala.xml.TopScope, false, (xml.this.NodeSeq.seqToNodeSeq({
  val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer();
  $buf.&+(new scala.xml.Text("\n      "));
  $buf.&+(feedback.warningsWithMinimalLevel.groupBy[String](((x$1: com.sksamuel.scapegoat.

com.sksamuel.scapegoat.io.ScalastyleReportWriter.scala:21

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.nulls.NullParameter

Null parameter

Use an Option instead when the value can be empty and pass down a None instead.

new scala.xml.Elem(null, "file", $md, scala.xml.TopScope, false, (xml.this.NodeSeq.seqToNodeSeq({
  val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer();
  $buf.&+(new scala.xml.Text("\n      "));
  $buf.&+(warnings.map[scala.xml.Elem](((warning: com.sksamuel.scapegoat.Warning) => ScalastyleR

com.sksamuel.scapegoat.io.ScalastyleReportWriter.scala:27

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.nulls.NullParameter

Null parameter

Use an Option instead when the value can be empty and pass down a None instead.

new scala.xml.Elem(null, "error", $md, scala.xml.TopScope, false)

com.sksamuel.scapegoat.io.XmlReportWriter.scala:15

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.nulls.NullParameter

Null parameter

Use an Option instead when the value can be empty and pass down a None instead.

new scala.xml.Elem(null, "scapegoat", $md, scala.xml.TopScope, false, (xml.this.NodeSeq.seqToNodeSeq({
  val $buf: scala.xml.NodeBuffer = new scala.xml.NodeBuffer();
  $buf.&+(new scala.xml.Text("\n      "));
  $buf.&+(feedback.warningsWithMinimalLevel.map[scala.xml.Elem](((warning: com.sksamuel.sca

com.sksamuel.scapegoat.io.XmlReportWriter.scala:23

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.nulls.NullParameter

Null parameter

Use an Option instead when the value can be empty and pass down a None instead.

new scala.xml.Elem(null, "warning", $md, scala.xml.TopScope, true)

com.sksamuel.scapegoat.plugin.scala:47

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.unsafe.AsInstanceOf

Use of asInstanceOf

Use of asInstanceOf is considered a bad practice - consider using pattern matching instead.

java.lang.Class.forName(inspection).getConstructor().newInstance().asInstanceOf[com.sksamuel.scapegoat.Inspection]

com.sksamuel.scapegoat.plugin.scala:249

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.unsafe.AsInstanceOf

Use of asInstanceOf

Use of asInstanceOf is considered a bad practice - consider using pattern matching instead.

tree.asInstanceOf[inspector.context.global.Tree]

com.sksamuel.scapegoat.plugin.scala:146

Level: Warning

Inspection: com.sksamuel.scapegoat.inspections.VariableShadowing

Variable shadowing

Variable shadowing is very useful, but can easily lead to nasty bugs in your code. Shadowed variables can be potentially confusing to other maintainers when the same name is adopted to have a new meaning in a nested scope.

val name: String = _

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