-
Bug
-
Resolution: Fixed
-
Minor
-
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
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. |
Component/s | Original: warnings-ng-plugin [ 24526 ] |
Labels | New: help-wanted newbie-friendly |
Assignee | Original: Ulli Hafner [ drulli ] |
Component/s | New: analysis-model [ 23523 ] | |
Component/s | Original: analysis-model-api-plugin [ 24221 ] |
Assignee | New: Lorenz Aebi [ laebi ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Status | Original: In Progress [ 3 ] | New: In Review [ 10005 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: In Review [ 10005 ] | New: Fixed but Unreleased [ 10203 ] |
Released As | New: analysis-model-api 4.0.0 | |
Status | Original: Fixed but Unreleased [ 10203 ] | New: Resolved [ 5 ] |