doxygen-action
doxygen-action copied to clipboard
Adds support to fail on warnings
Adds support to fail on warnings. These warnings can be filtered by a regex using grep. Filtered and remaining warnings will be printed and the step will be set as failing iff no un-filtered warnings remain.
This adds the options
fail-on-warnings:
description: 'Make this action fail if doxygen produces warnings.'
required: false
default: false
warnings-filter:
description: 'Warning filter, matching lines will be filtered out.'
required: false
default: ''
The old behavior is kept and failure on warnings is only enabled if fail-on-warnings is set to true.
Hey @SteffenSeckler, sorry that I haven't got around to this yet - been awfully busy at work and totally forgot about this. I'll try to review it sometime this week.
@SteffenSeckler Ok, finally got around to looking at this PR. I've pushed some changes to your branch with some changes to config. I've noticed an issue when testing on my repo here: mattnotmitt/DelaunayTriangulation (note: seriously recommend nektos/act for testing). It seems that the filter can't handle the relatively common multiline warnings as seen in this build. Have you got any thoughts on how this could be fixed? Apart from that, love the solution 👍
How about we try to use https://pypi.org/project/mlx.warnings/ where we can set number of allowed warnings and only fail if it is outside of the range?
You can also set Doxygen to fail on warnings in your Doxyfile: https://www.doxygen.nl/manual/config.html
Set the WARN_AS_ERROR flag to YES, NO, or FAIL_ON_WARNINGS