Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes #8

Merged
merged 1 commit into from
Mar 4, 2023
Merged

Changes #8

merged 1 commit into from
Mar 4, 2023

Conversation

gjwatney
Copy link

@gjwatney gjwatney commented Mar 3, 2023

Originating Project/Creator
Affected Component
Affected Architectures(s)
Related Issue(s)
Has Unit Tests (y/n)
Builds Without Errors (y/n)
Unit Tests Pass (y/n)
Documentation Included (y/n)

Change Description

A description of the changes contained in the PR.

Rationale

A rationale for this change. e.g. fixes bug, or most projects need XYZ feature.

Testing/Review Recommendations

Fill in testing procedures, specific items to focus on for review, or other info to help the team verify these changes are flight-quality.

Future Work

Note any additional work that will be done relating to this issue.

@gjwatney gjwatney changed the base branch from devel-old to microfsexp March 3, 2023 17:26
@github-actions
Copy link

github-actions bot commented Mar 3, 2023

@check-spelling-bot Report

Unrecognized words, please review:

  • apps
  • argparse
  • args
  • arity
  • aspx
  • autocomplete
  • autogenerated
  • aws
  • bw
  • bytearray
  • cfg
  • checkbox
  • chmod
  • ci
  • cpp
  • cppdbg
  • cpy
  • csv
  • cxx
  • datetime
  • delattr
  • deserialize
  • DHTML
  • dockerfile
  • dropdown
  • elif
  • endfor
  • endif
  • endswith
  • etree
  • ev
  • exe
  • fd
  • fh
  • fwlink
  • gainsboro
  • getattr
  • getcwd
  • getpass
  • gety
  • gh
  • gz
  • hasattr
  • hh
  • hpp
  • href
  • htm
  • html
  • http
  • hu
  • hz
  • img
  • ini
  • inl
  • ino
  • Intelli
  • ip
  • isabs
  • isdir
  • isinstance
  • issubclass
  • iu
  • jpg
  • json
  • len
  • lifecycle
  • lightgreen
  • lightyellow
  • linkid
  • listdir
  • ljust
  • localtime
  • lstrip
  • lte
  • makedirs
  • metadata
  • middleware
  • mkdir
  • mq
  • MTIME
  • multiline
  • MVC
  • Mypy
  • namespace
  • nbsp
  • Nh
  • orangered
  • overridable
  • pdf
  • perl
  • php
  • phtml
  • posix
  • pragma
  • proj
  • py
  • quickstart
  • rb
  • readline
  • regex
  • rmdir
  • rmtree
  • rng
  • rp
  • rstrip
  • rtf
  • rx
  • setattr
  • shutil
  • SIGABRT
  • splitext
  • splitlines
  • startswith
  • strftime
  • structs
  • stylesheet
  • Substr
  • svg
  • sys
  • td
  • timezone
  • tl
  • tt
  • tz
  • ud
  • url
  • urllib
  • urlopen
  • utc
  • utils
  • uuid
  • vm
  • vue
  • vx
  • wp
  • wx
  • xhtml
  • xls
  • xlsx
  • xml
  • xsl
  • xslt
  • yml
  • zd
  • zsh
  • zu
Previously acknowledged words that are now absent ablack asyc asynch autodocs autogenerator Bassic bcm blogs BLSPSERIALDRIVERCOMPONENTIMPLCFG COMXBEE configs DASSERT DBUILD DCMAKE DENABLE deserializes DFPRIME DISF DPRIVATE DPROTECTED DSTATIC DSTUBBED DTGT fcheck fds featuredarticles filefor filesystems fno fprofile fsanitize fsanitizers fstrength ftest GENREP getbuffer getsize github Heade hyperlinks ipv kevin ldl LINUXUARTDRIVER lpthread lrt mailto meminfo Microfs microfsexp mindepth multline Mutexed NDELAY oran plugins PNGs puml PYS pytests Rce regexs rpaetz runcycles sbt scanf SDFLIGHT segfault setbuffer SIGSEGV sprintf srcs ssh stackoverflow statfs subfolders tgz toolchains tts ubuntu unittests vfs Wconversion Werror Wextra Wformat wget Whitelisted wikipedia Wnon Woverloaded Wshadow Wsign Wundef XBee xmls xoff xon
Some files were were automatically ignored

These sample patterns would exclude them:

^FppTest/port/clean$

You should consider adding them to:

.github/actions/spelling/excludes.txt

File matching is via Perl regular expressions.

To check these files, more of their words need to be in the dictionary than not. You can use patterns.txt to exclude portions, add items to the dictionary (e.g. by adding them to allow.txt), or fix typos.

To accept these unrecognized words as correct (and remove the previously acknowledged and now absent words), run the following commands

... in a clone of the git@github.com:gjwatney/fprime-timcanham-microfsexp.git repository
on the Changes branch:

update_files() {
perl -e '
my @expect_files=qw('".github/actions/spelling/expect.txt"');
@ARGV=@expect_files;
my @stale=qw('"$patch_remove"');
my $re=join "|", @stale;
my $suffix=".".time();
my $previous="";
sub maybe_unlink { unlink($_[0]) if $_[0]; }
while (<>) {
if ($ARGV ne $old_argv) { maybe_unlink($previous); $previous="$ARGV$suffix"; rename($ARGV, $previous); open(ARGV_OUT, ">$ARGV"); select(ARGV_OUT); $old_argv = $ARGV; }
next if /^(?:$re)(?:(?:\r|\n)*$| .*)/; print;
}; maybe_unlink($previous);'
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);
'
(cat '.github/actions/spelling/excludes.txt' - <<EOF
$should_exclude_patterns
EOF
) |grep .|
sort -f |
uniq > '.github/actions/spelling/excludes.txt.temp' &&
mv '.github/actions/spelling/excludes.txt.temp' '.github/actions/spelling/excludes.txt'
}

comment_json=$(mktemp)
curl -L -s -S \
  --header "Content-Type: application/json" \
  "https://api.github.com/repos/timcanham/fprime/issues/comments/1453863337" > "$comment_json"
comment_body=$(mktemp)
jq -r .body < "$comment_json" > $comment_body
rm $comment_json

patch_remove=$(perl -ne 'next unless s{^</summary>(.*)</details>$}{$1}; print' < "$comment_body")
  

patch_add=$(perl -e '$/=undef;
$_=<>;
s{<details>.*}{}s;
s{^#.*}{};
s{\n##.*}{};
s{(?:^|\n)\s*\*}{}g;
s{\s+}{ }g;
print' < "$comment_body")
  

should_exclude_patterns=$(perl -e '$/=undef;
$_=<>;
exit unless s{(?:You should consider excluding directory paths|You should consider adding them to).*}{}s;
s{.*These sample patterns would exclude them:}{}s;
s{.*\`\`\`([^`]*)\`\`\`.*}{$1}m;
print' < "$comment_body" | grep . || true)

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.

@timcanham timcanham merged commit fcb0a1b into timcanham:microfsexp Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants