Class ConsoleReporter

java.lang.Object
com.github._1c_syntax.bsl.languageserver.reporters.ConsoleReporter
All Implemented Interfaces:
DiagnosticReporter

@Component public class ConsoleReporter extends Object implements DiagnosticReporter
  • Constructor Details

    • ConsoleReporter

      public ConsoleReporter()
  • Method Details

    • key

      public String key()
      Description copied from interface: DiagnosticReporter
      Получить ключ (идентификатор) репортера.
      Specified by:
      key in interface DiagnosticReporter
      Returns:
      Уникальный ключ репортера
    • isMetricCalculationRequired

      public boolean isMetricCalculationRequired()
      Description copied from interface: DiagnosticReporter
      Признак того, что репортеру для формирования отчета необходимы метрики документов.

      Значение по умолчанию — false. Переопределяется в true только теми репортерами, которые действительно включают метрики в отчет (в файл или иной вывод). Это позволяет пропустить вычисление метрик, если ни один из активных репортеров их не использует.

      Specified by:
      isMetricCalculationRequired in interface DiagnosticReporter
      Returns:
      true, если репортеру нужны метрики документов, иначе false
    • beginReport

      public void beginReport(ReportContext context, Path outputDir)
      Description copied from interface: DiagnosticReporter
      Начать отчёт: открыть файл, записать заголовок.
      Specified by:
      beginReport in interface DiagnosticReporter
      Parameters:
      context - сведения об анализе
      outputDir - каталог для сохранения отчёта
    • accept

      public void accept(FileInfo fileInfo)
      Description copied from interface: DiagnosticReporter
      Записать результат одного файла.
      Specified by:
      accept in interface DiagnosticReporter
      Parameters:
      fileInfo - результаты анализа файла; после возврата из метода не сохраняется
    • endReport

      public void endReport()
      Description copied from interface: DiagnosticReporter
      Завершить отчёт: дописать концовку и зафиксировать файл.
      Specified by:
      endReport in interface DiagnosticReporter