src/main/scala/com/github/gtache/lsp/PluginMain.scala
Function editorOpened
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def editorOpened(editor: Editor): Unit = {
if (!loadedExtensions) {
val extensions = LanguageServerDefinition.getAllDefinitions.filter(s => !extToServerDefinition.contains(s.ext))
LOG.info("Added serverDefinitions " + extensions + " from plugins")
extToServerDefinition = extToServerDefinition ++ extensions.map(s => (s.ext, s))
Function workspaceSymbols
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def workspaceSymbols(name: String, pattern: String, project: Project, includeNonProjectItems: Boolean = false, onlyKind: Set[SymbolKind] = Set()): Array[NavigationItem] = {
projectToLanguageWrappers.get(FileUtils.pathToUri(project.getBasePath)) match {
case Some(set) =>
val params: WorkspaceSymbolParams = new WorkspaceSymbolParams(name)
val servDefToReq = set.collect {
Method workspaceSymbols
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def workspaceSymbols(name: String, pattern: String, project: Project, includeNonProjectItems: Boolean = false, onlyKind: Set[SymbolKind] = Set()): Array[NavigationItem] = {
File line length exceeds 160 characters Open
Open
val openedEditors: Iterable[Editor] = ApplicationUtils.computableReadAction(() => ProjectManager.getInstance().getOpenProjects.flatMap(proj => FileEditorManager.getInstance(proj).getAllEditors()).collect { case t: TextEditor => t.getEditor })
- Exclude checks
File line length exceeds 160 characters Open
Open
def workspaceSymbols(name: String, pattern: String, project: Project, includeNonProjectItems: Boolean = false, onlyKind: Set[SymbolKind] = Set()): Array[NavigationItem] = {
- Exclude checks
Avoid using null Open
Open
case null =>
- Exclude checks
Avoid using null Open
Open
.filter(s => if (onlyKind.isEmpty) true else onlyKind.contains(s.getKind)) else null)
- Exclude checks
Avoid wildcard imports Open
Open
import scala.collection.JavaConverters._
- Exclude checks
If block needs braces Open
Open
if (!servDefToReq.contains(null)) {
- Exclude checks
Avoid using null Open
Open
null
- Exclude checks
Avoid using null Open
Open
if (!servDefToReq.contains(null)) {
- Exclude checks
Avoid wildcard imports Open
Open
import org.eclipse.lsp4j._
- Exclude checks
Avoid wildcard imports Open
Open
import scala.collection.JavaConverters._
- Exclude checks
Avoid wildcard imports Open
Open
import scala.collection.JavaConverters._
- Exclude checks
Avoid wildcard imports Open
Open
import PluginMain._
- Exclude checks
The string literal " is null" appears 3 times in the file. Open
Open
nullDef.foreach(ext => LOG.error("Definition for " + ext + " is null"))
- Exclude checks
If block needs braces Open
Open
(w._1, if (symbols != null) symbols.asScala
- Exclude checks
Imports should be grouped together Open
Open
import PluginMain._
- Exclude checks
Imports should be grouped together Open
Open
import scala.collection.JavaConverters._
- Exclude checks
Imports should be grouped together Open
Open
import scala.collection.JavaConverters._
- Exclude checks
Imports should be grouped together Open
Open
import scala.collection.JavaConverters._
- Exclude checks