-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ffee1c4
commit b69750f
Showing
7 changed files
with
92 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 13 additions & 1 deletion
14
...-support/src/main/java/tech/picnic/errorprone/refaster/annotation/TemplateCollection.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,24 @@ | ||
package tech.picnic.errorprone.refaster.annotation; | ||
|
||
import com.google.errorprone.BugPattern.SeverityLevel; | ||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
// XXX: By grouping multiple properties this annotation does not lend itself to overriding. Perhaps | ||
// have separate annotations for each? | ||
// XXX: ^ Additional argument: the current setup "requires" defaults, which then causes duplication | ||
// with `AnnotatedCompositeCodeTransformer`. | ||
// XXX: The name `TemplateCollection` isn't appropriate if used directly on a Refaster template. | ||
// Find a more neutral name. | ||
@Target(ElementType.TYPE) | ||
@Retention(RetentionPolicy.SOURCE) | ||
public @interface TemplateCollection { | ||
String linkPattern(); | ||
// XXX: This default is Error Prone Support-specific. Appropriate? | ||
String linkPattern() default "https://error-prone.picnic.tech/refastertemplates/%s"; | ||
|
||
SeverityLevel severity() default SeverityLevel.SUGGESTION; | ||
|
||
String description() default "Refactoring opportunity"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters