• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • analysis-model
    • DocFX 2.39.2
      Jenkins 2.150.1
      warnings-ng 1.0.0
      analysis-model-api 1.0.0
      violations-lib 1.73
    • analysis-model-api 4.0.0

      DocFX wrote several entries like this to its log file:

      {"message":"For git repo <C:/JenkTst/agent1/workspace/REDACTED_warnings-ng>, using branch 'warnings-ng' from the environment variable Git_Branch.","source":"BuildCore.Build Document.Load.TocDocumentProcessor","file":"toc.yml","date_time":"2018-12-26T20:23:53.8113472Z","message_severity":"info","correlation_id":"4A74E517-AC4E-49E8-ADDF-0635EB7796D9.117.1.31.2.4"}
      

      The Warnings Next Generation Plug-in treated this as a low-severity warning; it showed up in the number-of-warnings graph and in the list of warnings. However, this is not really a warning and should be excluded from those. Furthermore, the values of the "file" property varied between builds (perhaps due to race conditions and caching), so the plug-in often treated some of the warnings as new.

      Analysis Model API Plug-in 1.0.0 uses violations-lib 1.73 and analysis-model 1.1.0. In violations-lib, DocFXParser translates "info" to SEVERITY.INFO. In analysis-model, DocFxAdapter is derived from AbstractViolationAdapter, which translates SEVERITY.INFO to Severity.WARNING_LOW.

      I think DocFxAdapter should override isValid and discard the violation if the severity is SEVERITY.INFO. (DocFX additionally supports "verbose" and "diagnostic", but DocFxParser translates those to SEVERITY.INFO as well.)

      I first tried to work around this problem by configuring a filter for warnings-ng, but it does not seem possible to filter on the message or severity. I was able to work around the problem by running DocFX with the --logLevel Warning option, so that the info messages didn't appear in the log file and the console log at all, but I would prefer not using that option because the info messages may be useful for troubleshooting.

          [JENKINS-55345] DocFX info messages count as warnings

          Kalle Niemitalo created issue -
          Kalle Niemitalo made changes -
          Description Original: DocFX wrote several entries like this to its log file:

          {code:json}
          {"message":"For git repo <C:/JenkTst/agent1/workspace/REDACTED_warnings-ng>, using branch 'warnings-ng' from the environment variable Git_Branch.","source":"BuildCore.Build Document.Load.TocDocumentProcessor","file":"toc.yml","date_time":"2018-12-26T20:23:53.8113472Z","message_severity":"info","correlation_id":"4A74E517-AC4E-49E8-ADDF-0635EB7796D9.117.1.31.2.4"}
          {code}

          The Warnings Next Generation Plug-in treated this as a low-severity warning; it showed up in the number-of-warnings graph and in the list of warnings. However, this is not really a warning and should be excluded from those. Furthermore, the values of the "file" property varied between builds (perhaps due to race conditions and caching), so the plug-in often treated some of the warnings as new.

          About Analysis Model API Plug-in 1.0.0 uses violations-lib 1.73 and analysis-model 1.1.0. In violations-lib, [DocFXParser|https://github.com/tomasbjerre/violations-lib/blob/1.73/src/main/java/se/bjurr/violations/lib/parsers/DocFXParser.java] translates "info" to {{SEVERITY.INFO}}. In analysis-model, [DocFxAdapter|https://github.com/jenkinsci/analysis-model/blob/analysis-model-1.1.0/src/main/java/edu/hm/hafner/analysis/parser/violations/DocFxAdapter.java] is derived from [AbstractViolationAdapter|https://github.com/jenkinsci/analysis-model/blob/analysis-model-1.1.0/src/main/java/edu/hm/hafner/analysis/parser/violations/AbstractViolationAdapter.java], which translates {{SEVERITY.INFO}} to {{Severity.WARNING_LOW}}.

          I think DocFxAdapter should override {{isValid}} and discard the violation if the severity is {{SEVERITY.INFO}}. ([DocFX additionally supports "verbose" and "diagnostic"|https://github.com/dotnet/docfx/blob/v2.39.2/src/Microsoft.DocAsCode.Common/Loggers/ReportLogListener.cs#L132], but DocFxParser translates those to {{SEVERITY.INFO}} as well.)

          I first tried to work around this problem by configuring a filter for warnings-ng, but it does not seem possible to filter on the message or severity. I was able to work around the problem by running DocFX with the {{--logLevel Warning}} option, so that the info messages didn't appear in the log file and the console log at all, but I would prefer not using that option because the info messages may be useful for troubleshooting.
          New: DocFX wrote several entries like this to its log file:

          {code:json}
          {"message":"For git repo <C:/JenkTst/agent1/workspace/REDACTED_warnings-ng>, using branch 'warnings-ng' from the environment variable Git_Branch.","source":"BuildCore.Build Document.Load.TocDocumentProcessor","file":"toc.yml","date_time":"2018-12-26T20:23:53.8113472Z","message_severity":"info","correlation_id":"4A74E517-AC4E-49E8-ADDF-0635EB7796D9.117.1.31.2.4"}
          {code}

          The Warnings Next Generation Plug-in treated this as a low-severity warning; it showed up in the number-of-warnings graph and in the list of warnings. However, this is not really a warning and should be excluded from those. Furthermore, the values of the "file" property varied between builds (perhaps due to race conditions and caching), so the plug-in often treated some of the warnings as new.

          Analysis Model API Plug-in 1.0.0 uses violations-lib 1.73 and analysis-model 1.1.0. In violations-lib, [DocFXParser|https://github.com/tomasbjerre/violations-lib/blob/1.73/src/main/java/se/bjurr/violations/lib/parsers/DocFXParser.java] translates "info" to {{SEVERITY.INFO}}. In analysis-model, [DocFxAdapter|https://github.com/jenkinsci/analysis-model/blob/analysis-model-1.1.0/src/main/java/edu/hm/hafner/analysis/parser/violations/DocFxAdapter.java] is derived from [AbstractViolationAdapter|https://github.com/jenkinsci/analysis-model/blob/analysis-model-1.1.0/src/main/java/edu/hm/hafner/analysis/parser/violations/AbstractViolationAdapter.java], which translates {{SEVERITY.INFO}} to {{Severity.WARNING_LOW}}.

          I think DocFxAdapter should override {{isValid}} and discard the violation if the severity is {{SEVERITY.INFO}}. ([DocFX additionally supports "verbose" and "diagnostic"|https://github.com/dotnet/docfx/blob/v2.39.2/src/Microsoft.DocAsCode.Common/Loggers/ReportLogListener.cs#L132], but DocFxParser translates those to {{SEVERITY.INFO}} as well.)

          I first tried to work around this problem by configuring a filter for warnings-ng, but it does not seem possible to filter on the message or severity. I was able to work around the problem by running DocFX with the {{--logLevel Warning}} option, so that the info messages didn't appear in the log file and the console log at all, but I would prefer not using that option because the info messages may be useful for troubleshooting.
          Ulli Hafner made changes -
          Component/s Original: warnings-ng-plugin [ 24526 ]
          Ulli Hafner made changes -
          Labels New: help-wanted newbie-friendly
          Ulli Hafner made changes -
          Assignee Original: Ulli Hafner [ drulli ]
          Ulli Hafner made changes -
          Component/s New: analysis-model [ 23523 ]
          Component/s Original: analysis-model-api-plugin [ 24221 ]
          Lorenz Aebi made changes -
          Assignee New: Lorenz Aebi [ laebi ]
          Lorenz Aebi made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Lorenz Aebi made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Lorenz Aebi made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Fixed but Unreleased [ 10203 ]
          Lorenz Aebi made changes -
          Released As New: analysis-model-api 4.0.0
          Status Original: Fixed but Unreleased [ 10203 ] New: Resolved [ 5 ]

            laebi Lorenz Aebi
            kon Kalle Niemitalo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: