From 7858b8de46896727fa859ce59e0eea7a4d80a75a Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 9 May 2016 19:48:19 -0400 Subject: [PATCH 1/4] clean up imports. --- src/main/java/com/cflint/BugCounts.java | 1 - src/main/java/com/cflint/BugInfo.java | 8 ++-- src/main/java/com/cflint/CFLint.java | 40 +++++++++---------- src/main/java/com/cflint/HTMLOutput.java | 1 + src/main/java/com/cflint/JSONOutput.java | 4 -- src/main/java/com/cflint/TextOutput.java | 2 - .../com/cflint/config/CFLintPluginInfo.java | 1 - .../java/com/cflint/config/ConfigUtils.java | 7 +--- src/main/java/com/cflint/main/CFLintMain.java | 3 +- .../com/cflint/plugins/CFLintScanner.java | 6 +-- .../cflint/plugins/CFLintScannerAdapter.java | 6 +-- src/main/java/com/cflint/plugins/Context.java | 6 +-- .../com/cflint/plugins/core/AbortChecker.java | 10 ++--- .../cflint/plugins/core/ArgDefChecker.java | 10 ++--- .../cflint/plugins/core/ArgHintChecker.java | 4 +- .../cflint/plugins/core/ArgTypeChecker.java | 11 +++-- .../cflint/plugins/core/ArgVarChecker.java | 10 ++--- .../plugins/core/ArgumentNameChecker.java | 11 ++--- .../cflint/plugins/core/ArrayNewChecker.java | 12 +++--- .../core/BooleanExpressionChecker.java | 10 ++--- .../core/CFCompareVsAssignChecker.java | 14 +++---- .../plugins/core/CFDebugAttributeChecker.java | 8 ++-- .../cflint/plugins/core/CFQueryChecker.java | 10 ++--- .../plugins/core/CFSwitchDefaultChecker.java | 8 ++-- .../plugins/core/CFTagLowercaseChecker.java | 10 ++--- .../plugins/core/CFTagUppercaseChecker.java | 10 ++--- .../cflint/plugins/core/CFXTagChecker.java | 4 +- .../core/ComplexBooleanExpressionChecker.java | 10 ++--- .../core/ComponentDisplayNameChecker.java | 7 +--- .../plugins/core/ComponentHintChecker.java | 4 +- .../plugins/core/ComponentLengthChecker.java | 17 +++----- .../plugins/core/ComponentNameChecker.java | 12 ++---- .../plugins/core/CreateObjectChecker.java | 11 ++--- .../cflint/plugins/core/FileCaseChecker.java | 7 +--- .../plugins/core/FunctionHintChecker.java | 4 +- .../plugins/core/FunctionLengthChecker.java | 17 +++----- .../plugins/core/FunctionTypeChecker.java | 10 ++--- .../cflint/plugins/core/FunctionXChecker.java | 12 ++---- .../cflint/plugins/core/GlobalVarChecker.java | 8 ++-- .../cflint/plugins/core/LiteralChecker.java | 17 ++++---- .../plugins/core/MethodNameChecker.java | 12 ++---- .../cflint/plugins/core/NestedCFOutput.java | 4 +- .../plugins/core/OutputParmMissing.java | 4 +- .../plugins/core/QueryParamChecker.java | 11 ++--- .../cflint/plugins/core/ScriptTagChecker.java | 10 ++--- .../plugins/core/SelectStarChecker.java | 16 +++----- .../plugins/core/SimpleComplexityChecker.java | 26 +++++------- .../plugins/core/TooManyArgumentsChecker.java | 10 ++--- .../plugins/core/TooManyFunctionsChecker.java | 12 +++--- .../cflint/plugins/core/TypedQueryNew.java | 6 +-- .../plugins/core/UnusedArgumentChecker.java | 17 ++++---- .../plugins/core/UnusedLocalVarChecker.java | 13 +++--- .../com/cflint/plugins/core/VarScoper.java | 10 ++--- .../plugins/core/VariableNameChecker.java | 15 +++---- .../cflint/plugins/core/WriteDumpChecker.java | 13 ++---- .../java/com/cflint/tools/CFLintFilter.java | 3 -- src/main/java/com/cflint/tools/CFTool.java | 3 +- .../java/com/cflint/TestAbortChecker.java | 4 +- .../java/com/cflint/TestArgumentNames.java | 5 +-- .../java/com/cflint/TestArrayNewChecker.java | 4 +- .../cflint/TestBooleanExpressionChecker.java | 4 +- .../java/com/cflint/TestCFAbortChecker.java | 4 +- src/test/java/com/cflint/TestCFBugs.java | 4 +- .../java/com/cflint/TestCFBugsTagless.java | 4 +- .../java/com/cflint/TestCFBugs_ArgsDef.java | 4 +- .../java/com/cflint/TestCFBugs_ArgsHint.java | 4 +- .../java/com/cflint/TestCFBugs_ArgsType.java | 5 +-- .../java/com/cflint/TestCFBugs_ArgsUse.java | 4 +- .../java/com/cflint/TestCFBugs_Comments.java | 4 +- .../com/cflint/TestCFBugs_ComponentHint.java | 4 +- .../com/cflint/TestCFBugs_ComponentName.java | 5 +-- .../com/cflint/TestCFBugs_ComponentNames.java | 5 +-- .../com/cflint/TestCFBugs_FunctionHint.java | 4 +- .../com/cflint/TestCFBugs_FunctionType.java | 5 +-- .../cflint/TestCFBugs_GLobalVarChecker.java | 4 +- .../com/cflint/TestCFBugs_MethodNames.java | 5 +-- .../java/com/cflint/TestCFBugs_OutputDef.java | 4 +- .../com/cflint/TestCFBugs_ParseError.java | 4 +- .../com/cflint/TestCFBugs_QueryParams.java | 4 +- .../cflint/TestCFBugs_SimpleComplexity.java | 5 +-- .../cflint/TestCFBugs_TooManyArguments.java | 5 +-- .../cflint/TestCFBugs_TooManyFunctions.java | 5 +-- .../java/com/cflint/TestCFBugs_VarScoper.java | 4 +- .../cflint/TestCFBugs_VarScoper_Names.java | 4 +- .../cflint/TestCFBugs_VarScoper_TagAttr.java | 4 +- .../com/cflint/TestCFBugs_VariableNames.java | 5 +-- .../com/cflint/TestCFCustomTagChecker.java | 4 +- .../TestCFDebugAttributeTagChecker.java | 5 +-- .../java/com/cflint/TestCFDumpChecker.java | 4 +- .../java/com/cflint/TestCFExecuteChecker.java | 4 +- .../java/com/cflint/TestCFIncludeChecker.java | 4 +- .../com/cflint/TestCFInsertTagChecker.java | 4 +- .../com/cflint/TestCFModuleTagChecker.java | 4 +- .../com/cflint/TestCFTagLowercaseChecker.java | 4 +- .../com/cflint/TestCFTagUppercaseChecker.java | 4 +- .../com/cflint/TestCFUpdateTagChecker.java | 4 +- .../TestComplexBooleanExpressionChecker.java | 4 +- .../cflint/TestComponentLengthChecker.java | 9 ++--- .../com/cflint/TestCreateObjectChecker.java | 4 +- .../java/com/cflint/TestDebugChecker.java | 5 +-- .../java/com/cflint/TestFileCaseChecker.java | 5 +-- .../com/cflint/TestFunctionLengthChecker.java | 9 ++--- src/test/java/com/cflint/TestJSONOutput.java | 10 ----- .../com/cflint/TestLiteralGlobalChecker.java | 4 +- .../com/cflint/TestLiteralLocalChecker.java | 4 +- .../java/com/cflint/TestParsingErrors.java | 6 +-- .../java/com/cflint/TestStructNewChecker.java | 4 +- .../com/cflint/TestUnusedArgumentChecker.java | 4 +- .../com/cflint/TestUnusedLocalVarChecker.java | 5 +-- src/test/java/com/cflint/TestValidNames.java | 5 +-- .../java/com/cflint/TestWriteDumpChecker.java | 5 +-- src/test/java/com/cflint/TestXMLOutput.java | 10 ----- .../cflint/Test_Switch_Default_Checker.java | 4 +- .../cflint/config/TestConfigUtilsJson.java | 7 ---- .../integration/TestCLintConfigXml.java | 4 +- .../integration/TestCLintDefaultXml.java | 4 +- 116 files changed, 337 insertions(+), 490 deletions(-) diff --git a/src/main/java/com/cflint/BugCounts.java b/src/main/java/com/cflint/BugCounts.java index d678062da..5f6ab14c6 100644 --- a/src/main/java/com/cflint/BugCounts.java +++ b/src/main/java/com/cflint/BugCounts.java @@ -2,7 +2,6 @@ package com.cflint; import java.util.HashMap; -import java.util.Map.Entry; import java.util.Map; import java.util.Set; diff --git a/src/main/java/com/cflint/BugInfo.java b/src/main/java/com/cflint/BugInfo.java index 360845660..47cad5b2d 100644 --- a/src/main/java/com/cflint/BugInfo.java +++ b/src/main/java/com/cflint/BugInfo.java @@ -2,13 +2,13 @@ import java.util.List; -import net.htmlparser.jericho.Element; -import cfml.parsing.cfscript.CFExpression; -import cfml.parsing.cfscript.script.CFParsedStatement; - import com.cflint.config.CFLintPluginInfo.PluginInfoRule.PluginMessage; import com.cflint.config.CFLintPluginInfo.PluginInfoRule.PluginParameter; +import cfml.parsing.cfscript.CFExpression; +import cfml.parsing.cfscript.script.CFParsedStatement; +import net.htmlparser.jericho.Element; + public class BugInfo implements Comparable{ String filename; diff --git a/src/main/java/com/cflint/CFLint.java b/src/main/java/com/cflint/CFLint.java index c17425198..aa3c07108 100644 --- a/src/main/java/com/cflint/CFLint.java +++ b/src/main/java/com/cflint/CFLint.java @@ -14,9 +14,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import net.htmlparser.jericho.Element; -import net.htmlparser.jericho.Source; - import org.antlr.runtime.BitSet; import org.antlr.runtime.IntStream; import org.antlr.runtime.RecognitionException; @@ -26,7 +23,23 @@ import org.antlr.v4.runtime.atn.ATNConfigSet; import org.antlr.v4.runtime.dfa.DFA; -import cfml.CFSCRIPTLexer; +import com.cflint.BugInfo.BugInfoBuilder; +import com.cflint.config.CFLintConfig; +import com.cflint.config.CFLintPluginInfo; +import com.cflint.config.CFLintPluginInfo.PluginInfoRule; +import com.cflint.config.CFLintPluginInfo.PluginInfoRule.PluginMessage; +import com.cflint.config.ConfigRuntime; +import com.cflint.config.ConfigUtils; +import com.cflint.listeners.ProgressMonitorListener; +import com.cflint.listeners.ScanProgressListener; +import com.cflint.plugins.CFLintScanner; +import com.cflint.plugins.CFLintStructureListener; +import com.cflint.plugins.Context; +import com.cflint.plugins.Context.ContextMessage; +import com.cflint.plugins.exceptions.CFLintExceptionListener; +import com.cflint.plugins.exceptions.DefaultCFLintExceptionListener; +import com.cflint.tools.CFLintFilter; + import cfml.CFSCRIPTParser; import cfml.parsing.CFMLParser; import cfml.parsing.CFMLSource; @@ -55,23 +68,8 @@ import cfml.parsing.cfscript.script.CFScriptStatement; import cfml.parsing.reporting.IErrorReporter; import cfml.parsing.reporting.ParseException; - -import com.cflint.BugInfo.BugInfoBuilder; -import com.cflint.config.CFLintConfig; -import com.cflint.config.CFLintPluginInfo; -import com.cflint.config.CFLintPluginInfo.PluginInfoRule; -import com.cflint.config.CFLintPluginInfo.PluginInfoRule.PluginMessage; -import com.cflint.config.ConfigRuntime; -import com.cflint.config.ConfigUtils; -import com.cflint.listeners.ProgressMonitorListener; -import com.cflint.listeners.ScanProgressListener; -import com.cflint.plugins.CFLintScanner; -import com.cflint.plugins.CFLintStructureListener; -import com.cflint.plugins.Context; -import com.cflint.plugins.Context.ContextMessage; -import com.cflint.plugins.exceptions.CFLintExceptionListener; -import com.cflint.plugins.exceptions.DefaultCFLintExceptionListener; -import com.cflint.tools.CFLintFilter; +import net.htmlparser.jericho.Element; +import net.htmlparser.jericho.Source; public class CFLint implements IErrorReporter { diff --git a/src/main/java/com/cflint/HTMLOutput.java b/src/main/java/com/cflint/HTMLOutput.java index f9c0ec463..eabc375a9 100644 --- a/src/main/java/com/cflint/HTMLOutput.java +++ b/src/main/java/com/cflint/HTMLOutput.java @@ -5,6 +5,7 @@ import java.io.StringReader; import java.io.StringWriter; import java.io.Writer; + import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.TransformerException; import javax.xml.transform.stream.StreamSource; diff --git a/src/main/java/com/cflint/JSONOutput.java b/src/main/java/com/cflint/JSONOutput.java index 93e3d0024..b7f53e3dc 100644 --- a/src/main/java/com/cflint/JSONOutput.java +++ b/src/main/java/com/cflint/JSONOutput.java @@ -1,8 +1,6 @@ package com.cflint; import java.io.IOException; -import java.io.InputStream; -import java.io.StringReader; import java.io.StringWriter; import java.io.Writer; import java.util.Arrays; @@ -11,9 +9,7 @@ import java.util.Map.Entry; import javax.xml.transform.TransformerException; -import javax.xml.transform.stream.StreamSource; -import com.fasterxml.jackson.core.JsonEncoding; import com.fasterxml.jackson.core.JsonFactory; import com.fasterxml.jackson.core.JsonGenerator; diff --git a/src/main/java/com/cflint/TextOutput.java b/src/main/java/com/cflint/TextOutput.java index 3c4881894..c8a08d0b2 100644 --- a/src/main/java/com/cflint/TextOutput.java +++ b/src/main/java/com/cflint/TextOutput.java @@ -4,9 +4,7 @@ import java.io.IOException; import java.io.Writer; import java.util.List; -import java.util.HashMap; import java.util.Map.Entry; -import java.util.Map; public class TextOutput { diff --git a/src/main/java/com/cflint/config/CFLintPluginInfo.java b/src/main/java/com/cflint/config/CFLintPluginInfo.java index 1aa7f0c4f..92904be28 100644 --- a/src/main/java/com/cflint/config/CFLintPluginInfo.java +++ b/src/main/java/com/cflint/config/CFLintPluginInfo.java @@ -11,7 +11,6 @@ import com.cflint.plugins.CFLintScanner; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; @XmlRootElement(name = "CFLint-Plugin") @JsonInclude(Include.NON_NULL) diff --git a/src/main/java/com/cflint/config/ConfigUtils.java b/src/main/java/com/cflint/config/ConfigUtils.java index c76390c85..5fedce758 100644 --- a/src/main/java/com/cflint/config/ConfigUtils.java +++ b/src/main/java/com/cflint/config/ConfigUtils.java @@ -1,31 +1,26 @@ package com.cflint.config; import java.io.BufferedReader; -import java.io.FileReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; import java.io.StringReader; import java.io.StringWriter; +import java.util.HashMap; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller; import javax.xml.bind.Unmarshaller; -import java.util.HashMap; - import com.cflint.config.CFLintPluginInfo.PluginInfoRule; import com.cflint.config.CFLintPluginInfo.PluginInfoRule.PluginParameter; import com.cflint.plugins.CFLintScanner; import com.fasterxml.jackson.core.JsonGenerationException; import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.databind.AnnotationIntrospector; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector; -import com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector; import com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule; public class ConfigUtils { diff --git a/src/main/java/com/cflint/main/CFLintMain.java b/src/main/java/com/cflint/main/CFLintMain.java index a9793efb1..3b463aac3 100644 --- a/src/main/java/com/cflint/main/CFLintMain.java +++ b/src/main/java/com/cflint/main/CFLintMain.java @@ -9,6 +9,7 @@ import java.io.Writer; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.Scanner; @@ -18,8 +19,6 @@ import javax.xml.bind.JAXBException; import javax.xml.transform.TransformerException; -import java.util.HashMap; - import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.GnuParser; diff --git a/src/main/java/com/cflint/plugins/CFLintScanner.java b/src/main/java/com/cflint/plugins/CFLintScanner.java index f4a1d92d4..d3e047cb4 100644 --- a/src/main/java/com/cflint/plugins/CFLintScanner.java +++ b/src/main/java/com/cflint/plugins/CFLintScanner.java @@ -1,10 +1,10 @@ package com.cflint.plugins; -import net.htmlparser.jericho.Element; +import com.cflint.BugList; + import cfml.parsing.cfscript.CFExpression; import cfml.parsing.cfscript.script.CFScriptStatement; - -import com.cflint.BugList; +import net.htmlparser.jericho.Element; public interface CFLintScanner { diff --git a/src/main/java/com/cflint/plugins/CFLintScannerAdapter.java b/src/main/java/com/cflint/plugins/CFLintScannerAdapter.java index f20bb4f24..1ec44355f 100644 --- a/src/main/java/com/cflint/plugins/CFLintScannerAdapter.java +++ b/src/main/java/com/cflint/plugins/CFLintScannerAdapter.java @@ -3,11 +3,11 @@ import java.util.HashMap; import java.util.Map; -import net.htmlparser.jericho.Element; +import com.cflint.BugList; + import cfml.parsing.cfscript.CFExpression; import cfml.parsing.cfscript.script.CFScriptStatement; - -import com.cflint.BugList; +import net.htmlparser.jericho.Element; /** * Lint Rule Plugins can extend this adapter instead of implementing all the methods of CFLintScanner diff --git a/src/main/java/com/cflint/plugins/Context.java b/src/main/java/com/cflint/plugins/Context.java index c50173071..a57f3fcea 100644 --- a/src/main/java/com/cflint/plugins/Context.java +++ b/src/main/java/com/cflint/plugins/Context.java @@ -3,11 +3,11 @@ import java.util.ArrayList; import java.util.List; -import net.htmlparser.jericho.Element; -import cfml.parsing.cfscript.CFIdentifier; - import com.cflint.StackHandler; +import cfml.parsing.cfscript.CFIdentifier; +import net.htmlparser.jericho.Element; + public class Context { String filename; diff --git a/src/main/java/com/cflint/plugins/core/AbortChecker.java b/src/main/java/com/cflint/plugins/core/AbortChecker.java index 0f102da4a..06c88e051 100644 --- a/src/main/java/com/cflint/plugins/core/AbortChecker.java +++ b/src/main/java/com/cflint/plugins/core/AbortChecker.java @@ -1,16 +1,14 @@ package com.cflint.plugins.core; -import ro.fortsoft.pf4j.Extension; -import cfml.parsing.cfscript.CFFunctionExpression; -import cfml.parsing.cfscript.script.CFAbortStatement; -import cfml.parsing.cfscript.script.CFExpressionStatement; -import cfml.parsing.cfscript.script.CFScriptStatement; - import com.cflint.BugInfo; import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; +import cfml.parsing.cfscript.script.CFAbortStatement; +import cfml.parsing.cfscript.script.CFScriptStatement; +import ro.fortsoft.pf4j.Extension; + @Extension public class AbortChecker extends CFLintScannerAdapter { final String severity = "WARNING"; diff --git a/src/main/java/com/cflint/plugins/core/ArgDefChecker.java b/src/main/java/com/cflint/plugins/core/ArgDefChecker.java index 6b9164d4b..b20f25ab2 100644 --- a/src/main/java/com/cflint/plugins/core/ArgDefChecker.java +++ b/src/main/java/com/cflint/plugins/core/ArgDefChecker.java @@ -1,15 +1,15 @@ package com.cflint.plugins.core; -import net.htmlparser.jericho.Element; -import cfml.parsing.cfscript.script.CFFuncDeclStatement; -import cfml.parsing.cfscript.script.CFFunctionParameter; -import cfml.parsing.cfscript.script.CFScriptStatement; - import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; import com.cflint.tools.CFTool; +import cfml.parsing.cfscript.script.CFFuncDeclStatement; +import cfml.parsing.cfscript.script.CFFunctionParameter; +import cfml.parsing.cfscript.script.CFScriptStatement; +import net.htmlparser.jericho.Element; + public class ArgDefChecker extends CFLintScannerAdapter { @Override diff --git a/src/main/java/com/cflint/plugins/core/ArgHintChecker.java b/src/main/java/com/cflint/plugins/core/ArgHintChecker.java index bd4a77082..22ef3e762 100644 --- a/src/main/java/com/cflint/plugins/core/ArgHintChecker.java +++ b/src/main/java/com/cflint/plugins/core/ArgHintChecker.java @@ -1,12 +1,12 @@ package com.cflint.plugins.core; -import net.htmlparser.jericho.Element; - import com.cflint.BugInfo; import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; +import net.htmlparser.jericho.Element; + public class ArgHintChecker extends CFLintScannerAdapter { final String severity = "INFO"; diff --git a/src/main/java/com/cflint/plugins/core/ArgTypeChecker.java b/src/main/java/com/cflint/plugins/core/ArgTypeChecker.java index b12e6716d..72f188576 100644 --- a/src/main/java/com/cflint/plugins/core/ArgTypeChecker.java +++ b/src/main/java/com/cflint/plugins/core/ArgTypeChecker.java @@ -1,15 +1,14 @@ package com.cflint.plugins.core; -import net.htmlparser.jericho.Element; -import cfml.parsing.cfscript.script.CFFuncDeclStatement; -import cfml.parsing.cfscript.script.CFFunctionParameter; -import cfml.parsing.cfscript.script.CFScriptStatement; - import com.cflint.BugInfo; import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; -import com.cflint.tools.CFTool; + +import cfml.parsing.cfscript.script.CFFuncDeclStatement; +import cfml.parsing.cfscript.script.CFFunctionParameter; +import cfml.parsing.cfscript.script.CFScriptStatement; +import net.htmlparser.jericho.Element; public class ArgTypeChecker extends CFLintScannerAdapter { public static final String ARGUMENT = "Argument "; diff --git a/src/main/java/com/cflint/plugins/core/ArgVarChecker.java b/src/main/java/com/cflint/plugins/core/ArgVarChecker.java index db6c54b3b..349e2a2ff 100644 --- a/src/main/java/com/cflint/plugins/core/ArgVarChecker.java +++ b/src/main/java/com/cflint/plugins/core/ArgVarChecker.java @@ -3,15 +3,15 @@ import java.util.HashSet; import java.util.Set; -import cfml.parsing.cfscript.CFExpression; -import cfml.parsing.cfscript.CFIdentifier; -import cfml.parsing.cfscript.CFVarDeclExpression; -import cfml.parsing.cfscript.CFFullVarExpression; - import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; +import cfml.parsing.cfscript.CFExpression; +import cfml.parsing.cfscript.CFFullVarExpression; +import cfml.parsing.cfscript.CFIdentifier; +import cfml.parsing.cfscript.CFVarDeclExpression; + public class ArgVarChecker extends CFLintScannerAdapter { /** diff --git a/src/main/java/com/cflint/plugins/core/ArgumentNameChecker.java b/src/main/java/com/cflint/plugins/core/ArgumentNameChecker.java index 898972760..7975892a6 100644 --- a/src/main/java/com/cflint/plugins/core/ArgumentNameChecker.java +++ b/src/main/java/com/cflint/plugins/core/ArgumentNameChecker.java @@ -1,18 +1,15 @@ package com.cflint.plugins.core; -import ro.fortsoft.pf4j.Extension; -import cfml.parsing.cfscript.script.CFFuncDeclStatement; -import cfml.parsing.cfscript.script.CFFunctionParameter; -import cfml.parsing.cfscript.script.CFScriptStatement; - import com.cflint.BugInfo; import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; -import java.util.regex.Pattern; - +import cfml.parsing.cfscript.script.CFFuncDeclStatement; +import cfml.parsing.cfscript.script.CFFunctionParameter; +import cfml.parsing.cfscript.script.CFScriptStatement; import net.htmlparser.jericho.Element; +import ro.fortsoft.pf4j.Extension; @Extension public class ArgumentNameChecker extends CFLintScannerAdapter { diff --git a/src/main/java/com/cflint/plugins/core/ArrayNewChecker.java b/src/main/java/com/cflint/plugins/core/ArrayNewChecker.java index d93a40a99..bd89b7ac4 100644 --- a/src/main/java/com/cflint/plugins/core/ArrayNewChecker.java +++ b/src/main/java/com/cflint/plugins/core/ArrayNewChecker.java @@ -1,17 +1,15 @@ package com.cflint.plugins.core; -import ro.fortsoft.pf4j.Extension; -import net.htmlparser.jericho.Element; - -import cfml.parsing.cfscript.CFExpression; -import cfml.parsing.cfscript.script.CFExpressionStatement; -import cfml.parsing.cfscript.script.CFScriptStatement; - import com.cflint.BugInfo; import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; +import cfml.parsing.cfscript.script.CFExpressionStatement; +import cfml.parsing.cfscript.script.CFScriptStatement; +import net.htmlparser.jericho.Element; +import ro.fortsoft.pf4j.Extension; + @Extension public class ArrayNewChecker extends CFLintScannerAdapter { final String severity = "INFO"; diff --git a/src/main/java/com/cflint/plugins/core/BooleanExpressionChecker.java b/src/main/java/com/cflint/plugins/core/BooleanExpressionChecker.java index 390afa15e..4061815aa 100644 --- a/src/main/java/com/cflint/plugins/core/BooleanExpressionChecker.java +++ b/src/main/java/com/cflint/plugins/core/BooleanExpressionChecker.java @@ -1,17 +1,13 @@ package com.cflint.plugins.core; -import net.htmlparser.jericho.Element; -import cfml.parsing.cfscript.CFExpression; -import cfml.parsing.cfscript.CFBinaryExpression; -import cfml.parsing.cfscript.script.CFScriptStatement; -import cfml.parsing.cfscript.script.CFIfStatement; -import cfml.parsing.cfscript.script.CFExpressionStatement; - import com.cflint.BugInfo; import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; +import cfml.parsing.cfscript.CFBinaryExpression; +import cfml.parsing.cfscript.CFExpression; + public class BooleanExpressionChecker extends CFLintScannerAdapter { final String severity = "INFO"; diff --git a/src/main/java/com/cflint/plugins/core/CFCompareVsAssignChecker.java b/src/main/java/com/cflint/plugins/core/CFCompareVsAssignChecker.java index 4fca28742..bd59fc938 100644 --- a/src/main/java/com/cflint/plugins/core/CFCompareVsAssignChecker.java +++ b/src/main/java/com/cflint/plugins/core/CFCompareVsAssignChecker.java @@ -3,19 +3,17 @@ import java.util.Arrays; import java.util.List; -import ro.fortsoft.pf4j.Extension; -import net.htmlparser.jericho.Element; -import cfml.CFSCRIPTLexer; -import cfml.parsing.cfscript.CFBinaryExpression; -import cfml.parsing.cfscript.CFExpression; -import cfml.parsing.cfscript.script.CFExpressionStatement; -import cfml.parsing.cfscript.script.CFScriptStatement; - import com.cflint.BugInfo; import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; +import cfml.CFSCRIPTLexer; +import cfml.parsing.cfscript.CFBinaryExpression; +import cfml.parsing.cfscript.script.CFExpressionStatement; +import cfml.parsing.cfscript.script.CFScriptStatement; +import ro.fortsoft.pf4j.Extension; + @Extension public class CFCompareVsAssignChecker extends CFLintScannerAdapter { final String severity = "INFO"; diff --git a/src/main/java/com/cflint/plugins/core/CFDebugAttributeChecker.java b/src/main/java/com/cflint/plugins/core/CFDebugAttributeChecker.java index afbb3459f..409af55af 100644 --- a/src/main/java/com/cflint/plugins/core/CFDebugAttributeChecker.java +++ b/src/main/java/com/cflint/plugins/core/CFDebugAttributeChecker.java @@ -1,14 +1,14 @@ package com.cflint.plugins.core; +import com.cflint.BugList; +import com.cflint.plugins.CFLintScannerAdapter; +import com.cflint.plugins.Context; + import net.htmlparser.jericho.Attribute; import net.htmlparser.jericho.Attributes; import net.htmlparser.jericho.Element; import ro.fortsoft.pf4j.Extension; -import com.cflint.BugList; -import com.cflint.plugins.CFLintScannerAdapter; -import com.cflint.plugins.Context; - @Extension public class CFDebugAttributeChecker extends CFLintScannerAdapter { diff --git a/src/main/java/com/cflint/plugins/core/CFQueryChecker.java b/src/main/java/com/cflint/plugins/core/CFQueryChecker.java index 9d266ddff..cc462c255 100644 --- a/src/main/java/com/cflint/plugins/core/CFQueryChecker.java +++ b/src/main/java/com/cflint/plugins/core/CFQueryChecker.java @@ -1,15 +1,15 @@ package com.cflint.plugins.core; -import ro.fortsoft.pf4j.Extension; -import net.htmlparser.jericho.Element; -import cfml.parsing.cfscript.CFExpression; -import cfml.parsing.cfscript.script.CFScriptStatement; - import com.cflint.BugInfo; import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; +import cfml.parsing.cfscript.CFExpression; +import cfml.parsing.cfscript.script.CFScriptStatement; +import net.htmlparser.jericho.Element; +import ro.fortsoft.pf4j.Extension; + @Extension public class CFQueryChecker extends CFLintScannerAdapter { final String message = "Don't use in .cfm files. Database should not be coupled with view"; diff --git a/src/main/java/com/cflint/plugins/core/CFSwitchDefaultChecker.java b/src/main/java/com/cflint/plugins/core/CFSwitchDefaultChecker.java index 09595b639..c920fb6cf 100644 --- a/src/main/java/com/cflint/plugins/core/CFSwitchDefaultChecker.java +++ b/src/main/java/com/cflint/plugins/core/CFSwitchDefaultChecker.java @@ -1,13 +1,13 @@ package com.cflint.plugins.core; -import net.htmlparser.jericho.Element; -import cfml.parsing.cfscript.script.CFScriptStatement; -import cfml.parsing.cfscript.script.CFSwitchStatement; - import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; +import cfml.parsing.cfscript.script.CFScriptStatement; +import cfml.parsing.cfscript.script.CFSwitchStatement; +import net.htmlparser.jericho.Element; + public class CFSwitchDefaultChecker extends CFLintScannerAdapter { final String CFML_TAG_CHECK = "cfswitch"; final String CFML_TAG_REQUIRED = "cfdefaultcase"; diff --git a/src/main/java/com/cflint/plugins/core/CFTagLowercaseChecker.java b/src/main/java/com/cflint/plugins/core/CFTagLowercaseChecker.java index ae0944486..ba9ecbe0c 100644 --- a/src/main/java/com/cflint/plugins/core/CFTagLowercaseChecker.java +++ b/src/main/java/com/cflint/plugins/core/CFTagLowercaseChecker.java @@ -1,15 +1,15 @@ package com.cflint.plugins.core; -import ro.fortsoft.pf4j.Extension; -import net.htmlparser.jericho.Element; -import cfml.parsing.cfscript.CFExpression; -import cfml.parsing.cfscript.script.CFScriptStatement; - import com.cflint.BugInfo; import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; +import cfml.parsing.cfscript.CFExpression; +import cfml.parsing.cfscript.script.CFScriptStatement; +import net.htmlparser.jericho.Element; +import ro.fortsoft.pf4j.Extension; + @Extension public class CFTagLowercaseChecker extends CFLintScannerAdapter { final String messageCode = "CFTAG_SHOULD_BE_LOWERCASE"; diff --git a/src/main/java/com/cflint/plugins/core/CFTagUppercaseChecker.java b/src/main/java/com/cflint/plugins/core/CFTagUppercaseChecker.java index e95fe7536..0ad566606 100644 --- a/src/main/java/com/cflint/plugins/core/CFTagUppercaseChecker.java +++ b/src/main/java/com/cflint/plugins/core/CFTagUppercaseChecker.java @@ -1,15 +1,15 @@ package com.cflint.plugins.core; -import ro.fortsoft.pf4j.Extension; -import net.htmlparser.jericho.Element; -import cfml.parsing.cfscript.CFExpression; -import cfml.parsing.cfscript.script.CFScriptStatement; - import com.cflint.BugInfo; import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; +import cfml.parsing.cfscript.CFExpression; +import cfml.parsing.cfscript.script.CFScriptStatement; +import net.htmlparser.jericho.Element; +import ro.fortsoft.pf4j.Extension; + @Extension public class CFTagUppercaseChecker extends CFLintScannerAdapter { final String messageCode = "CFTAG_SHOULD_BE_UPPERCASE"; diff --git a/src/main/java/com/cflint/plugins/core/CFXTagChecker.java b/src/main/java/com/cflint/plugins/core/CFXTagChecker.java index 8a77e87ac..8c871a217 100644 --- a/src/main/java/com/cflint/plugins/core/CFXTagChecker.java +++ b/src/main/java/com/cflint/plugins/core/CFXTagChecker.java @@ -1,11 +1,11 @@ package com.cflint.plugins.core; -import net.htmlparser.jericho.Element; - import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; +import net.htmlparser.jericho.Element; + public class CFXTagChecker extends CFLintScannerAdapter { @Override diff --git a/src/main/java/com/cflint/plugins/core/ComplexBooleanExpressionChecker.java b/src/main/java/com/cflint/plugins/core/ComplexBooleanExpressionChecker.java index 0f1c6b013..c0b15f035 100644 --- a/src/main/java/com/cflint/plugins/core/ComplexBooleanExpressionChecker.java +++ b/src/main/java/com/cflint/plugins/core/ComplexBooleanExpressionChecker.java @@ -1,17 +1,13 @@ package com.cflint.plugins.core; -import net.htmlparser.jericho.Element; -import cfml.parsing.cfscript.CFExpression; -import cfml.parsing.cfscript.CFBinaryExpression; -import cfml.parsing.cfscript.script.CFScriptStatement; -import cfml.parsing.cfscript.script.CFIfStatement; -import cfml.parsing.cfscript.script.CFExpressionStatement; - import com.cflint.BugInfo; import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; +import cfml.parsing.cfscript.CFBinaryExpression; +import cfml.parsing.cfscript.CFExpression; + public class ComplexBooleanExpressionChecker extends CFLintScannerAdapter { final String severity = "WARNING"; diff --git a/src/main/java/com/cflint/plugins/core/ComponentDisplayNameChecker.java b/src/main/java/com/cflint/plugins/core/ComponentDisplayNameChecker.java index c4f114db7..d72688592 100644 --- a/src/main/java/com/cflint/plugins/core/ComponentDisplayNameChecker.java +++ b/src/main/java/com/cflint/plugins/core/ComponentDisplayNameChecker.java @@ -1,16 +1,11 @@ package com.cflint.plugins.core; -import net.htmlparser.jericho.Element; - import com.cflint.BugInfo; import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; -import cfml.parsing.cfscript.script.CFCompDeclStatement; -import cfml.parsing.cfscript.script.CFScriptStatement; - -import java.util.Vector; +import net.htmlparser.jericho.Element; public class ComponentDisplayNameChecker extends CFLintScannerAdapter { final String severity = "INFO"; diff --git a/src/main/java/com/cflint/plugins/core/ComponentHintChecker.java b/src/main/java/com/cflint/plugins/core/ComponentHintChecker.java index f627d7d93..9dcf1f0be 100644 --- a/src/main/java/com/cflint/plugins/core/ComponentHintChecker.java +++ b/src/main/java/com/cflint/plugins/core/ComponentHintChecker.java @@ -1,12 +1,12 @@ package com.cflint.plugins.core; -import net.htmlparser.jericho.Element; - import com.cflint.BugInfo; import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; +import net.htmlparser.jericho.Element; + public class ComponentHintChecker extends CFLintScannerAdapter { final String severity = "INFO"; diff --git a/src/main/java/com/cflint/plugins/core/ComponentLengthChecker.java b/src/main/java/com/cflint/plugins/core/ComponentLengthChecker.java index ab5355346..9eaa48240 100644 --- a/src/main/java/com/cflint/plugins/core/ComponentLengthChecker.java +++ b/src/main/java/com/cflint/plugins/core/ComponentLengthChecker.java @@ -1,21 +1,16 @@ package com.cflint.plugins.core; -import java.util.Arrays; -import java.util.Map; - -import ro.fortsoft.pf4j.Extension; -import net.htmlparser.jericho.Element; -import cfml.parsing.cfscript.CFExpression; -import cfml.parsing.cfscript.CFFunctionExpression; -import cfml.parsing.cfscript.script.CFCompoundStatement; -import cfml.parsing.cfscript.script.CFFuncDeclStatement; -import cfml.parsing.cfscript.script.CFScriptStatement; - import com.cflint.BugInfo; import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; +import cfml.parsing.cfscript.CFExpression; +import cfml.parsing.cfscript.script.CFCompoundStatement; +import cfml.parsing.cfscript.script.CFScriptStatement; +import net.htmlparser.jericho.Element; +import ro.fortsoft.pf4j.Extension; + @Extension public class ComponentLengthChecker extends CFLintScannerAdapter { final int LENGTH_THRESHOLD = 500; diff --git a/src/main/java/com/cflint/plugins/core/ComponentNameChecker.java b/src/main/java/com/cflint/plugins/core/ComponentNameChecker.java index f6a74d62a..80a43e138 100644 --- a/src/main/java/com/cflint/plugins/core/ComponentNameChecker.java +++ b/src/main/java/com/cflint/plugins/core/ComponentNameChecker.java @@ -1,18 +1,14 @@ package com.cflint.plugins.core; -import ro.fortsoft.pf4j.Extension; -import net.htmlparser.jericho.Element; -import net.htmlparser.jericho.Attributes; -import cfml.parsing.cfscript.script.CFScriptStatement; -import cfml.parsing.cfscript.script.CFCompDeclStatement; - - import com.cflint.BugInfo; import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; -import java.util.regex.Pattern; +import cfml.parsing.cfscript.script.CFCompDeclStatement; +import cfml.parsing.cfscript.script.CFScriptStatement; +import net.htmlparser.jericho.Element; +import ro.fortsoft.pf4j.Extension; @Extension public class ComponentNameChecker extends CFLintScannerAdapter { diff --git a/src/main/java/com/cflint/plugins/core/CreateObjectChecker.java b/src/main/java/com/cflint/plugins/core/CreateObjectChecker.java index b94bc8a0f..07fa3ab88 100644 --- a/src/main/java/com/cflint/plugins/core/CreateObjectChecker.java +++ b/src/main/java/com/cflint/plugins/core/CreateObjectChecker.java @@ -1,17 +1,14 @@ package com.cflint.plugins.core; -import ro.fortsoft.pf4j.Extension; -import net.htmlparser.jericho.Element; - -import cfml.parsing.cfscript.CFExpression; -import cfml.parsing.cfscript.script.CFExpressionStatement; -import cfml.parsing.cfscript.script.CFScriptStatement; - import com.cflint.BugInfo; import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; +import cfml.parsing.cfscript.script.CFExpressionStatement; +import cfml.parsing.cfscript.script.CFScriptStatement; +import ro.fortsoft.pf4j.Extension; + @Extension public class CreateObjectChecker extends CFLintScannerAdapter { final String severity = "INFO"; diff --git a/src/main/java/com/cflint/plugins/core/FileCaseChecker.java b/src/main/java/com/cflint/plugins/core/FileCaseChecker.java index 4aaa8faa0..9f81b3d46 100644 --- a/src/main/java/com/cflint/plugins/core/FileCaseChecker.java +++ b/src/main/java/com/cflint/plugins/core/FileCaseChecker.java @@ -1,14 +1,11 @@ package com.cflint.plugins.core; -import ro.fortsoft.pf4j.Extension; -import net.htmlparser.jericho.Element; -import cfml.parsing.cfscript.CFExpression; -import cfml.parsing.cfscript.script.CFScriptStatement; - import com.cflint.BugInfo; import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; +import ro.fortsoft.pf4j.Extension; + @Extension public class FileCaseChecker extends CFLintScannerAdapter { final String severity = "INFO"; diff --git a/src/main/java/com/cflint/plugins/core/FunctionHintChecker.java b/src/main/java/com/cflint/plugins/core/FunctionHintChecker.java index 410c47659..b69a1e4f8 100644 --- a/src/main/java/com/cflint/plugins/core/FunctionHintChecker.java +++ b/src/main/java/com/cflint/plugins/core/FunctionHintChecker.java @@ -1,12 +1,12 @@ package com.cflint.plugins.core; -import net.htmlparser.jericho.Element; - import com.cflint.BugInfo; import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; +import net.htmlparser.jericho.Element; + public class FunctionHintChecker extends CFLintScannerAdapter { final String severity = "INFO"; diff --git a/src/main/java/com/cflint/plugins/core/FunctionLengthChecker.java b/src/main/java/com/cflint/plugins/core/FunctionLengthChecker.java index 219af6307..213afc727 100644 --- a/src/main/java/com/cflint/plugins/core/FunctionLengthChecker.java +++ b/src/main/java/com/cflint/plugins/core/FunctionLengthChecker.java @@ -1,21 +1,16 @@ package com.cflint.plugins.core; -import java.util.Arrays; -import java.util.Map; - -import ro.fortsoft.pf4j.Extension; -import net.htmlparser.jericho.Element; -import cfml.parsing.cfscript.CFExpression; -import cfml.parsing.cfscript.CFFunctionExpression; -import cfml.parsing.cfscript.script.CFCompoundStatement; -import cfml.parsing.cfscript.script.CFFuncDeclStatement; -import cfml.parsing.cfscript.script.CFScriptStatement; - import com.cflint.BugInfo; import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; +import cfml.parsing.cfscript.CFExpression; +import cfml.parsing.cfscript.script.CFFuncDeclStatement; +import cfml.parsing.cfscript.script.CFScriptStatement; +import net.htmlparser.jericho.Element; +import ro.fortsoft.pf4j.Extension; + @Extension public class FunctionLengthChecker extends CFLintScannerAdapter { final int LENGTH_THRESHOLD = 100; diff --git a/src/main/java/com/cflint/plugins/core/FunctionTypeChecker.java b/src/main/java/com/cflint/plugins/core/FunctionTypeChecker.java index 507eed3e4..a520627c5 100644 --- a/src/main/java/com/cflint/plugins/core/FunctionTypeChecker.java +++ b/src/main/java/com/cflint/plugins/core/FunctionTypeChecker.java @@ -1,15 +1,13 @@ package com.cflint.plugins.core; -import net.htmlparser.jericho.Element; -import cfml.parsing.cfscript.script.CFFuncDeclStatement; -import cfml.parsing.cfscript.script.CFFunctionParameter; -import cfml.parsing.cfscript.script.CFScriptStatement; - import com.cflint.BugInfo; import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; -import com.cflint.tools.CFTool; + +import cfml.parsing.cfscript.script.CFFuncDeclStatement; +import cfml.parsing.cfscript.script.CFScriptStatement; +import net.htmlparser.jericho.Element; public class FunctionTypeChecker extends CFLintScannerAdapter { final String severity = "WARNING"; diff --git a/src/main/java/com/cflint/plugins/core/FunctionXChecker.java b/src/main/java/com/cflint/plugins/core/FunctionXChecker.java index 1b91e4cd6..572abb002 100644 --- a/src/main/java/com/cflint/plugins/core/FunctionXChecker.java +++ b/src/main/java/com/cflint/plugins/core/FunctionXChecker.java @@ -1,17 +1,13 @@ package com.cflint.plugins.core; -import ro.fortsoft.pf4j.Extension; -import net.htmlparser.jericho.Element; -import cfml.parsing.cfscript.CFExpression; -import cfml.parsing.cfscript.CFFunctionExpression; -import cfml.parsing.cfscript.script.CFExpressionStatement; -import cfml.parsing.cfscript.script.CFScriptStatement; - -import com.cflint.BugInfo; import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; +import cfml.parsing.cfscript.CFExpression; +import cfml.parsing.cfscript.CFFunctionExpression; +import ro.fortsoft.pf4j.Extension; + @Extension public class FunctionXChecker extends CFLintScannerAdapter { final String severity = "INFO"; diff --git a/src/main/java/com/cflint/plugins/core/GlobalVarChecker.java b/src/main/java/com/cflint/plugins/core/GlobalVarChecker.java index b913e7644..82934b55f 100644 --- a/src/main/java/com/cflint/plugins/core/GlobalVarChecker.java +++ b/src/main/java/com/cflint/plugins/core/GlobalVarChecker.java @@ -1,13 +1,13 @@ package com.cflint.plugins.core; -import cfml.parsing.cfscript.CFExpression; -import cfml.parsing.cfscript.CFIdentifier; -import cfml.parsing.cfscript.CFFullVarExpression; - import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; +import cfml.parsing.cfscript.CFExpression; +import cfml.parsing.cfscript.CFFullVarExpression; +import cfml.parsing.cfscript.CFIdentifier; + public class GlobalVarChecker extends CFLintScannerAdapter { protected CFScopes scopes = new CFScopes(); diff --git a/src/main/java/com/cflint/plugins/core/LiteralChecker.java b/src/main/java/com/cflint/plugins/core/LiteralChecker.java index 57d9bc10b..69f22bc24 100644 --- a/src/main/java/com/cflint/plugins/core/LiteralChecker.java +++ b/src/main/java/com/cflint/plugins/core/LiteralChecker.java @@ -1,22 +1,19 @@ package com.cflint.plugins.core; -import java.util.Map; import java.util.HashMap; - -import ro.fortsoft.pf4j.Extension; -import cfml.parsing.cfscript.CFExpression; -import cfml.parsing.cfscript.CFFunctionExpression; -import cfml.parsing.cfscript.CFLiteral; -import cfml.parsing.cfscript.script.CFCompDeclStatement; -import cfml.parsing.cfscript.script.CFExpressionStatement; -import cfml.parsing.cfscript.script.CFScriptStatement; - +import java.util.Map; import com.cflint.BugInfo; import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; +import cfml.parsing.cfscript.CFExpression; +import cfml.parsing.cfscript.CFLiteral; +import cfml.parsing.cfscript.script.CFCompDeclStatement; +import cfml.parsing.cfscript.script.CFScriptStatement; +import ro.fortsoft.pf4j.Extension; + @Extension public class LiteralChecker extends CFLintScannerAdapter { final String severity = "WARNING"; diff --git a/src/main/java/com/cflint/plugins/core/MethodNameChecker.java b/src/main/java/com/cflint/plugins/core/MethodNameChecker.java index 284b17d6f..be29ec3d9 100644 --- a/src/main/java/com/cflint/plugins/core/MethodNameChecker.java +++ b/src/main/java/com/cflint/plugins/core/MethodNameChecker.java @@ -1,18 +1,14 @@ package com.cflint.plugins.core; -import ro.fortsoft.pf4j.Extension; -import net.htmlparser.jericho.Element; -import net.htmlparser.jericho.Attributes; -import cfml.parsing.cfscript.script.CFScriptStatement; -import cfml.parsing.cfscript.script.CFFuncDeclStatement; - - import com.cflint.BugInfo; import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; -import java.util.regex.Pattern; +import cfml.parsing.cfscript.script.CFFuncDeclStatement; +import cfml.parsing.cfscript.script.CFScriptStatement; +import net.htmlparser.jericho.Element; +import ro.fortsoft.pf4j.Extension; @Extension public class MethodNameChecker extends CFLintScannerAdapter { diff --git a/src/main/java/com/cflint/plugins/core/NestedCFOutput.java b/src/main/java/com/cflint/plugins/core/NestedCFOutput.java index f25d0e1db..752fb0427 100644 --- a/src/main/java/com/cflint/plugins/core/NestedCFOutput.java +++ b/src/main/java/com/cflint/plugins/core/NestedCFOutput.java @@ -1,12 +1,12 @@ package com.cflint.plugins.core; -import net.htmlparser.jericho.Element; - import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; import com.cflint.tools.CFTool; +import net.htmlparser.jericho.Element; + public class NestedCFOutput extends CFLintScannerAdapter { public static final String CFOUTPUT = "cfoutput"; diff --git a/src/main/java/com/cflint/plugins/core/OutputParmMissing.java b/src/main/java/com/cflint/plugins/core/OutputParmMissing.java index b0f9ed626..9ef5a2d9a 100644 --- a/src/main/java/com/cflint/plugins/core/OutputParmMissing.java +++ b/src/main/java/com/cflint/plugins/core/OutputParmMissing.java @@ -1,11 +1,11 @@ package com.cflint.plugins.core; -import net.htmlparser.jericho.Element; - import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; +import net.htmlparser.jericho.Element; + public class OutputParmMissing extends CFLintScannerAdapter { @Override diff --git a/src/main/java/com/cflint/plugins/core/QueryParamChecker.java b/src/main/java/com/cflint/plugins/core/QueryParamChecker.java index f5de1c991..10e3f3b37 100644 --- a/src/main/java/com/cflint/plugins/core/QueryParamChecker.java +++ b/src/main/java/com/cflint/plugins/core/QueryParamChecker.java @@ -3,17 +3,14 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import net.htmlparser.jericho.Element; -import cfml.parsing.cfscript.CFBinaryExpression; -import cfml.parsing.cfscript.CFExpression; -import cfml.parsing.cfscript.CFFunctionExpression; -import cfml.parsing.cfscript.CFJavaMethodExpression; -import cfml.parsing.cfscript.CFFullVarExpression; - import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; +import cfml.parsing.cfscript.CFExpression; +import cfml.parsing.cfscript.CFFunctionExpression; +import net.htmlparser.jericho.Element; + public class QueryParamChecker extends CFLintScannerAdapter { @Override diff --git a/src/main/java/com/cflint/plugins/core/ScriptTagChecker.java b/src/main/java/com/cflint/plugins/core/ScriptTagChecker.java index e47549f84..8d98bae83 100644 --- a/src/main/java/com/cflint/plugins/core/ScriptTagChecker.java +++ b/src/main/java/com/cflint/plugins/core/ScriptTagChecker.java @@ -1,15 +1,15 @@ package com.cflint.plugins.core; -import ro.fortsoft.pf4j.Extension; -import net.htmlparser.jericho.Element; -import cfml.parsing.cfscript.CFExpression; -import cfml.parsing.cfscript.script.CFScriptStatement; - import com.cflint.BugInfo; import com.cflint.BugList; import com.cflint.plugins.CFLintScannerAdapter; import com.cflint.plugins.Context; +import cfml.parsing.cfscript.CFExpression; +import cfml.parsing.cfscript.script.CFScriptStatement; +import net.htmlparser.jericho.Element; +import ro.fortsoft.pf4j.Extension; + @Extension public class ScriptTagChecker extends CFLintScannerAdapter { final String message = "Don't use inline