Class BuildTimeReporter

  • All Implemented Interfaces:
    AutoCloseable, org.revapi.configuration.Configurable, org.revapi.Reporter

    public final class BuildTimeReporter
    extends Object
    implements org.revapi.Reporter
    Build-time reporter is a Reporter extension for Revapi that is used by the CheckMojo to output the found problems and also to provide the suggestions to the user how to ignore the problems if deemed ok.

    Even though this is a normal Revapi extension, it doesn't use the normal configuration mechanisms provided by Revapi (i.e. it doesn't define a configuration schema and doesn't accept any configuration from the configuration in the analysis context during the initialize(AnalysisContext) method). Instead, it is configured through the AnalysisContext.getData(String). This is to make it easier to pass complex objects to the reporter and also to amplify the fact that this is no "normal" extension but is tightly bound to the CheckMojo and the Maven build.

    Since:
    0.1
    Author:
    Lukas Krejci
    • Constructor Detail

      • BuildTimeReporter

        public BuildTimeReporter()
    • Method Detail

      • hasBreakingProblems

        public boolean hasBreakingProblems()
      • getAllProblemsMessage

        public String getAllProblemsMessage()
      • getIgnoreSuggestion

        public String getIgnoreSuggestion()
      • getExtensionId

        @Nullable
        public String getExtensionId()
        Specified by:
        getExtensionId in interface org.revapi.configuration.Configurable
      • getJSONSchema

        @Nullable
        public Reader getJSONSchema()
        Specified by:
        getJSONSchema in interface org.revapi.configuration.Configurable
      • initialize

        public void initialize​(@Nonnull
                               org.revapi.AnalysisContext context)
        Specified by:
        initialize in interface org.revapi.configuration.Configurable
      • report

        public void report​(@Nonnull
                           org.revapi.Report report)
        Specified by:
        report in interface org.revapi.Reporter