mirror of
https://github.com/octoleo/plantuml.git
synced 2024-11-05 21:17:52 +00:00
chore: use annotation for dead code
https://github.com/plantuml/plantuml/issues/1521#issuecomment-1694600302
This commit is contained in:
parent
8172f9492a
commit
39fd1138cb
13
src/net/sourceforge/plantuml/annotation/DeadCode.java
Normal file
13
src/net/sourceforge/plantuml/annotation/DeadCode.java
Normal file
@ -0,0 +1,13 @@
|
||||
package net.sourceforge.plantuml.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@Target({ ElementType.CONSTRUCTOR, ElementType.METHOD, ElementType.TYPE })
|
||||
public @interface DeadCode {
|
||||
|
||||
String comment() default "";
|
||||
}
|
@ -40,6 +40,9 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import net.sourceforge.plantuml.annotation.DeadCode;
|
||||
|
||||
@DeadCode(comment = "try for text diagram compression")
|
||||
public class Tokens {
|
||||
// ::remove file when __CORE__
|
||||
|
||||
|
@ -43,6 +43,7 @@ import net.sourceforge.plantuml.ErrorUml;
|
||||
import net.sourceforge.plantuml.OptionFlags;
|
||||
import net.sourceforge.plantuml.SourceStringReader;
|
||||
import net.sourceforge.plantuml.UmlDiagram;
|
||||
import net.sourceforge.plantuml.annotation.DeadCode;
|
||||
import net.sourceforge.plantuml.core.Diagram;
|
||||
import net.sourceforge.plantuml.error.PSystemError;
|
||||
import net.sourceforge.plantuml.preproc.Defines;
|
||||
@ -50,8 +51,9 @@ import net.sourceforge.plantuml.text.BackSlash;
|
||||
import net.sourceforge.plantuml.utils.LineLocation;
|
||||
import net.sourceforge.plantuml.utils.LineLocationImpl;
|
||||
|
||||
@DeadCode(comment = "used too much CPU")
|
||||
public class SyntaxChecker {
|
||||
// ::remove folder when __HAXE__
|
||||
// ::remove folder when __HAXE__
|
||||
// ::remove file when __CORE__
|
||||
|
||||
public static SyntaxResult checkSyntax(List<String> source) {
|
||||
|
Loading…
Reference in New Issue
Block a user