Examples of FilterSet


Examples of com.puppycrawl.tools.checkstyle.api.FilterSet

        {
            throw new CheckstyleExecutorException( "Error getting files to process", e );
        }

        final String suppressionsFilePath = getSuppressionsFilePath( request );
        FilterSet filterSet = getSuppressionsFilterSet( suppressionsFilePath );

        Checker checker = new Checker();

        // setup classloader, needed to avoid "Unable to get class information
        // for ..." errors
View Full Code Here

Examples of com.puppycrawl.tools.checkstyle.api.FilterSet

{
    @Test
    public void testResourceLoadSuppressions()
        throws CheckstyleException
    {
        final FilterSet fc =
            SuppressionsLoader.loadSuppressions(
                "/checkstyle/suppressions.xml");
        final FilterSet fc2 = new FilterSet();
        assertEquals(fc, fc2);
    }
View Full Code Here

Examples of com.puppycrawl.tools.checkstyle.api.FilterSet

    @Test
    public void testNoSuppressions()
        throws CheckstyleException
    {
        final FilterSet fc =
            SuppressionsLoader.loadSuppressions(
                    "src/test/resources/com/puppycrawl/tools/checkstyle/suppressions_none.xml");
        final FilterSet fc2 = new FilterSet();
        assertEquals(fc, fc2);
    }
View Full Code Here

Examples of com.puppycrawl.tools.checkstyle.api.FilterSet

    @Test
    public void testLoadFromURL()
        throws CheckstyleException, InterruptedException
    {
        FilterSet fc = null;

        int attemptCount = 0;
        final int attemptLimit = 5;
        while (attemptCount <= attemptLimit) {
            try {

                fc = SuppressionsLoader
                        .loadSuppressions("http://checkstyle.sourceforge.net/files/suppressions_none.xml");
                break;

            }
            catch (CheckstyleException ex) {
                // for some reason Travis CI failed some times(unstable) on reading this file
                if (attemptCount < attemptLimit
                        && ex.getMessage().contains("unable to read"))
                {
                    attemptCount++;
                    // wait for bad/disconnection time to pass
                    Thread.sleep(1000);
                }
                else {
                    throw ex;
                }
            }
        }

        final FilterSet fc2 = new FilterSet();
        assertEquals(fc, fc2);
    }
View Full Code Here

Examples of com.puppycrawl.tools.checkstyle.api.FilterSet

    @Test
    public void testMultipleSuppression()
        throws CheckstyleException, PatternSyntaxException
    {
        final FilterSet fc =
            SuppressionsLoader.loadSuppressions(
                    "src/test/resources/com/puppycrawl/tools/checkstyle/suppressions_multiple.xml");
        final FilterSet fc2 = new FilterSet();
        SuppressElement se0 = new SuppressElement("file0");
        se0.setChecks("check0");
        fc2.addFilter(se0);
        SuppressElement se1 = new SuppressElement("file1");
        se1.setChecks("check1");
        se1.setLines("1,2-3");
        fc2.addFilter(se1);
        SuppressElement se2 = new SuppressElement("file2");
        se2.setChecks("check2");
        se2.setColumns("1,2-3");
        fc2.addFilter(se2);
        SuppressElement se3 = new SuppressElement("file3");
        se3.setChecks("check3");
        se3.setLines("1,2-3");
        se3.setColumns("1,2-3");
        fc2.addFilter(se3);
        assertEquals(fc, fc2);
    }
View Full Code Here

Examples of com.puppycrawl.tools.checkstyle.api.FilterSet

        {
            throw new CheckstyleExecutorException( "Error getting files to process", e );
        }

        final String suppressionsFilePath = getSuppressionsFilePath( request );
        FilterSet filterSet = getSuppressionsFilterSet( suppressionsFilePath );

        Checker checker = new Checker();

        // setup classloader, needed to avoid "Unable to get class information for ..." errors
        List<String> classPathStrings = new ArrayList<String>();
View Full Code Here

Examples of com.puppycrawl.tools.checkstyle.api.FilterSet

        {
            throw new CheckstyleExecutorException( "Error getting files to process", e );
        }

        final String suppressionsFilePath = getSuppressionsFilePath( request );
        FilterSet filterSet = getSuppressionsFilterSet( suppressionsFilePath );

        Checker checker = new Checker();

        // setup classloader, needed to avoid "Unable to get class information for ..." errors
        List<String> classPathStrings = new ArrayList<String>();
View Full Code Here

Examples of org.apache.jackrabbit.vault.fs.api.FilterSet

     */
    public ImportMode getImportMode(String path) {
        if (importMode != null) {
            return importMode;
        }
        FilterSet set = getCoveringFilterSet(path);
        return set == null ? ImportMode.REPLACE : set.getImportMode();
    }
View Full Code Here

Examples of org.apache.tools.ant.types.FilterSet

        
         //Template location in JAR
         URLResource template = new URLResource(getClass().getResource("/" + TESTRUNNER_TEMPLATE));
        
         //Create tokens to filter
         FilterSet filters = new FilterSet();
         filters.addFilter("APPLICATION_PREFIX", applicationPrefix);
         filters.addFilter("APPLICATION_CLASS", applicationClass);
         filters.addFilter("NAMESPACES", namespaces);
         filters.addFilter("MXML_PREFIX", mxmlPrefix);
         filters.addFilter("CI_LISTENER_CLASS", ciListener);
         filters.addFilter("CLASS_REFS", configuration.getTestSources().getClasses());
         filters.addFilter("IMPORT_REFS", configuration.getTestSources().getImports());
        
         //Copy descriptor template to SWF folder performing token replacement
         ResourceUtils.copyResource(
            template,
            new FileResource(runner),
View Full Code Here

Examples of org.apache.tools.ant.types.FilterSet

         //Descriptor location, same location as SWF due to relative path required in descriptor
         File descriptor = new File(getSwf().getParentFile().getAbsolutePath() + File.separatorChar + DESCRIPTOR_FILE);

         //Create tokens to filter
         Double versionNumber = getVersion();
         FilterSet filters = new FilterSet();
         filters.addFilter("ADL_SWF", getSwf().getName());
         filters.addFilter("ADT_VERSION", Double.toString(versionNumber));
         if(versionNumber > 2.0) {
           filters.addFilter("VERSION_PROP", "versionNumber");
         } else {
           filters.addFilter("VERSION_PROP", "version");
         }

         //Copy descriptor template to SWF folder performing token replacement
         ResourceUtils.copyResource(
            template,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.