Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/scala/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何启用scala linter?_Scala_Sbt_Lint - Fatal编程技术网

如何启用scala linter?

如何启用scala linter?,scala,sbt,lint,Scala,Sbt,Lint,我在build.sbt中添加了以下内容: 现在怎么办?我可以像往常一样编译我的项目,但看不到linter的任何输出。我需要运行特殊的sbt任务吗?来自他们的: 您应该得到如下警告: Parameter a is not used in method f. [warn] def f(a: Int) = 10 [warn] ^ terminal: scalac -Xplugin:<path-to-linter-jar>.jar ... sbt: (in build

我在build.sbt中添加了以下内容:

现在怎么办?我可以像往常一样编译我的项目,但看不到linter的任何输出。我需要运行特殊的sbt任务吗?

来自他们的:

您应该得到如下警告:

Parameter a is not used in method f.
[warn]   def f(a: Int) = 10
[warn]       ^
terminal:
  scalac -Xplugin:<path-to-linter-jar>.jar ...

sbt: (in build.sbt)
  scalacOptions += "-Xplugin:<path-to-linter-jar>.jar"

maven: (in pom.xml inside scala-maven-plugin configuration)
  <configuration>
    <args>
      <arg>-Xplugin:<path-to-linter-jar>.jar</arg>
    </args>
  </configuration>
def f(a: Int) = 10
Parameter a is not used in method f.
[warn]   def f(a: Int) = 10
[warn]       ^