Ref T2039. Convert the ArcanistScalaSBTLinter into an ArcanistExternalLinter and make it compatible with .arclint.
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Maniphest Tasks
- Restricted Maniphest Task
- Commits
- rARC6c1bae437e30: Modernize `ArcanistScalaSBTLinter`.
I can't really test this because I don't have any Scala projects and we don't have any test cases.
Diff Detail
- Repository
- rARC Arcanist
- Branch
- scala
- Lint
Lint Passed - Unit
Tests Passed - Build Status
Buildable 429 Build 429: [Placeholder Plan] Wait for 30 Seconds
Event Timeline
@codeblock, not sure if you're still around but I think you wrote the original version of this? This diff looks OK to me but I don't have this stuff installed either and I'm not sure I can figure out how to test it properly.
Sounds good. If you don't get to it in the near future or it's a pain I'm happy to just pull this.
OK so there are a few things that are really wrong with this "linter":
- It's not really a linter, it's ultimately calling sbt compile and raising any warnings/errors to ArcanistScalaSBTLinter. This makes it very slow.
- AFAIK, sbt compile can't be run on a single file (which makes sense). This means that (at least in its current form) if I have two files, good.scala and bad.scala then arc lint -- good.scala will raise errors in bad.scala.
- I have no idea why the canRun logic exists. Whilst some projects may have those directories/files, it doesn't appear to be a prerequisite. I was able to use sbt without either of those files (with a simple "Hello World" project).
IMO, this linter should be deprecated. It appears that there are true Scala linters out there (such as Scalastyle and I would personally prefer to support a true linter than a compiler.
IMO, this linter should be deprecated. It appears that there are true Scala linters out there (such as Scalastyle and I would personally prefer to support a true linter than a compiler.
I agree; I'll just pull this for now since it improves things, but I'll accept a diff to mark it deprecated or remove it if you want. Otherwise, we can deprecate/remove it when we eventually introduce bindings for a more linty Scala linter, like Scalastyle.
Closed by commit rARC6c1bae437e30 (authored by @joshuaspence, committed by @epriestley).