badwords: fix issues found in scripts and other files

Single pass, not enforced.

Also:
- pyspelling.words: drop `web page`

Closes #19572
This commit is contained in:
Viktor Szakats 2025-11-17 16:06:00 +01:00
parent 42c43f695c
commit ad35ecba97
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
45 changed files with 104 additions and 105 deletions

View file

@ -181,7 +181,7 @@ sub readskiplist {
# Reads the .checksrc in $dir for any extended warnings to enable locally.
# Currently there is no support for disabling warnings from the standard set,
# and since that's already handled via !checksrc! commands there is probably
# and since that is already handled via !checksrc! commands there is probably
# little use to add it.
sub readlocalfile {
my ($file) = @_;
@ -246,7 +246,7 @@ sub checkwarn {
my $nowarn=0;
#if(!$warnings{$name}) {
# print STDERR "Dev! there's no description for $name!\n";
# print STDERR "Dev! there is no description for $name!\n";
#}
# checksrc.skip
@ -351,7 +351,7 @@ if(!$file) {
print " -A[rule] Accept this violation, can be used multiple times\n";
print " -a[func] Allow use of this function\n";
print " -b[func] Ban use of this function\n";
print " -D[DIR] Directory to prepend file names\n";
print " -D[DIR] Directory to prepend filenames\n";
print " -h Show help output\n";
print " -W[file] Skip the given file - ignore all its flaws\n";
print " -i<n> Indent spaces. Default: 2\n";
@ -971,7 +971,7 @@ sub scanfile {
}
# check for open brace first on line but not first column only alert
# if previous line ended with a close paren and it wasn't a cpp line
# if previous line ended with a close paren and it was not a cpp line
if(($prevl =~ /\)\z/) && ($l =~ /^( +)\{/) && !$prevp) {
checkwarn("BRACEPOS",
$line, length($1), $file, $ol, "badly placed open brace");
@ -995,7 +995,7 @@ sub scanfile {
}
# if the previous line starts with if/while/for AND ends with a closed
# parenthesis and there's an equal number of open and closed
# parenthesis and there is an equal number of open and closed
# parentheses, check that this line is indented $indent more steps, if
# not a cpp line
elsif(!$prevp && ($prevl =~ /^( *)(if|while|for)(\(.*\))\z/)) {