001package eu.cqse.check.framework.core; 002 003import java.lang.annotation.Documented; 004import java.lang.annotation.ElementType; 005import java.lang.annotation.Retention; 006import java.lang.annotation.RetentionPolicy; 007import java.lang.annotation.Target; 008 009import org.atteo.classindex.IndexAnnotated; 010 011import eu.cqse.check.framework.core.phase.IGlobalExtractionPhase; 012import eu.cqse.check.framework.scanner.ELanguage; 013 014/** 015 * Annotation that marks a class as custom check and provides some meta-data for 016 * it. 017 */ 018@Documented 019@Retention(RetentionPolicy.RUNTIME) 020@Target(ElementType.TYPE) 021@IndexAnnotated 022public @interface Check { 023 024 /** Returns the name. */ 025 String name(); 026 027 /** Returns the description. */ 028 String description(); 029 030 /** Returns the analysis-group name. */ 031 String groupName(); 032 033 /** Returns the analysis name of the analysis category. */ 034 String categoryName() default "Code Anomalies"; 035 036 /** Returns the default enablement. */ 037 EFindingEnablement defaultEnablement() default EFindingEnablement.YELLOW; 038 039 /** Returns all supported languages. */ 040 ELanguage[] languages(); 041 042 /** Returns all parameters that must be provided to the check. */ 043 ECheckParameter[] parameters() default {}; 044 045 /** The pre-run extraction phases that are needed for this check to run. */ 046 Class<? extends IGlobalExtractionPhase<?, ?>>[] phases() default {}; 047}