Package com.puppycrawl.tools.checkstyle

Examples of com.puppycrawl.tools.checkstyle.Checker.addListener()


            checker.addListener( listener );
        }

        if ( request.isConsoleOutput() )
        {
            checker.addListener( request.getConsoleListener() );
        }

        CheckstyleReportListener sinkListener = new CheckstyleReportListener( configuration );
        if ( request.isAggregate() )
        {
View Full Code Here


        else
        {
            addSourceDirectory( sinkListener, sourceDirectory, testSourceDirectory, request.getResources(), request );
        }

        checker.addListener( sinkListener );

        List<File> filesList = Arrays.asList( files );
        int nbErrors = checker.process( filesList );

        checker.destroy();
View Full Code Here

        AuditListener listener = request.getListener();

        if ( listener != null )
        {
            checker.addListener( listener );
        }

        if ( request.isConsoleOutput() )
        {
            checker.addListener( request.getConsoleListener() );
View Full Code Here

            checker.addListener( listener );
        }

        if ( request.isConsoleOutput() )
        {
            checker.addListener( request.getConsoleListener() );
        }

        CheckstyleReportListener sinkListener = new CheckstyleReportListener( configuration );
        if ( request.isAggregate() )
        {
View Full Code Here

        else
        {
            addSourceDirectory( sinkListener, sourceDirectory, testSourceDirectory, request.getResources(), request );
        }

        checker.addListener( sinkListener );

        List<File> filesList = Arrays.asList( files );
        int nbErrors = checker.process( filesList );

        checker.destroy();
View Full Code Here

        checker.setLocaleCountry(locale.getCountry());
        checker.setLocaleLanguage(locale.getLanguage());
        checker.setModuleClassLoader(Thread.currentThread()
            .getContextClassLoader());
        checker.configure(checkerConfig);
        checker.addListener(new BriefLogger(mStream));
        return checker;
    }

    private String[] removeSuppressed(String[] aFrom, String[] aRemove)
    {
View Full Code Here

        final Locale locale = Locale.ENGLISH;
        checker.setLocaleCountry(locale.getCountry());
        checker.setLocaleLanguage(locale.getLanguage());
        checker.setModuleClassLoader(Thread.currentThread().getContextClassLoader());
        checker.configure(checkerConfig);
        checker.addListener(new BriefLogger(mStream));
        return checker;
    }

    private String[] removeSuppressed(String[] aFrom, String[] aRemove)
    {
View Full Code Here

        final Locale locale = Locale.ENGLISH;
        checker.setLocaleCountry(locale.getCountry());
        checker.setLocaleLanguage(locale.getLanguage());
        checker.setModuleClassLoader(Thread.currentThread().getContextClassLoader());
        checker.configure(checkerConfig);
        checker.addListener(new BriefLogger(mStream));
        return checker;
    }

    private String[] removeSuppressed(String[] aFrom, String[] aRemove)
    {
View Full Code Here

    checker.setModuleClassLoader(Thread.currentThread().getContextClassLoader());

    DefaultConfiguration defaultConfig = createCheckerConfig(aCheckConfig);
    checker.configure(defaultConfig);

    checker.addListener(new BriefLogger(printStream));
    return checker;
  }

  protected DefaultConfiguration createCheckerConfig(Configuration aConfig)
  {
View Full Code Here

          JavaUtils.getJavaProject(project),
          Checker.class.getClassLoader()));
    checker.setClassloader(new ProjectClassLoader(
          JavaUtils.getJavaProject(project)));
    checker.configure(config);
    checker.addListener(listener);
    checker.process(files);

    return listener.getErrors();
  }
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.