Skip to content

Commit

Permalink
add explicit type
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed Sep 11, 2023
1 parent 336d1ed commit f5cfd83
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion rules/src/main/scala/fix/DirectoryAndPackageName.scala
Original file line number Diff line number Diff line change
Expand Up @@ -169,5 +169,5 @@ class DirectoryAndPackageName(config: DirectoryAndPackageNameConfig) extends Syn
case class DirectoryPackageWarn(path: String, packageName: String, override val position: Position) extends Diagnostic {
override def message = s"inconsistent package and directory\n${path}\n${packageName}"

override def severity = LintSeverity.Warning
override def severity: LintSeverity = LintSeverity.Warning
}
2 changes: 1 addition & 1 deletion rules/src/main/scala/fix/ExplicitImplicitTypes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,5 @@ class ExplicitImplicitTypes(config: ExplicitImplicitTypesConfig) extends Syntact

case class ExplicitImplicitTypesWarn(override val position: Position) extends Diagnostic {
override def message = "add explicit types for implicit values"
override def severity = LintSeverity.Warning
override def severity: LintSeverity = LintSeverity.Warning
}
2 changes: 1 addition & 1 deletion rules/src/main/scala/fix/LambdaParamParentheses.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ class LambdaParamParentheses extends SyntacticRule("LambdaParamParentheses") {

case class LambdaParamParenthesesWarn(override val position: Position) extends Diagnostic {
override def message = "add parentheses or remove explicit types for prepare Scala 3"
override def severity = LintSeverity.Warning
override def severity: LintSeverity = LintSeverity.Warning
}
2 changes: 1 addition & 1 deletion rules/src/main/scala/fix/NoElse.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ class NoElse extends SyntacticRule("NoElse") {

case class NoElseWarn(override val position: Position) extends Diagnostic {
override def message = "add `else`"
override def severity = LintSeverity.Warning
override def severity: LintSeverity = LintSeverity.Warning
}
2 changes: 1 addition & 1 deletion rules/src/main/scala/fix/ObjectSelfType.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ObjectSelfType extends SyntacticRule("ObjectSelfType") {
new Diagnostic {
override def position = obj.templ.self.pos
override def message = "objects must not have a self type"
override def severity = LintSeverity.Warning
override def severity: LintSeverity = LintSeverity.Warning
}
)
}.asPatch
Expand Down
2 changes: 1 addition & 1 deletion rules/src/main/scala/fix/OptionMapFlatMap.scala
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ class OptionMapFlatMap extends SyntacticRule("OptionMapFlatMap") {

case class OptionMapFlatMapWarn(override val position: Position) extends Diagnostic {
override def message = "maybe you can use Option#map or flatMap"
override def severity = LintSeverity.Warning
override def severity: LintSeverity = LintSeverity.Warning
}
2 changes: 1 addition & 1 deletion rules/src/main/scala/fix/Scala3ImportWarn.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ class Scala3ImportWarn extends SyntacticRule("Scala3ImportWarn") {

case class Scala3ImportWarning(override val position: Position) extends Diagnostic {
override def message: String = "use `*` instead of `_` for wildcard import"
override def severity = LintSeverity.Warning
override def severity: LintSeverity = LintSeverity.Warning
}
2 changes: 1 addition & 1 deletion rules/src/main/scala/fix/Scala3Placeholder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ class Scala3Placeholder extends SyntacticRule("Scala3Placeholder") {

case class Scala3PlaceholderWarn(override val position: Position) extends Diagnostic {
override def message: String = "use ? instead of _"
override def severity = LintSeverity.Warning
override def severity: LintSeverity = LintSeverity.Warning
}
2 changes: 1 addition & 1 deletion rules/src/main/scala/fix/SyntacticOrganizeImports.scala
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ case class SyntacticOrganizeImportsWarn(
override val position: Position,
override val message: String
) extends Diagnostic {
override def severity = LintSeverity.Warning
override def severity: LintSeverity = LintSeverity.Warning
}
2 changes: 1 addition & 1 deletion rules/src/main/scala/fix/UnnecessarySort.scala
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ class UnnecessarySort extends SyntacticRule("UnnecessarySort") {
}

case class UnnecessarySortWarn(override val position: Position, message: String) extends Diagnostic {
override def severity = LintSeverity.Warning
override def severity: LintSeverity = LintSeverity.Warning
}
2 changes: 1 addition & 1 deletion rules/src/main/scala/fix/UnusedTypeParams.scala
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ class UnusedTypeParams extends SyntacticRule("UnusedTypeParams") {

class UnusedTypeParamsWarn(override val position: Position) extends Diagnostic {
override def message = "maybe unused type param"
override def severity = LintSeverity.Warning
override def severity: LintSeverity = LintSeverity.Warning
}

0 comments on commit f5cfd83

Please sign in to comment.