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
Add support for the Java 8 syntax #10
Comments
sure, everyone are welcome with pull request. For now we, our tiny team, do transitions from SourceForge to Github to analyse new priorities and set of tasks to fix in current implementation. You are right, Java8 syntax will be a challenge for all existing Checks, so please do not expect java8 support in Checkstyle to appear quickly, sorry, but it is definitely a priority task. |
This seems to be a pretty important issue to me. Java 8 will be released in a little more than two months and many people will make use of lambdas. So it would be very unfortunate if you had to turn off Checkstyle only because it does not read lambdas. It's not so much about checking the correct use of lambdas (yet), the only urgent issue is not to fail when parsing a file with lambdas and maybe to check the code inside the lambda expression normally. |
I wanna second this. I just started to use CheckStyle and don't want to give it up already.(Awesome tool - thank you very much!) |
+1. Java 8 support would be a great feature. |
We are planing to move our project to java 8 in one year, so this would be great to add its support to Check Style project. |
2 all, please do "1 question" survey about Java8 support, without registration - https://www.surveymonkey.com/s/MNFHYSJ |
We got connection with ANTLR team https://groups.google.com/forum/#!topic/antlr-discussion/AQOawdwDXFA , thank a lot to Terence Parr. |
Using 5.7 every file that contains a lambda expression get the I understand that supporting the whole Java 8 syntax and coming up with checks for new idioms is a big task. Like @nicolaiparlog suggested, shouldn't it be possible to make a first step that simply gracefully ignore Java 8 peculiarities so we all get a checkstyle version that is usable with Java 8 sooner, even if it is not full-featured? I have the gut feeling that that's what you're after with Java 8 ANTLR support. If this is the case, please tell us :-) Cheers |
We are approved organization at GSoC 2014, so Java8 support will be in few month. If we found simple way to ignore lambda syntax easily we will do it sooner than whole Java8 support. |
@romani: Thanks for the update! If you guys can find a way to make Checkstyle ignore lambda expressions (i.e. no error), I think that would be a really useful first step. Once that problem is solved, developers won't have to choose between using Checkstyle or using lambda expressions. At that point, it's no big deal if it takes a long time to do the rest of the Java 8 support. |
Default methods cause the very same issue: |
Hi there! |
@Zlika I here ya. I'm working on project right now with the best opportunity to utilize java 8's features like the default interface methods for instance and I don't know what to do. Everyone on my team is relatively new to team projects with code and just getting rid of checkstyle just seems like such a bad idea! I do hope that they update checkstyle soon to support java 8. |
Checkstyle will be updated to java8 probably in next month to ignore lambda at all, final support for java8 will be ready at the end of August of this year. |
Hi! |
Hi! Yeah, sure. This is a very small project in its earliest stages but it
so long ... Nicolai Am 04.05.2014 10:34, schrieb Ilia Dubinin:
|
Thanks a lot! |
How long will it take? Any ETA? :) |
Hi! Also, after discuss with team, we decide, that implementation of ignoring option for Java 8 features is painful, and may break grammar. Unfortunately community has to wait for full implementation of Java 8 features. |
+1 |
1 similar comment
👍 |
Sabaka: In terms of sample code, you may want to consider testing against the OpenJDK 8 codebase, which already has many examples of default methods on interfaces, lambdas, etc. For example, these tests use lambdas extensively: |
+1 This is blocking us also. |
👍 |
+1 Support for Java 8 (in particular Lambda expressions) would be awesome! |
+1 for Java 8 support. Thanks! |
+1 for Java 8 Support. |
Hi! |
+1 We also need it. Thanks in advance. |
@henrik242 the pull request #226 has not been merged into upstream yet. You may want to try with your own build of @sabaka 's clone at https://github.com/sabaka/checkstyle |
@zapodot Ahh, of course. Thanks :) |
When I try to build @sabaka 's clone (gsoc branch) with https://gist.github.com/brutall/f6594b1986011ace76b9 Is there something I'm missing here? I bypassed the problem by commenting out the entire |
Hi all! Also thanks a lot for help with testing :) |
When I use my @sabaka clone (master branch), it still fails in the same spot, but with a slightly different error:
|
Is there any timeline for this issue? |
@ttjordan , please see #10 (comment) |
@cbanack why do you use master branch? It doesn't support Java 8 syntax. Please use gsoc branch. |
I have faced the same issue with The workaround is to add <properties>
…
<additionalparam>-Xdoclint:none</additionalparam>
</properties> |
@romani, thanks, I'll do that. I recommend 'ignore', that way it behaves like Java 7. -Xdoclint SHOULD be set to none by default in Java 8. But it is not. This has introduced this exact same problem for nearly everyone else's projects, too. :( |
+1 |
1 similar comment
👍 |
@sabaka , please rebase your changes from master, I fixed java8 javadoc problems in master. |
Two issues thus far with current code on gsoc branch: Indentation properties don't seem to be applied properly to lambdas. For example, if I change indentation to 2, with:
It complains for the following code:
wanting lambda to be 4 spaces indented: block child at indentation level 6 not at correct indentation, 8 Also static interface methods are not recognized properly:
complains with: Redundant 'static' modifier. |
@ikabiljo, it is out of context of this branch fixes. Separate issue against IndentationCheck need to be created, please do (please provide examples in formatted way). |
Hi all! My gsoc branch has been updated (Java 8 annotation here) |
So, it's finished? |
@T3rm1 almost. I'm cleaning build output, but it will not bring new changes into Java 8 support. |
@ikabiljo, I plan to release java8 changes before 15 October. |
finally merged to main repo, release 5.9 will be in few days. |
If anyone is facing this issue on gradle, you can bump the default version of checkstyle from 5.7 to 5.9 with the following config.
You can see that config in the source here |
.. or rather 6.1.1 which is the latest version |
The upcoming Java 8 has a new language syntax that Checkstyle needs to support. The developer preview is quite stable and language syntax changes are not expected.
Besides that, the new language features might be an opportunity for new checks.
From RomanIvanov: please do "1 question" survey about Java8 support, without registration - https://www.surveymonkey.com/s/MNFHYSJ
The text was updated successfully, but these errors were encountered: