From ef2c7dcfa9543fed55e58761adf3c0830e5b2305 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 6 Aug 2024 02:19:05 -0400 Subject: sbolint: add -N/--notes-as-warnings option. --- sbolint | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sbolint b/sbolint index fddac40..1fc64bb 100755 --- a/sbolint +++ b/sbolint @@ -88,6 +88,11 @@ will still be emitted. Suppress notes. Only errors and warnings will be listed. +=item B<-N>, B<--notes-as-warnings> + +Notes will be counted as warnings. They will still be displayed as notes; this +changes the exit status and the total warning count. + =item B<-c>, B<--color> Always use colorful text, even if standard output is not a terminal. The default is to @@ -398,6 +403,7 @@ GetOptions( "version|v" => sub { print "$VERSION\n"; exit 0; }, "no-warnings|e" => sub { $nowarn = 1; $nonote = 1;}, "no-notes|n" => \$nonote, + "notes-as-warnings|N" => \$notes_as_warnings, "no-readme|r" => \$suppress_readme_len, "doc|help|h" => sub { exec("perldoc $0"); }, "man" => sub { exec("pod2man --stderr -s1 -csbo-maintainer-tools -r$VERSION $0"); }, @@ -552,6 +558,7 @@ sub log_warning { sub log_note { return if $nowarn || $nonote; logmsg($green . "NOTE" . $color_off, @_); + $warncount++ if $notes_as_warnings; } sub die_usage { -- cgit v1.2.3