aboutsummaryrefslogtreecommitdiff
path: root/sbolint
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-08-06 02:19:05 -0400
committerB. Watson <urchlay@slackware.uk>2024-08-06 02:19:05 -0400
commitef2c7dcfa9543fed55e58761adf3c0830e5b2305 (patch)
tree81bdf3fe640dd2b1a35e09e42352617548ae99f1 /sbolint
parentc32a76083e8e52bb60b8c495048dce001ac9471a (diff)
downloadsbo-maintainer-tools-ef2c7dcfa9543fed55e58761adf3c0830e5b2305.tar.gz
sbolint: add -N/--notes-as-warnings option.
Diffstat (limited to 'sbolint')
-rwxr-xr-xsbolint7
1 files changed, 7 insertions, 0 deletions
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 {