-
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.
Interested in providing a PR?