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

lestarch: command raw text input and fixed client validation #9

Merged
merged 1 commit into from
Jul 26, 2021

Conversation

LeStarch
Copy link
Collaborator

Originating Project/Creator OWLS
Affected Component Validation
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

Adds in much better validation, error handling, and error reporting. Provides a raw command input that syncs with the selected command input for copy/past in and out of commands.

@github-actions
Copy link

github-actions bot commented Jul 23, 2021

@check-spelling-bot Report

🔴 Please review

Unrecognized words (3)
cargs
novalidate
textbox
Available dictionaries could cover words not in the dictionary

cspell:cpp/cpp.txt (24763) covers 206 of them
cspell:php/php.txt (1736) covers 75 of them
cspell:node/node.txt (821) covers 66 of them
cspell:html/html.txt (242) covers 43 of them
cspell:filetypes/filetypes.txt (240) covers 43 of them
cspell:css/css.txt (186) covers 38 of them
cspell:django/django.txt (386) covers 35 of them
cspell:python/python.txt (139) covers 32 of them
cspell:golang/go.txt (1847) covers 30 of them
cspell:java/java.txt (2478) covers 28 of them
cspell:npm/npm.txt (258) covers 25 of them
cspell:aws/aws.txt (218) covers 18 of them
cspell:en_GB/src/wordsEnGb.txt (6329) covers 16 of them
cspell:fullstack/fullstack.txt (153) covers 13 of them
cspell:dotnet/dotnet.txt (446) covers 11 of them
cspell:scala/scala.txt (178) covers 9 of them
cspell:csharp/csharp.txt (19) covers 8 of them
cspell:lua/lua.txt (190) covers 7 of them
cspell:fonts/fonts.txt (357) covers 7 of them
cspell:rust/rust.txt (26) covers 6 of them
cspell:ruby/ruby.txt (115) covers 6 of them
cspell:latex/latex.txt (420) covers 3 of them
cspell:elixir/elixir.txt (37) covers 3 of them
cspell:bash/bash-words.txt (8) covers 1 of them

Consider adding them using:

      with:
        extra_dictionaries:
          cspell:cpp/cpp.txt
          cspell:php/php.txt
          cspell:node/node.txt
          cspell:html/html.txt
          cspell:filetypes/filetypes.txt
          cspell:css/css.txt
          cspell:django/django.txt
          cspell:python/python.txt
          cspell:golang/go.txt
          cspell:java/java.txt
          cspell:npm/npm.txt
          cspell:aws/aws.txt
          cspell:en_GB/src/wordsEnGb.txt
          cspell:fullstack/fullstack.txt
          cspell:dotnet/dotnet.txt
          cspell:scala/scala.txt
          cspell:csharp/csharp.txt
          cspell:lua/lua.txt
          cspell:fonts/fonts.txt
          cspell:rust/rust.txt
          cspell:ruby/ruby.txt
          cspell:latex/latex.txt
          cspell:elixir/elixir.txt
          cspell:bash/bash-words.txt

To stop checking additional dictionaries, add:

      with:
        check_extra_dictionaries: ''
To accept these unrecognized words as correct, run the following commands

... in a clone of the [email protected]:LeStarch/fprime-gds.git repository
on the update/raw branch:

(cd $(git rev-parse --show-toplevel)
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('"cargs novalidate textbox "');
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);
'
)

Alternatively, the bot can do this for you if you reply quoting the following line:
@check-spelling-bot apply changes.

@lgtm-com
Copy link

lgtm-com bot commented Jul 23, 2021

This pull request introduces 1 alert when merging 862d098 into 0392617 - view on LGTM.com

new alerts:

  • 1 for Unused import

@metzdigital
Copy link

It would be nice if it "auto-capitalize" text submitted:
image

@github-actions
Copy link

github-actions bot commented Jul 23, 2021

@check-spelling-bot Report

🔴 Please review

Unrecognized words (5)
abdd
fileurl
Jdk
kerr
Vcs
Available dictionaries could cover words not in the dictionary

cspell:cpp/cpp.txt (24763) covers 206 of them
cspell:php/php.txt (1736) covers 75 of them
cspell:node/node.txt (821) covers 66 of them
cspell:html/html.txt (242) covers 43 of them
cspell:filetypes/filetypes.txt (240) covers 43 of them
cspell:css/css.txt (186) covers 38 of them
cspell:django/django.txt (386) covers 35 of them
cspell:python/python.txt (139) covers 32 of them
cspell:golang/go.txt (1847) covers 30 of them
cspell:java/java.txt (2478) covers 29 of them
cspell:npm/npm.txt (258) covers 25 of them
cspell:aws/aws.txt (218) covers 18 of them
cspell:en_GB/src/wordsEnGb.txt (6329) covers 16 of them
cspell:fullstack/fullstack.txt (153) covers 13 of them
cspell:dotnet/dotnet.txt (446) covers 11 of them
cspell:scala/scala.txt (178) covers 9 of them
cspell:csharp/csharp.txt (19) covers 8 of them
cspell:lua/lua.txt (190) covers 7 of them
cspell:fonts/fonts.txt (357) covers 7 of them
cspell:rust/rust.txt (26) covers 6 of them
cspell:ruby/ruby.txt (115) covers 6 of them
cspell:latex/latex.txt (420) covers 3 of them
cspell:elixir/elixir.txt (37) covers 3 of them
cspell:bash/bash-words.txt (8) covers 1 of them

Consider adding them using:

      with:
        extra_dictionaries:
          cspell:cpp/cpp.txt
          cspell:php/php.txt
          cspell:node/node.txt
          cspell:html/html.txt
          cspell:filetypes/filetypes.txt
          cspell:css/css.txt
          cspell:django/django.txt
          cspell:python/python.txt
          cspell:golang/go.txt
          cspell:java/java.txt
          cspell:npm/npm.txt
          cspell:aws/aws.txt
          cspell:en_GB/src/wordsEnGb.txt
          cspell:fullstack/fullstack.txt
          cspell:dotnet/dotnet.txt
          cspell:scala/scala.txt
          cspell:csharp/csharp.txt
          cspell:lua/lua.txt
          cspell:fonts/fonts.txt
          cspell:rust/rust.txt
          cspell:ruby/ruby.txt
          cspell:latex/latex.txt
          cspell:elixir/elixir.txt
          cspell:bash/bash-words.txt

To stop checking additional dictionaries, add:

      with:
        check_extra_dictionaries: ''
To accept these unrecognized words as correct, run the following commands

... in a clone of the [email protected]:LeStarch/fprime-gds.git repository
on the update/raw branch:

(cd $(git rev-parse --show-toplevel)
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('"abdd fileurl Jdk kerr Vcs "');
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);
'
)

Alternatively, the bot can do this for you if you reply quoting the following line:
@check-spelling-bot apply changes.

@lgtm-com
Copy link

lgtm-com bot commented Jul 23, 2021

This pull request introduces 1 alert when merging f292d45 into 0392617 - view on LGTM.com

new alerts:

  • 1 for Unused import

@LeStarch LeStarch force-pushed the update/raw branch 3 times, most recently from 7b8fcd9 to b102173 Compare July 23, 2021 21:40
@metzdigital
Copy link

A bug found, it appears 0 is not seen as a valid integer argument:
image

@metzdigital
Copy link

I'm not sure how much this matters, but I noticed there is no "auto-casing" for the command, just the arguments:
image

@metzdigital
Copy link

An interesting behavior I noticed. For the ADC_ADS1119_TESTING command arg1 thru arg3 are labeled as U32:

<command kind="guarded" opcode="0" mnemonic="ADC_ADS1119_TESTING">
	<comment>
		Command to run tests against ADS1119 driver
	</comment>
	<args>
		<arg type="Backplane::BpHwTestNames" name="test"> </arg>
		<arg type="U32" name="arg1"> </arg>
		<arg type="U32" name="arg2"> </arg>
		<arg type="U32" name="arg3"> </arg>
		<arg type="F32" name="arg4"> </arg>
	</args>
</command>

But values larger than 4294967295 still get the "green check":
image
Until I attempt to send the command:
image

@metzdigital
Copy link

This isn't the most descriptive error, the real issue is too long of a string:
image

@metzdigital
Copy link

The above items is all I could find when doing extensive hammering on it. Really well done @LeStarch!

@LeStarch
Copy link
Collaborator Author

@metzdigital the zero not an int error is a true error, and I will fix it. I look into the out-of-range error with the other....I can probably set limits, maybe, probably.

@LeStarch LeStarch force-pushed the update/raw branch 4 times, most recently from a7ff499 to cb8aede Compare July 26, 2021 16:44
@github-actions
Copy link

@check-spelling-bot Report

🔴 Please review

Unrecognized words (1)
messgae
Available dictionaries could cover words not in the dictionary

cspell:cpp/cpp.txt (24763) covers 206 of them
cspell:php/php.txt (1736) covers 75 of them
cspell:node/node.txt (821) covers 66 of them
cspell:html/html.txt (242) covers 43 of them
cspell:filetypes/filetypes.txt (240) covers 43 of them
cspell:css/css.txt (186) covers 38 of them
cspell:django/django.txt (386) covers 35 of them
cspell:python/python.txt (139) covers 32 of them
cspell:golang/go.txt (1847) covers 30 of them
cspell:java/java.txt (2478) covers 29 of them
cspell:npm/npm.txt (258) covers 25 of them
cspell:aws/aws.txt (218) covers 18 of them
cspell:en_GB/src/wordsEnGb.txt (6329) covers 16 of them
cspell:fullstack/fullstack.txt (153) covers 13 of them
cspell:dotnet/dotnet.txt (446) covers 11 of them
cspell:scala/scala.txt (178) covers 9 of them
cspell:csharp/csharp.txt (19) covers 8 of them
cspell:lua/lua.txt (190) covers 7 of them
cspell:fonts/fonts.txt (357) covers 7 of them
cspell:rust/rust.txt (26) covers 6 of them
cspell:ruby/ruby.txt (115) covers 6 of them
cspell:latex/latex.txt (420) covers 3 of them
cspell:elixir/elixir.txt (37) covers 3 of them
cspell:bash/bash-words.txt (8) covers 1 of them

Consider adding them using:

      with:
        extra_dictionaries:
          cspell:cpp/cpp.txt
          cspell:php/php.txt
          cspell:node/node.txt
          cspell:html/html.txt
          cspell:filetypes/filetypes.txt
          cspell:css/css.txt
          cspell:django/django.txt
          cspell:python/python.txt
          cspell:golang/go.txt
          cspell:java/java.txt
          cspell:npm/npm.txt
          cspell:aws/aws.txt
          cspell:en_GB/src/wordsEnGb.txt
          cspell:fullstack/fullstack.txt
          cspell:dotnet/dotnet.txt
          cspell:scala/scala.txt
          cspell:csharp/csharp.txt
          cspell:lua/lua.txt
          cspell:fonts/fonts.txt
          cspell:rust/rust.txt
          cspell:ruby/ruby.txt
          cspell:latex/latex.txt
          cspell:elixir/elixir.txt
          cspell:bash/bash-words.txt

To stop checking additional dictionaries, add:

      with:
        check_extra_dictionaries: ''
To accept these unrecognized words as correct, run the following commands

... in a clone of the [email protected]:LeStarch/fprime-gds.git repository
on the update/raw branch:

(cd $(git rev-parse --show-toplevel)
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('"messgae "');
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);
'
)

@metzdigital
Copy link

Verified above items have been fixed

Copy link

@metzdigital metzdigital left a comment

Choose a reason for hiding this comment

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

Approved.

@LeStarch LeStarch merged commit 0a374a4 into nasa:devel Jul 26, 2021
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