Skip to content

Commit

Permalink
more ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
owestphal committed Oct 17, 2023
1 parent 3dc0c01 commit e419155
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ maxterms
minterms
MReport
oneof
parseable
println
scanl
snd
Expand Down
8 changes: 5 additions & 3 deletions src/UniversalParser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,15 @@ data AllowNegation = Nowhere | LiteralsOnly | Everywhere
-- parser for operations
orParser :: Parser ()
orParser =
keyword "or" <|> keyword "oder"
keyword "or"
<|> keyword "oder" {- german -}
<|> tokenSymbol "" <|> tokenSymbol "\\/"
<?> "Disjunction"

andParser :: Parser ()
andParser =
keyword "and" <|> keyword "und"
keyword "and"
<|> keyword "und" {- german -}
<|> tokenSymbol "" <|> tokenSymbol "/\\"
<?> "Conjunction"

Expand All @@ -150,7 +152,7 @@ biImplicationParser :: Parser ()
biImplicationParser =
tokenSymbol "<=>"
<|> keyword "iff" <|> keyword "gdw"

Check failure on line 154 in src/UniversalParser.hs

View workflow job for this annotation

GitHub Actions / Check Spelling

`gdw` is not a recognized word. (unrecognized-spelling)
<?> "Biimplication"
<?> "BiImplication"

negationParser :: Parser ()
negationParser =
Expand Down

1 comment on commit e419155

@github-actions
Copy link

@github-actions github-actions bot commented on e419155 Oct 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@check-spelling-bot Report

🔴 Please review

See the 📜action log for details.

Unrecognized words (3)

gdw
oder
und

To accept ✔️ these unrecognized words as correct, run the following commands

... in a clone of the [email protected]:fmidue/logic-tasks.git repository
on the master branch (ℹ️ how do I use this?):

update_files() {
perl -e '
my $new_expect_file=".github/actions/spelling/expect.txt";
use File::Path qw(make_path);
use File::Basename qw(dirname);
make_path (dirname($new_expect_file));
open FILE, q{<}, $new_expect_file; chomp(my @words = <FILE>); close FILE;
my @add=qw('"$patch_add"');
my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
@words = sort {lc($a)."-".$a cmp lc($b)."-".$b} keys %items;
open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE "$word\n" if $word =~ /\w/; };
close FILE;
system("git", "add", $new_expect_file);
'
}

comment_json=$(mktemp)
curl -L -s -S \
-H "Content-Type: application/json" \
"https://api.github.com/repos/fmidue/logic-tasks/comments/130205222" > "$comment_json"
comment_body=$(mktemp)
jq -r ".body // empty" "$comment_json" | tr -d "\\r" > $comment_body
rm $comment_json

patch_add=$(perl -e '$/=undef; $_=<>; if (m{Unrecognized words[^<]*</summary>\n*```\n*([^<]*)```\n*</details>$}m) { print "$1" } elsif (m{Unrecognized words[^<]*\n\n((?:\w.*\n)+)\n}m) { print "$1" };' < "$comment_body")

update_files
rm $comment_body
git add -u
If the flagged items are false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

Please sign in to comment.