doxygen-action icon indicating copy to clipboard operation
doxygen-action copied to clipboard

Adds support to fail on warnings

Open SteffenSeckler opened this issue 5 years ago • 4 comments

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.

SteffenSeckler avatar Oct 16 '20 11:10 SteffenSeckler

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.

mattnotmitt avatar Nov 02 '20 09:11 mattnotmitt

@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 👍

mattnotmitt avatar Jan 08 '21 13:01 mattnotmitt

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?

Letme avatar Jun 21 '21 12:06 Letme

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

natke avatar Dec 08 '21 18:12 natke