mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 20:15:09 +00:00
Check exact message line numbers in tests
This commit is contained in:
1 parent
c8d6152097
commit
02a89cf7fe
24 files changed
+50
-51
No files matched your search
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2012-2013 The Project Lombok Authors.
|
||||
* Copyright (C) 2012-2024 The Project Lombok Authors.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -67,8 +67,7 @@ public class CompilerMessageMatcher {
|
||||
public boolean matches(CompilerMessage message) {
|
||||
outer:
|
||||
for (int i = 0; i < lineNumbers.size(); i++) {
|
||||
//Allow an off-by-1 in line numbers; when running tests that sometimes happens for as yet unknown reasons.
|
||||
if (message.getLine() != lineNumbers.get(i) && message.getLine() -1 != lineNumbers.get(i)) continue;
|
||||
if (message.getLine() != lineNumbers.get(i)) continue;
|
||||
for (String token : messages.get(i)) {
|
||||
if (!message.getMessage().contains(token)) continue outer;
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
4 Use of @Delegate is flagged according to lombok configuration.
|
||||
5 Use of @Delegate is flagged according to lombok configuration.
|
||||
@@ -1,2 +1,2 @@
|
||||
6 @Delegate is legal only on instance fields or no-argument instance methods.
|
||||
10 @Delegate is legal only on instance fields or no-argument instance methods.
|
||||
7 @Delegate is legal only on instance fields or no-argument instance methods.
|
||||
11 @Delegate is legal only on instance fields or no-argument instance methods.
|
||||
@@ -1 +1 @@
|
||||
4 @Delegate does not support recursion (delegating to a type that itself has @Delegate members). Member "inner" is @Delegate in type "DelegateRecursionCenter"
|
||||
5 @Delegate does not support recursion (delegating to a type that itself has @Delegate members). Member "inner" is @Delegate in type "DelegateRecursionCenter"
|
||||
+2
-2
@@ -1,2 +1,2 @@
|
||||
1 This field does not exist.
|
||||
6 This field does not exist, or would have been excluded anyway.
|
||||
2 This field does not exist.
|
||||
7 This field does not exist, or would have been excluded anyway.
|
||||
+1
-1
@@ -1 +1 @@
|
||||
9 reference to ambiguous is ambiguous both method <T,R>ambiguous(T,java.util.function.Function<T,R>) in ExtensionMethodAmbiguousFunctional.Extensions and method <T>ambiguous(T,java.util.function.Consumer<T>) in ExtensionMethodAmbiguousFunctional.Extensions match
|
||||
10 reference to ambiguous is ambiguous both method <T,R>ambiguous(T,java.util.function.Function<T,R>) in ExtensionMethodAmbiguousFunctional.Extensions and method <T>ambiguous(T,java.util.function.Consumer<T>) in ExtensionMethodAmbiguousFunctional.Extensions match
|
||||
+1
-1
@@ -1 +1 @@
|
||||
1 @JsonDeserialize already exists on class. Either delete @JsonDeserialize, or remove @Jacksonized and manually configure Jackson.
|
||||
2 @JsonDeserialize already exists on class. Either delete @JsonDeserialize, or remove @Jacksonized and manually configure Jackson.
|
||||
@@ -1 +1 @@
|
||||
5 @Locked is legal only on methods in classes and enums.
|
||||
6 @Locked is legal only on methods in classes and enums.
|
||||
@@ -1 +1 @@
|
||||
22 @NonNull is meaningless on a primitive.
|
||||
23 @NonNull is meaningless on a primitive.
|
||||
@@ -1,6 +1,6 @@
|
||||
9 Use of @Getter(onMethod=...) is flagged according to lombok configuration.
|
||||
10 Use of @Setter(onMethod=...) is flagged according to lombok configuration.
|
||||
10 Use of @Setter(onParam=...) is flagged according to lombok configuration.
|
||||
11 Use of @NoArgsConstructor(onConstructor=...) is flagged according to lombok configuration.
|
||||
12 Use of @AllArgsConstructor(onConstructor=...) is flagged according to lombok configuration.
|
||||
18 Use of @RequiredArgsConstructor(onConstructor=...) is flagged according to lombok configuration.
|
||||
10 Use of @Getter(onMethod=...) is flagged according to lombok configuration.
|
||||
11 Use of @Setter(onMethod=...) is flagged according to lombok configuration.
|
||||
11 Use of @Setter(onParam=...) is flagged according to lombok configuration.
|
||||
12 Use of @NoArgsConstructor(onConstructor=...) is flagged according to lombok configuration.
|
||||
13 Use of @AllArgsConstructor(onConstructor=...) is flagged according to lombok configuration.
|
||||
19 Use of @RequiredArgsConstructor(onConstructor=...) is flagged according to lombok configuration.
|
||||
@@ -1 +1 @@
|
||||
5 @Synchronized is legal only on methods in classes and enums.
|
||||
6 @Synchronized is legal only on methods in classes and enums.
|
||||
@@ -1,2 +1,2 @@
|
||||
6 Cannot use 'val' here because initializer expression does not have a representable type: Type cannot be resolved
|
||||
10 'val' is not compatible with array initializer expressions. Use the full form (new int[] { ... } instead of just { ... })
|
||||
7 Cannot use 'val' here because initializer expression does not have a representable type: Type cannot be resolved
|
||||
11 'val' is not compatible with array initializer expressions. Use the full form (new int[] { ... } instead of just { ... })
|
||||
@@ -1 +1 @@
|
||||
7 'val' is not allowed in old-style for loops
|
||||
8 'val' is not allowed in old-style for loops
|
||||
@@ -1 +1 @@
|
||||
6 'var' is not allowed in old-style for loops if there is more than 1 initializer
|
||||
7 'var' is not allowed in old-style for loops if there is more than 1 initializer
|
||||
@@ -1 +1 @@
|
||||
5 variable initializer is 'null'
|
||||
6 variable initializer is 'null'
|
||||
@@ -1 +1 @@
|
||||
6 Use of var is flagged according to lombok configuration
|
||||
7 Use of var is flagged according to lombok configuration.
|
||||
+2
-2
@@ -1,2 +1,2 @@
|
||||
1 This field does not exist.
|
||||
6 This field does not exist, or would have been excluded anyway.
|
||||
2 This field does not exist.
|
||||
7 This field does not exist, or would have been excluded anyway.
|
||||
+1
-1
@@ -1 +1 @@
|
||||
1 @JsonDeserialize already exists on class. Either delete @JsonDeserialize, or remove @Jacksonized and manually configure Jackson.
|
||||
2 @JsonDeserialize already exists on class. Either delete @JsonDeserialize, or remove @Jacksonized and manually configure Jackson.
|
||||
@@ -1,3 +1,3 @@
|
||||
15 Dead code
|
||||
22 @NonNull is meaningless on a primitive.
|
||||
28 Dead code
|
||||
16 Dead code
|
||||
23 @NonNull is meaningless on a primitive.
|
||||
29 Dead code
|
||||
@@ -1 +1 @@
|
||||
7 @NonNull is meaningless on a primitive.
|
||||
8 @NonNull is meaningless on a primitive.
|
||||
@@ -1,6 +1,6 @@
|
||||
9 Use of @Getter(onMethod=...) is flagged according to lombok configuration.
|
||||
10 Use of @Setter(onMethod=...) is flagged according to lombok configuration.
|
||||
10 Use of @Setter(onParam=...) is flagged according to lombok configuration.
|
||||
11 Use of @NoArgsConstructor(onConstructor=...) is flagged according to lombok configuration.
|
||||
12 Use of @AllArgsConstructor(onConstructor=...) is flagged according to lombok configuration.
|
||||
18 Use of @RequiredArgsConstructor(onConstructor=...) is flagged according to lombok configuration.
|
||||
10 Use of @Getter(onMethod=...) is flagged according to lombok configuration.
|
||||
11 Use of @Setter(onMethod=...) is flagged according to lombok configuration.
|
||||
11 Use of @Setter(onParam=...) is flagged according to lombok configuration.
|
||||
12 Use of @NoArgsConstructor(onConstructor=...) is flagged according to lombok configuration.
|
||||
13 Use of @AllArgsConstructor(onConstructor=...) is flagged according to lombok configuration.
|
||||
19 Use of @RequiredArgsConstructor(onConstructor=...) is flagged according to lombok configuration.
|
||||
@@ -1,2 +1,2 @@
|
||||
27 cannot find symbol
|
||||
31 cannot find symbol
|
||||
28 cannot find symbol method readLock() location: java.util.concurrent.locks.Lock
|
||||
32 cannot find symbol method readLock() location: java.util.concurrent.locks.Lock
|
||||
@@ -1 +1 @@
|
||||
33 @NonNull is meaningless on a primitive.
|
||||
34 @NonNull is meaningless on a primitive.
|
||||
@@ -1,9 +1,9 @@
|
||||
3 cannot find symbol
|
||||
4 cannot find symbol
|
||||
5 cannot find symbol
|
||||
6 cannot find symbol
|
||||
7 cannot find symbol
|
||||
8 cannot find symbol
|
||||
9 method b2 in class ValInvalidParameter cannot be applied to given types;
|
||||
10 reference to a is ambiguous
|
||||
11 reference to a is ambiguous
|
||||
4 cannot find symbol symbol: class NonExistingClass location: class ValInvalidParameter
|
||||
5 cannot find symbol symbol: class NonExistingClass location: class ValInvalidParameter
|
||||
6 cannot find symbol symbol: method nonExisitingMethod(java.lang.Integer) location: class ValInvalidParameter
|
||||
7 cannot find symbol symbol: variable nonExistingObject location: class ValInvalidParameter
|
||||
8 cannot find symbol symbol: method nonExistingMethod() location: class java.lang.Integer
|
||||
9 cannot find symbol symbol: class NonExistingClass location: class ValInvalidParameter
|
||||
10 method b2 in class ValInvalidParameter cannot be applied to given types; required: int,int found: int reason: actual and formal argument lists differ in length
|
||||
11 reference to a is ambiguous both method a(java.lang.String) in ValInvalidParameter and method a(java.lang.Integer) in ValInvalidParameter match
|
||||
12 reference to a is ambiguous both method a(java.lang.String) in ValInvalidParameter and method a(java.lang.Integer) in ValInvalidParameter match
|
||||
Reference in new issue
Block a user