Examples of SeverityLevelCounter


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

        // Create the checker
        Checker c = null;
        try {
            c = createChecker();

            final SeverityLevelCounter warningCounter =
                new SeverityLevelCounter(SeverityLevel.WARNING);
            c.addListener(warningCounter);

            // Process the files
            long startTime = System.currentTimeMillis();
            final List<File> files = scanFileSets();
            long endTime = System.currentTimeMillis();
            log("To locate the files took " + (endTime - startTime) + " ms.",
                Project.MSG_VERBOSE);

            log("Running Checkstyle " + version + " on " + files.size()
                    + " files", Project.MSG_INFO);
            log("Using configuration " + mConfigLocation, Project.MSG_VERBOSE);

            startTime = System.currentTimeMillis();
            final int numErrs = c.process(files);
            endTime = System.currentTimeMillis();
            log("To process the files took " + (endTime - startTime) + " ms.",
                Project.MSG_VERBOSE);
            final int numWarnings = warningCounter.getCount();
            final boolean ok = (numErrs <= mMaxErrors)
                    && (numWarnings <= mMaxWarnings);

            // Handle the return status
            if (!ok) {
View Full Code Here

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

        // Create the checker
        Checker c = null;
        try {
            c = createChecker();

            final SeverityLevelCounter warningCounter =
                new SeverityLevelCounter(SeverityLevel.WARNING);
            c.addListener(warningCounter);

            // Process the files
            long startTime = System.currentTimeMillis();
            final File[] files = scanFileSets();
            long endTime = System.currentTimeMillis();
            log("To locate the files took " + (endTime - startTime) + " ms.",
                Project.MSG_VERBOSE);

            log("Running Checkstyle " + version + " on " + files.length
                    + " files", Project.MSG_INFO);
            log("Using configuration " + mConfigLocation, Project.MSG_VERBOSE);

            startTime = System.currentTimeMillis();
            final int numErrs = c.process(files);
            endTime = System.currentTimeMillis();
            log("To process the files took " + (endTime - startTime) + " ms.",
                Project.MSG_VERBOSE);
            final int numWarnings = warningCounter.getCount();
            final boolean ok = (numErrs <= mMaxErrors)
                    && (numWarnings <= mMaxWarnings);

            // Handle the return status
            if (!ok) {
View Full Code Here

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

        // Create the checker
        Checker c = null;
        try {
            c = createChecker();

            final SeverityLevelCounter warningCounter =
                new SeverityLevelCounter(SeverityLevel.WARNING);
            c.addListener(warningCounter);

            // Process the files
            long startTime = System.currentTimeMillis();
            final List<File> files = scanFileSets();
            long endTime = System.currentTimeMillis();
            log("To locate the files took " + (endTime - startTime) + " ms.",
                Project.MSG_VERBOSE);

            log("Running Checkstyle " + version + " on " + files.size()
                    + " files", Project.MSG_INFO);
            log("Using configuration " + mConfigLocation, Project.MSG_VERBOSE);

            startTime = System.currentTimeMillis();
            final int numErrs = c.process(files);
            endTime = System.currentTimeMillis();
            log("To process the files took " + (endTime - startTime) + " ms.",
                Project.MSG_VERBOSE);
            final int numWarnings = warningCounter.getCount();
            final boolean ok = (numErrs <= mMaxErrors)
                    && (numWarnings <= mMaxWarnings);

            // Handle the return status
            if (!ok) {
View Full Code Here

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

        // Create the checker
        Checker c = null;
        try {
            c = createChecker();

            final SeverityLevelCounter warningCounter =
                new SeverityLevelCounter(SeverityLevel.WARNING);
            c.addListener(warningCounter);

            // Process the files
            final File[] files = scanFileSets();

            log("Running Checkstyle " + version + " on " + files.length
                    + " files", Project.MSG_INFO);
            log("Using configuration " + mConfigLocation, Project.MSG_VERBOSE);

            final int numErrs = c.process(files);
            final int numWarnings = warningCounter.getCount();
            final boolean ok = numErrs <= mMaxErrors
                    && numWarnings <= mMaxWarnings;

            // Handle the return status
            if (!ok && mFailureProperty != null) {
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.