summaryrefslogtreecommitdiff
path: root/ale_linters/java
AgeCommit message (Collapse)Author
2019-05-28Fix java checkstyle handler.Horacio Sanson
The checkstyle handler is capable of parsing the new and old output formats. Unfortunately there are some particular output messages that matched both the new and old regular expressions: [WARN] whatever:11:7: WhitespaceAround: ''if'' is not followed by whitespace. [WhitespaceAround] This caused ALE to report extra errors since the message was being matched twice, once as a warning and another (incorrect) old formatted error. This MR fixes this by stopping any parsing using the old format regexp is any errors of the new format are correcly parsed. There is no reason to expect checkstyle to output both styles in the same report.
2019-05-22Fix eclipse.jdt.ls workspace data path.Horacio Sanson
We were setting the -data parameter to the project root but this caused the language server to fail initialization and synch of gradle dependencies. As consequence ALE failed to work fully on gradle projects. This fix sets the workspace to the parent folder of the project root. Normally this corresponds to the correct Eclipse workspace path. When this is not the case, this fix also allows users to explicitly set the absolute path to the workspace via configuration variable.
2019-05-21Allow running eclipselsp as installed by system package on GNU/Linux (#2523)Grim Kriegor
* Search eclipselsp jar and config files within system package path * Allow setting an alternate eclipselsp configuration directory * Add test for ale_java_eclipselsp_config_path
2019-05-08Merge pull request #2134 from oaue/masterw0rp
javac linter: fix handling of error messages containing ':' character
2019-05-08Improve eclipselsp jar search logic.Horacio Sanson
- Set default value to $HOME/eclipse.jdt.ls - Make JAR search regexp more specific. - Allow to set the VSCode extensions folder as ale_java_eclipselsp_path.
2019-04-11Fix 1996 - Add eclipse LSP support.Horacio Sanson
2019-04-07#2132 - Replace command_chain and chain_with with ale#command#Runw0rp
2019-03-06Merge pull request #2305 from campbellr/masterw0rp
javac: Don't assume src/main/java always exists
2019-03-03javac: Don't assume src/main/java always existsRyan Campbell
Some projects I have only have src/test/java (no /src/main/java), which seemed to break some incorrect assumptions the linter had.
2019-02-22#2132 - Replace all uses of foo_callback with foow0rp
2019-02-07Fixes javalsp linterJan Ouwens
2019-01-26#2132 Unify temporary file management in command.vimw0rp
2018-12-09javac linter: fix handling of error messages containing ':' characterDavid LANDREAU
2018-12-05Fix javalsp command.Horacio Sanson
The command used to invoke the LSP process was being escaped wrong. Also added a new option to set a different java executable and fixed the documentation.
2018-11-07Let checkstyle only lint original filesJohannes Wienke
Temporary files break checks like the one for a missing package-info.java, as discussed in #1305.
2018-11-07Support older checkstyle versionsJohannes Wienke
The output format used by older checkstyle versions differs from the one of new versions. This commit adds a second parsing iteration on the output lines with a suitable pattern to support both versions in parallel. Due to the differences in the order of matching groups this is hard to achieve in a single pass through the output lines. An appropriate test case is added.
2018-10-02Fix PMD not working with classes without packageDiego Lemos
PMD is currently not working properly for Java classes that use [unnamed packages](https://docs.oracle.com/javase/specs/jls/se11/html/jls-7.html#jls-7.4.2). Consider the following Java class that does not contain a `package` declaration: ```java public class App { String getGreeting() { return "Hello world."; } static void main(String... args) { System.out.println(new App().getGreeting()); } } ``` Running PMD in the command line agaist the Java class above produces an output with empty string `""` in the `"Package"` column: ```sh $ pmd -R category/java/bestpractices.xml -f csv -d './src/main/java/App.java' Oct 02, 2018 9:10:39 PM net.sourceforge.pmd.PMD processFiles WARNING: This analysis could be faster, please consider using Incremental Analysis: https://pmd.github.io/pmd-6.7.0/pmd_userdocs_incremental_analysis.html "Problem","Package","File","Priority","Line","Description","Rule set","Rule" "1","","/Users/diego/Projects/github.com/dlresende/kata-fizz-buzz/src/main/java/App.java","2","7","System.out.println is used","Best Practices","SystemPrintln" ``` But the pmd.vim handler's current pattern refuses everything coming from a Java class that does not have a package name (2nd column): ```vim let l:pattern = '"\(\d\+\)",".\+","\(.\+\)","\(\d\+\)","\(\d\+\)","\(.\+\)","\(.\+\)","\(.\+\)"$' ``` The solution I am proposing is to also accept empty strings as package names.
2018-09-04Improve ALE project style checkingw0rp
* The project style linter now runs while you type. * Now the scripts for checking the project require blank lines. * Many style issues have been found and fixed.
2018-08-26Add vader test and fix command callback.Horacio Sanson
2018-08-24Add vscode-java-language-server linterHoracio Sanson
2018-08-02Simplify the code for most linters and tests with closuresw0rp
2018-07-15Massively reduce the amount of code needed for linter testsw0rp
2018-04-09Add support for the java PMD linterJohannes Wienke
2018-04-08Close #1476 - Make the javac executable configurablew0rp
2017-11-20Fix #859 Include test and jaxb Java source paths when availablew0rp
2017-11-18#852 - Capture error codes for checkstylew0rp
2017-11-05Fix #1061 - Handle the filenames returned by javacw0rp
2017-08-29Gradle support for javacBrayden Banks
Based off of #745.
2017-08-08Ban use of ==# or ==? in the codebase, and prefer is# or is? insteadw0rp
2017-06-19handle column number in javac linter (#660)oaue
* handle column number in javac linter * Updated tests with column number for javac errors. * Updated tests with column number for javac errors.
2017-05-28Revert "Fix #501 - Do not run javac when it is just a stub asking you to ↵w0rp
install Java on Mac OSX" This reverts commit 528355e2c6cf64fbc0d459a7a512a7823f90043d.
2017-05-15Add checkstyle linterDevon Meunier
2017-05-12#549 Temporarily revert shell escaping changes, just for Windowsw0rp
2017-05-08#540 Fix shell escaping pretty much everywherew0rp
2017-05-04#502 Parse more undefined symbol errorsw0rp
2017-05-04Fix #502 - Report undefined symbol errors better for javacw0rp
2017-05-04Fix #501 - Do not run javac when it is just a stub asking you to install ↵w0rp
Java on Mac OSX
2017-04-25Fixes #361, fixes #417 Get classpaths from Maven, and automatically detect ↵w0rp
src/main/java paths
2017-04-18Add a function for getting matches, and use it to simplify a lot of codew0rp
2017-04-16#427 Implement buffer variable overrides for all linter optionsw0rp
2017-03-31Fix #438 Create Java .class files for javac in a temporary directoryw0rp
2017-03-30Remove 'col' from linters where it is hardcoded to 1 (#434)Adriaan Zonnenberg
* Remove 'col' from linters where it is hardcoded to 1 When 'col' is 1, the first column will get highlighted for no reason. It should be 0 (which is the default). In the scalac linter there was also a check about the outcome of `stridx`. It would set l:col to 0 if it was -1, and then it uses `'col': l:col + 1` to convert the outcome of `stridx` to the actual column number. This will make 'col' equals 1 when there is no match. We can remove the check because `-1 + 1 = 0`. * Remove outdated comments about vcol vcol was added as a default, and the loclists that follow these comments do not contain 'vcol' anymore
2017-02-26Copy all loclist items returned from handlers, and set up defaults for ↵w0rp
convenience
2017-02-11Fix the custom check issue.w0rp
2017-02-11Make javac work in a basic wayw0rp
2017-02-11Added support for javac (with eclipse classpath support for now) (#141)Valentin Finini
* A try at javac support for ALE * Small cleanup: moved '/tmp/java_ale' string into script var * Fixed Travis-CI build failing on autocmd not being in augroup and stupid omission * One more fix for Travis-CI * For some reason, expandtab was not set * Indentation and removal of header guard. Used examples from ale_linters/c/gcc.vim and ale_linters/javascript/eslint.vim for the indentation of string concat blocks.