1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-06-01 08:00:48 +00:00

chore: use annotation for dead code

https://github.com/plantuml/plantuml/issues/1521#issuecomment-1694600302
This commit is contained in:
Arnaud Roques 2023-08-27 11:07:44 +02:00
parent 8172f9492a
commit 39fd1138cb
3 changed files with 19 additions and 1 deletions

View 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 "";
}

View File

@ -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__

View File

@ -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) {