Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Linter not catching any errors on any java files #115

Open
Fatalution opened this issue Mar 30, 2017 · 11 comments
Open

Linter not catching any errors on any java files #115

Fatalution opened this issue Mar 30, 2017 · 11 comments

Comments

@Fatalution
Copy link

I've had linter for a while now, but with the latest update and change in interface it shows me 0 errors...

@Arcanemagus
Copy link
Member

Do you have an example project where it isn't working? Are any other linter providers working?

@Fatalution
Copy link
Author

Haven't tested, I am pretty much a nooby, first year Uni, first year coding. Used Atom and linter-javac for my Java course and apparently it doesn't display any errors as it used to... Nothing changed really and I'm clueless.

Doesn't work across all my java files

@Fatalution
Copy link
Author

2017-03-30 2 34 09

Just to give you a vivid example

@florianb
Copy link
Contributor

Hi @Fatalution - thanks for getting in touch.

At first: I can't reproduce your issue.

It seems like you're using linter-javac the first time, please keep the following points in mind:

  • linter-javac needs Java being installed and the JAVA_HOME environment variable to be set (see this article) or the JavacExecutablePath-setting of linter-javac being set properly.
  • linter-javac currently only supports linting "on save"

If you still face that issue, linter-javac allows you to enable VerboseLogging in its settings. It then writes a lot of information into the console (see Window: Toggle Dev Tools) - look there for further information. If it shows an error, feel free to paste us a copy of the log entries. And do not forget to disable the verbose logging, since it slows Atom slightly down.

@tech6hutch
Copy link

Not sure if I should post this here or on a new issue, but I'm also having a problem where the linter just isn't catching any errors. I enabled verbose logging, and here's the output:

init.coffee:311 linter-javac: starting to lint.
init.coffee:311 linter-javac: start searching java-files with " W:\Personal\Coding\Discord\KekBot " as search-directory.
init.coffee:311 linter-javac: collected the following arguments: -Xlint:all -cp <?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
	<classpathentry kind="src" path="src/main/java"/>
	<classpathentry kind="src" path="src/main/resources"/>
	<classpathentry kind="src" path="src/test/java"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: com.github.austinv11:Discord4j:2.6.0"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.slf4j:slf4j-api:1.7.21"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.apache.httpcomponents:httpcore:4.4.5"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.apache.httpcomponents:httpclient:4.5.2"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: commons-logging:commons-logging:1.2"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: commons-codec:commons-codec:1.9"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.apache.httpcomponents:httpmime:4.5.2"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: commons-io:commons-io:2.5"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.eclipse.jetty.websocket:websocket-client:9.3.11.v20160721"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.eclipse.jetty:jetty-util:9.3.11.v20160721"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.eclipse.jetty:jetty-io:9.3.11.v20160721"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.eclipse.jetty.websocket:websocket-common:9.3.11.v20160721"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.eclipse.jetty.websocket:websocket-api:9.3.11.v20160721"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: net.jodah:typetools:0.4.7"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.apache.commons:commons-lang3:3.4"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: com.google.code.gson:gson:2.7"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: net.java.dev.jna:jna:4.2.2"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: com.googlecode.soundlibs:mp3spi:1.9.5-2"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: com.googlecode.soundlibs:jlayer:1.0.1-2"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: junit:junit:3.8.2"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.jcraft:jorbis:0.0.17"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: jflac:jflac:1.3"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: com.googlecode.soundlibs:tritonus-share:0.3.7-3"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.tritonus:tritonus-dsp:0.3.6"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: ch.qos.logback:logback-classic:1.1.7"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: ch.qos.logback:logback-core:1.1.7"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: com.fasterxml.jackson.core:jackson-databind:2.2.3"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: com.fasterxml.jackson.core:jackson-annotations:2.2.3"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: com.fasterxml.jackson.core:jackson-core:2.2.3"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: ca.pjer:chatter-bot-api:1.4.2"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.jdom:jdom2:2.0.6"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: com.mashape.unirest:unirest-java:1.4.9"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.apache.httpcomponents:httpasyncclient:4.1.1"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.apache.httpcomponents:httpcore-nio:4.4.4"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.json:json:20160212"/>
	<classpathentry kind="output" path="target/classes"/>
</classpath>
init.coffee:311 linter-javac: adding 127 files to the javac-arguments (from " W:\Personal\Coding\Discord\KekBot\src\main\java\com\godson\kekbot\CustomEmote.java " to " W:\Personal\Coding\Discord\KekBot\src\main\java\com\godson\kekbot\Utils.java ").
init.coffee:178 linter-javac: The lint-command is presumed to break the limit of 7900 characters on the win32-platform.
Dropping 89 source files, as a result javac may not resolve all dependencies.
init.coffee:311 linter-javac: calling javac with 42 arguments by invoking " "C:\Program Files\Java\jdk1.8.0_121\bin\javac.exe" ". The approximated command length is 7864 characters long, the last argument is: W:\Personal\Coding\Discord\KekBot\src\main\java\com\godson\kekbot\commands\fun\Pick.java
init.coffee:311 linter-javac: parsing:
 The command line is too long.
init.coffee:311 linter-javac: detecting languages

It says "Dropping 89 source files, as a result javac may not resolve all dependencies", but it's not linting syntax, either.

@florianb
Copy link
Contributor

Hi @tech6hutch - your issue belongs to #58. Which version of Linter-Javac do you use?

@tech6hutch
Copy link

I'm on version 1.9.4. Atom isn't showing any updates for it.

@florianb
Copy link
Contributor

Interesting, because the log-statements originate from an outdated version of linter-javac where the sourcepath-option wasn't used.

@tech6hutch
Copy link

Weird. That's what it says. I'll try uninstalling and reinstalling the plugin.

@florianb
Copy link
Contributor

florianb commented Jul 17, 2017

You might also want to check for any links (apm links) - even though this is pretty unlikely.

@tech6hutch
Copy link

Reinstalling didn't change anything. It still outputs this to console:

linter-javac: providing linter, examining javac-callability.
init.coffee:311 linter-javac: starting to lint.
init.coffee:311 linter-javac: start searching java-files with " W:\Personal\Coding\Discord\KekBot " as search-directory.
init.coffee:311 linter-javac: collected the following arguments: -Xlint:all -cp <?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
	<classpathentry kind="src" path="src/main/java"/>
	<classpathentry kind="src" path="src/main/resources"/>
	<classpathentry kind="src" path="src/test/java"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: com.github.austinv11:Discord4j:2.6.0"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.slf4j:slf4j-api:1.7.21"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.apache.httpcomponents:httpcore:4.4.5"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.apache.httpcomponents:httpclient:4.5.2"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: commons-logging:commons-logging:1.2"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: commons-codec:commons-codec:1.9"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.apache.httpcomponents:httpmime:4.5.2"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: commons-io:commons-io:2.5"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.eclipse.jetty.websocket:websocket-client:9.3.11.v20160721"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.eclipse.jetty:jetty-util:9.3.11.v20160721"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.eclipse.jetty:jetty-io:9.3.11.v20160721"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.eclipse.jetty.websocket:websocket-common:9.3.11.v20160721"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.eclipse.jetty.websocket:websocket-api:9.3.11.v20160721"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: net.jodah:typetools:0.4.7"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.apache.commons:commons-lang3:3.4"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: com.google.code.gson:gson:2.7"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: net.java.dev.jna:jna:4.2.2"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: com.googlecode.soundlibs:mp3spi:1.9.5-2"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: com.googlecode.soundlibs:jlayer:1.0.1-2"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: junit:junit:3.8.2"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.jcraft:jorbis:0.0.17"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: jflac:jflac:1.3"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: com.googlecode.soundlibs:tritonus-share:0.3.7-3"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.tritonus:tritonus-dsp:0.3.6"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: ch.qos.logback:logback-classic:1.1.7"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: ch.qos.logback:logback-core:1.1.7"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: com.fasterxml.jackson.core:jackson-databind:2.2.3"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: com.fasterxml.jackson.core:jackson-annotations:2.2.3"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: com.fasterxml.jackson.core:jackson-core:2.2.3"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: ca.pjer:chatter-bot-api:1.4.2"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.jdom:jdom2:2.0.6"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: com.mashape.unirest:unirest-java:1.4.9"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.apache.httpcomponents:httpasyncclient:4.1.1"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.apache.httpcomponents:httpcore-nio:4.4.4"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.json:json:20160212"/>
	<classpathentry kind="output" path="target/classes"/>
</classpath>
init.coffee:311 linter-javac: adding 128 files to the javac-arguments (from " W:\Personal\Coding\Discord\KekBot\src\main\java\com\godson\kekbot\CustomEmote.java " to " W:\Personal\Coding\Discord\KekBot\src\main\java\com\godson\kekbot\Utils.java ").
init.coffee:178 linter-javac: The lint-command is presumed to break the limit of 7900 characters on the win32-platform.
Dropping 90 source files, as a result javac may not resolve all dependencies.
init.coffee:311 linter-javac: calling javac with 42 arguments by invoking " "C:\Program Files\Java\jdk1.8.0_121\bin\javac.exe" ". The approximated command length is 7862 characters long, the last argument is: W:\Personal\Coding\Discord\KekBot\src\main\java\com\godson\kekbot\commands\fun\Pick.java
init.coffee:311 linter-javac: parsing:
 The command line is too long.
init.coffee:311 linter-javac: detecting languages

My settings were still there, after uninstalling and reinstalling. (All I set was the verbose logging toggle and the javac executable path, since javac isn't on my path.)
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants