File tree 2 files changed +46
-0
lines changed
qulice-checkstyle/src/test
java/com/qulice/checkstyle
resources/com/qulice/checkstyle
2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -674,6 +674,22 @@ public void allowsUppercaseAbbreviationExceptions() throws Exception {
674
674
this .runValidation ("ValidAbbreviationAsWordInName.java" , true );
675
675
}
676
676
677
+ /**
678
+ * CheckstyleValidator can allow final static fields and overrides
679
+ * to have uppercase abbreviations.
680
+ *
681
+ * @throws Exception In case of error
682
+ * @todo #897:30min Allow lambdas and generics to be places at end of line.
683
+ * RegexpSingleline is too strict and not allow generics and lambdas
684
+ * being placed at end of lines. Correct this behavior and uncomment test
685
+ * below.
686
+ */
687
+ @ Ignore
688
+ @ Test
689
+ public void checkLambdaAndGenericsAtEndOfLine () throws Exception {
690
+ this .runValidation ("ValidLambdaAndGenericsAtEndOfLine.java" , true );
691
+ }
692
+
677
693
/**
678
694
* CheckstyleValidator can reject non diamond operator usage.
679
695
* @throws Exception If error
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Hello.
3
+ */
4
+ package foo ;
5
+
6
+ /**
7
+ * Simple.
8
+ * @since 1.0
9
+ */
10
+ public final class ValidLambda {
11
+
12
+ /**
13
+ * Final.
14
+ */
15
+ private final int zero = 0 ;
16
+
17
+ /**
18
+ * Main method.
19
+ */
20
+ public void main () {
21
+ final Proc proc = () ->
22
+ this .zero ;
23
+ final Func func = var ->
24
+ var * 2 ;
25
+ final BiFunc bifunc = (param , par ) ->
26
+ param * par ;
27
+ final List <Integer >
28
+ list = new ArrayList <>();
29
+ }
30
+ }
You can’t perform that action at this time.
1 commit comments
0pdd commentedon Jan 24, 2019
Puzzle
897-e70cf262
discovered inqulice-checkstyle/src/test/java/com/qulice/checkstyle/CheckstyleValidatorTest.java
and submitted as #1005. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.