@Test public void testStartFlexPMDOnAFile() throws JSAPException, PMDException, URISyntaxException, IOException { final String filePath = getTestFiles().get( "AbstractRowData.as" ).getFilePath(); final String[] args = new String[] { "-s", filePath, "-o", new File( "target/test" ).getAbsolutePath(), "--excludePackage", "cairngorm." }; FlexPMD.startFlexPMD( args ); }
static boolean startFlexPMD( final String[] args ) throws JSAPException, PMDException, URISyntaxException, IOException { if ( areCommandLineOptionsCorrect( args ) ) { final String rulesetRef = getParameterValue( CommandLineOptions.RULE_SET ); final String excludePackage = getParameterValue( CommandLineOptions.EXLUDE_PACKAGE ); final String source = getParameterValue( CommandLineOptions.SOURCE_DIRECTORY ); final File sourceDirectory = source.contains( "," ) ? null : new File( source ); final List< File > sourceList = CommandLineUtils.computeSourceList( source ); final File outputDirectory = new File( getParameterValue( CommandLineOptions.OUTPUT ) ); final FlexPmdParameters parameters = new FlexPmdParameters( excludePackage == null ? "" : excludePackage, outputDirectory, rulesetRef == null ? null : new File( rulesetRef ), sourceDirectory, sourceList ); final FlexPmdXmlEngine engine = new FlexPmdXmlEngine( parameters ); engine.executeReport( new FlexPmdViolations() ); } return config.success(); }
FlexPMD { static boolean startFlexPMD( final String[] args ) throws JSAPException, PMDException, URISyntaxException, IOException { if ( areCommandLineOptionsCorrect( args ) ) { final String rulesetRef = getParameterValue( CommandLineOptions.RULE_SET ); final String excludePackage = getParameterValue( CommandLineOptions.EXLUDE_PACKAGE ); final String source = getParameterValue( CommandLineOptions.SOURCE_DIRECTORY ); final File sourceDirectory = source.contains( "," ) ? null : new File( source ); final List< File > sourceList = CommandLineUtils.computeSourceList( source ); final File outputDirectory = new File( getParameterValue( CommandLineOptions.OUTPUT ) ); final FlexPmdParameters parameters = new FlexPmdParameters( excludePackage == null ? "" : excludePackage, outputDirectory, rulesetRef == null ? null : new File( rulesetRef ), sourceDirectory, sourceList ); final FlexPmdXmlEngine engine = new FlexPmdXmlEngine( parameters ); engine.executeReport( new FlexPmdViolations() ); } return config.success(); } }
FlexPMD { static boolean startFlexPMD( final String[] args ) throws JSAPException, PMDException, URISyntaxException, IOException { if ( areCommandLineOptionsCorrect( args ) ) { final String rulesetRef = getParameterValue( CommandLineOptions.RULE_SET ); final String excludePackage = getParameterValue( CommandLineOptions.EXLUDE_PACKAGE ); final String source = getParameterValue( CommandLineOptions.SOURCE_DIRECTORY ); final File sourceDirectory = source.contains( "," ) ? null : new File( source ); final List< File > sourceList = CommandLineUtils.computeSourceList( source ); final File outputDirectory = new File( getParameterValue( CommandLineOptions.OUTPUT ) ); final FlexPmdParameters parameters = new FlexPmdParameters( excludePackage == null ? "" : excludePackage, outputDirectory, rulesetRef == null ? null : new File( rulesetRef ), sourceDirectory, sourceList ); final FlexPmdXmlEngine engine = new FlexPmdXmlEngine( parameters ); engine.executeReport( new FlexPmdViolations() ); } return config.success(); } private  FlexPMD(); }
FlexPMD { static boolean startFlexPMD( final String[] args ) throws JSAPException, PMDException, URISyntaxException, IOException { if ( areCommandLineOptionsCorrect( args ) ) { final String rulesetRef = getParameterValue( CommandLineOptions.RULE_SET ); final String excludePackage = getParameterValue( CommandLineOptions.EXLUDE_PACKAGE ); final String source = getParameterValue( CommandLineOptions.SOURCE_DIRECTORY ); final File sourceDirectory = source.contains( "," ) ? null : new File( source ); final List< File > sourceList = CommandLineUtils.computeSourceList( source ); final File outputDirectory = new File( getParameterValue( CommandLineOptions.OUTPUT ) ); final FlexPmdParameters parameters = new FlexPmdParameters( excludePackage == null ? "" : excludePackage, outputDirectory, rulesetRef == null ? null : new File( rulesetRef ), sourceDirectory, sourceList ); final FlexPmdXmlEngine engine = new FlexPmdXmlEngine( parameters ); engine.executeReport( new FlexPmdViolations() ); } return config.success(); } private  FlexPMD(); static void main( final String[] args ); }
FlexPMD { static boolean startFlexPMD( final String[] args ) throws JSAPException, PMDException, URISyntaxException, IOException { if ( areCommandLineOptionsCorrect( args ) ) { final String rulesetRef = getParameterValue( CommandLineOptions.RULE_SET ); final String excludePackage = getParameterValue( CommandLineOptions.EXLUDE_PACKAGE ); final String source = getParameterValue( CommandLineOptions.SOURCE_DIRECTORY ); final File sourceDirectory = source.contains( "," ) ? null : new File( source ); final List< File > sourceList = CommandLineUtils.computeSourceList( source ); final File outputDirectory = new File( getParameterValue( CommandLineOptions.OUTPUT ) ); final FlexPmdParameters parameters = new FlexPmdParameters( excludePackage == null ? "" : excludePackage, outputDirectory, rulesetRef == null ? null : new File( rulesetRef ), sourceDirectory, sourceList ); final FlexPmdXmlEngine engine = new FlexPmdXmlEngine( parameters ); engine.executeReport( new FlexPmdViolations() ); } return config.success(); } private  FlexPMD(); static void main( final String[] args );  }