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

Incorrect linting for sbt files #804

Closed
partounian opened this issue Jul 24, 2017 · 1 comment
Closed

Incorrect linting for sbt files #804

partounian opened this issue Jul 24, 2017 · 1 comment
Labels

Comments

@partounian
Copy link

partounian commented Jul 24, 2017

I am new to Scala/Sbt so it might be my issue but it should not be throwing these errors for the sbt/configuration files.

Current Filetype: sbt.scala
Available Linters: ['scalac', 'scalastyle']
Enabled Linters: ['scalac', 'scalastyle']
Linter Variables:

let g:ale_scala_scalastyle_options = ''
 Global Variables:

let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%s'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_fix_on_save = 0
let g:ale_fixers = {}
let g:ale_keep_list_window_open = 0
let g:ale_lint_delay = 200
let g:ale_lint_on_enter = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'always'
let g:ale_linter_aliases = {}
let g:ale_linters = {'php': ['php -l']}
let g:ale_open_list = 0
let g:ale_set_highlights = 1
let g:ale_set_loclist = 1
let g:ale_set_quickfix = 0
let g:ale_set_signs = 1
let g:ale_sign_column_always = 0
let g:ale_sign_error = '>>'
let g:ale_sign_offset = 1000000
let g:ale_sign_warning = '--'
let g:ale_statusline_format = ['%d error(s)', '%d warning(s)', 'OK']
let g:ale_warn_about_trailing_whitespace = 1
  Command History:

(finished - exit code 1) ['/bin/zsh', '-c', 'scalac -Ystop-after:parser ''/var/folders/8r/fyy8jscd57s30zw0xx6nxww00000gn/T/nvimMinzHM/1/build.sbt''']

<<<OUTPUT STARTS>>>
/var/folders/8r/fyy8jscd57s30zw0xx6nxww00000gn/T/nvimMinzHM/1/build.sbt:1: error: expected class or object definition
organization := "com.pollyserver"
^
/var/folders/8r/fyy8jscd57s30zw0xx6nxww00000gn/T/nvimMinzHM/1/build.sbt:3: error: expected class or object definition
name := "Polly Server"
^
/var/folders/8r/fyy8jscd57s30zw0xx6nxww00000gn/T/nvimMinzHM/1/build.sbt:5: error: expected class or object definition
version := "1.0.2"
^
/var/folders/8r/fyy8jscd57s30zw0xx6nxww00000gn/T/nvimMinzHM/1/build.sbt:7: error: expected class or object definition
scalaVersion := "2.12.2"
^
/var/folders/8r/fyy8jscd57s30zw0xx6nxww00000gn/T/nvimMinzHM/1/build.sbt:9: error: expected class or object definition
scalacOptions ++= Seq(
^
/var/folders/8r/fyy8jscd57s30zw0xx6nxww00000gn/T/nvimMinzHM/1/build.sbt:24: error: expected class or object definition
scalacOptions in (Compile, doc) ++= baseDirectory.map {
^
/var/folders/8r/fyy8jscd57s30zw0xx6nxww00000gn/T/nvimMinzHM/1/build.sbt:31: error: expected class or object definition
javacOptions ++= Seq(
^
/var/folders/8r/fyy8jscd57s30zw0xx6nxww00000gn/T/nvimMinzHM/1/build.sbt:39: error: expected class or object definition
resolvers ++= Seq(
^
/var/folders/8r/fyy8jscd57s30zw0xx6nxww00000gn/T/nvimMinzHM/1/build.sbt:42: error: expected class or object definition
libraryDependencies ++= Seq(
^
/var/folders/8r/fyy8jscd57s30zw0xx6nxww00000gn/T/nvimMinzHM/1/build.sbt:49: error: expected class or object definition
logLevel := Level.Warn
^
/var/folders/8r/fyy8jscd57s30zw0xx6nxww00000gn/T/nvimMinzHM/1/build.sbt:53: error: expected class or object definition
logLevel in compile := Level.Warn
^
/var/folders/8r/fyy8jscd57s30zw0xx6nxww00000gn/T/nvimMinzHM/1/build.sbt:56: error: expected class or object definition
logLevel in test := Level.Info
^
/var/folders/8r/fyy8jscd57s30zw0xx6nxww00000gn/T/nvimMinzHM/1/build.sbt:59: error: expected class or object definition
initialCommands in console := """
^
/var/folders/8r/fyy8jscd57s30zw0xx6nxww00000gn/T/nvimMinzHM/1/build.sbt:62: error: expected class or object definition
cancelable := true
^
/var/folders/8r/fyy8jscd57s30zw0xx6nxww00000gn/T/nvimMinzHM/1/build.sbt:64: error: expected class or object definition
sublimeTransitive := true
^
15 errors found
<<<OUTPUT ENDS>>>

EDIT: I also noticed issue with Java + sbt projects, I get errors thrown that packages are missing but my project compiles and runs fine.

@w0rp w0rp added the bug label Jul 26, 2017
@w0rp w0rp closed this as completed in 86297a7 Jul 26, 2017
@w0rp
Copy link
Member

w0rp commented Jul 26, 2017

Now scalac will not be run for sbt files.

rsrchboy added a commit to rsrchboy/ale that referenced this issue Jul 26, 2017
* upstream/master:
  Add a fuzzy JSON decoding function for ignoring json_decode errors for linters
  dense-analysis#810 Ignore output which isn't JSON for brakeman
  Remove channel logging
  Check the active_linter_list only for running linters
  Remove a redundant check for tsserver
  dense-analysis#517 Add more code LSP support which makes the tssserver linter behave more like the LSP linters
  Fix dense-analysis#804 - Do not run scalac for sbt files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants