summaryrefslogtreecommitdiff
path: root/ale_linters/java
AgeCommit message (Collapse)Author
2021-03-01Close #2281 - Separate cwd commands from commandsw0rp
Working directories are now set seperately from the commands so they can later be swapped out when running linters over projects is supported, and also better support filename mapping for running linters on other machines in future.
2021-01-24fix(eclipselsp): org.eclipse.equinox.launcher_xxxx.jar file matching failedNiBo
2020-11-26Fix regexp pattern to work correctly in nvim and vim on windows and linuxfwy
2020-09-30Add maven helper file; use maven wrapper if available instead of global ↵fenuks
'mvn' executable
2020-08-13fix(eclipselsp): Get jar file path failedNiBo
Error: Unable to access jarfile
2020-07-21Merge pull request #2914 from hsanson/2913-fix-checkstyle-config-with-optionsw0rp
Fix 2913 - checkstyle config file ignored.
2020-07-21Merge pull request #3137 from hsanson/3132-fix-eclipselsp-commandw0rp
Fix eclipselsp command function.
2020-05-19refactor(javac): ale_java_javac_sourcepath variable defaults to StringNiBo
2020-05-19refactor(javac): ale_java_javac_classpath variable supports String and List ↵NiBo
types
2020-05-19refactor(javac): ale_java_javac_sourcepath variable supports String and List ↵NiBo
types
2020-05-15style(javac): Code formattingNiBo
2020-05-15feat(javac): Add java_javac_sourcepath variableNiBo
This variable can set multiple source code paths, the source code path is a relative path (relative to the project root directory)
2020-04-25Fix eclipselsp command function.Horacio Sanson
Changes in eclipselsp and java caused the command needed to run the language server fail to build properly. Thi PR fixes those issues.
2020-03-26Fix code conventionpuritys
2020-03-26To support javaagent on eclipselsppuritys
2019-11-27Fix 2913 - checkstyle config file ignored.Horacio Sanson
If checkstyle is configured with custom options that contain "-c" then the checkstyle config file option is ignored. This PR modifies the regular expression when creating the checkstyle command to avoid this.
2019-06-19Add support for javalsp configuration options.Horacio Sanson
This MR adds a new configuration variable `g:ale_java_javalsp_config` that allows to configure external dependencies and class paths to the language server. The variable accepts a dictionary similar to the one supported by the [vscode/settings.json](https://github.com/georgewfraser/java-language-server#settings) file. Deprecates: #2561
2019-06-12Fix checkstyle default configuration.Horacio Sanson
Checkstyle xml configuration is mandatory and not providing one causes the tool to fail with the following error: Must specify a config XML file. Checkstyle itself contains a default configuration as part of its assests named `/google_checks.xml`. Invoking checkstyle with this config works even if such file does not exists in the file system: checkstyle -c /google_checks.xml This should be the default invocation to allow ALE to use checkstyle with zero configuration. Also when a user sets `g:ale_java_checkstyle_config` option, ALE should use it to invoke checkstyle even such file does not exists in the filesystem. This is because checkstyle is able to use configuration files within JAR files defined in the CLASSPATH. The default `/google_checks.xml` is an example of such configuration available within a JAR resource.
2019-06-09Do not set default binary.Horacio Sanson
The default binary "launcher" is too generic and can get mixed with other tools. To use this linter user must explicitly set the absolute path of the launcher path.
2019-06-05Fix javalsp command callback.Horacio Sanson
The command used to invoke the language server is missing some options to include additional java modules. Without these modules the server was not working properly. The correct command can be found in a `launcher` script on the same directory the `java` executable for the language server is found. This commit changes the docs to prefer the launcher script over the java executable. For backward compatibility it also fixes the command invocation in case the java executable is configured.
2019-06-03#2542 - Improve checkstyle project configurationw0rp
2019-06-03Feature/add ant support (#2539)Andrew Lee
Use ant files to load Java settings too.
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.