Package com.android.tools.lint.detector.api

Examples of com.android.tools.lint.detector.api.Severity


            if (configuration.isIgnored(context, issue, location, message, data)) {
                return;
            }

            Severity severity = configuration.getSeverity(issue);
            if (severity == Severity.IGNORE) {
                return;
            }

            mDelegate.report(context, issue, location, message, data);
View Full Code Here


    @Override
    public Severity getSeverity(Issue issue) {
        ensureInitialized();

        Severity severity = mSeverity.get(issue.getId());
        if (severity != null) {
            return severity;
        }

        if (mParent != null) {
View Full Code Here

                for (String id : ids) {
                    writer.write("    <");                               //$NON-NLS-1$
                    writer.write(TAG_ISSUE);
                    writeAttribute(writer, ATTR_ID, id);
                    Severity severity = mSeverity.get(id);
                    if (severity != null) {
                        writeAttribute(writer, ATTR_SEVERITY, severity.name().toLowerCase());
                    }

                    List<String> paths = mSuppressed.get(id);
                    if (paths != null && paths.size() > 0) {
                        writer.write('>');
View Full Code Here

        }

        @NonNull
        @Override
        public Severity getSeverity(@NonNull Issue issue) {
            Severity severity = computeSeverity(issue);

            if (mFlags.isWarningsAsErrors() && severity != Severity.IGNORE) {
                severity = Severity.ERROR;
            }
View Full Code Here

            return super.getDefaultSeverity(issue);
        }

        private Severity computeSeverity(@NonNull Issue issue) {
            Severity severity = super.getSeverity(issue);

            String id = issue.getId();
            Set<String> suppress = mFlags.getSuppressedIds();
            if (suppress.contains(id)) {
                return Severity.IGNORE;
View Full Code Here

        }

        @NonNull
        @Override
        public Severity getSeverity(@NonNull Issue issue) {
            Severity severity = computeSeverity(issue);

            if (mFatalOnly && severity != Severity.FATAL) {
                return Severity.IGNORE;
            }
View Full Code Here

            return super.getDefaultSeverity(issue);
        }

        private Severity computeSeverity(@NonNull Issue issue) {
            Severity severity = super.getSeverity(issue);

            String id = issue.getId();
            Set<String> suppress = mFlags.getSuppressedIds();
            if (suppress.contains(id)) {
                return Severity.IGNORE;
            }

            Severity manual = mFlags.getSeverityOverrides().get(id);
            if (manual != null) {
                return manual;
            }

            Set<String> enabled = mFlags.getEnabledIds();
View Full Code Here

        }

        @NonNull
        @Override
        public Severity getSeverity(@NonNull Issue issue) {
            Severity severity = computeSeverity(issue);

            if (mFlags.isWarningsAsErrors() && severity != Severity.IGNORE) {
                severity = Severity.ERROR;
            }
View Full Code Here

            return super.getDefaultSeverity(issue);
        }

        private Severity computeSeverity(@NonNull Issue issue) {
            Severity severity = super.getSeverity(issue);

            String id = issue.getId();
            Set<String> suppress = mFlags.getSuppressedIds();
            if (suppress.contains(id)) {
                return Severity.IGNORE;
View Full Code Here

                    if (startLength < output.length()) {
                        output.append(' ');
                    }
                }

                Severity severity = warning.severity;
                if (severity == Severity.FATAL) {
                    // Treat the fatal error as an error such that we don't display
                    // both "Fatal:" and "Error:" etc in the error output.
                    severity = Severity.ERROR;
                }
                output.append(severity.getDescription());
                output.append(':');
                output.append(' ');

                output.append(warning.message);
                if (warning.issue != null) {
View Full Code Here

TOP

Related Classes of com.android.tools.lint.detector.api.Severity

Copyright © 2018 www.massapicom. 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.