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

OSOE-158: Evaluate using the Check Spelling action #27

Merged
merged 185 commits into from
Oct 24, 2022
Merged

Conversation

Luko6
Copy link
Contributor

@Luko6 Luko6 commented Jul 19, 2022

OSOE-158

Fixes #37.

@github-actions

This comment has been minimized.

@github-actions
Copy link

@check-spelling-bot Report

🔴 Please review

See the 📂 files view or the 📜action log for details.

Unrecognized words (2)

CLOUDSMITH
SDK

Previously acknowledged words that are now absent abcdefghijklmnopqrstuvwxyz Activatable airbnb Antiforgery apiclienttenant apps appsettings ASPNETCORE autocompletion autorun bacpac basethemesample beforeunload blog bootstraptab browsersync btn buble CDNs certs chainable chartjs chmod chown Chro chromedriver cjs Cloudflare cloudsmith Cms codeanalysis codemirror codestyle colorfield commonjs Configurator contentfiles contextmenu createstate cref crlf csharp ctx cwd darkmode datalabels datatable deactivatable deconstructed Demystifier Deployer destructuring devblogs dotnet EACCES ecma editorconfig emails Embedd enableextensions Enums esm EULA eur executesql facebook falsey favicon fff Firefox fixme flakyness Formattable frontend GDPR geckodriver Giraudel gitattributes github gitmodules globals Gulpfile hackish haspopup Hastlayer homepage Hsl hsva htmlvalidate https IAction IAdmin IAlter IAntiforgery IApplication IAsync IAudit IAuthorization IBab IBackground ICaching ICant icbin IChange IClass IClock ICollection IColumn ICompare IConfiguration IConfigure IConsent IContent IControl IConvertible ICreate ICss ICustom IData IDate IDb IDeferred IDeployment IDictionary IDisplay IDisposable IDistributed IDocument IDriver idx IDynamic IEmail IEndpoint IEquatable IExtension IFailure IFeature IFile IForm IFormat IGlobal IGraph IGrouping IHas IHost IHtml IHttp IIdentity iife IIndex iis ILast ILayout ILiquid ILocal ILog ILogger ILogin ILookup IManual IMarkdown IMedia IMemory IMock IModel IModule IMonkey IMy INavigation INotifier Intelli IntelliSense Interop Interoperability IObject IOperation IOptions IOrchard IPermission IPlacement IPost IPrivacy IProxy ipsum IQuery IQueryable IRead IRecipe IRegistration IRequest IResource IRole IRunning ISchema IScoped ISearch ISecurity ISerializable IService ISession ISet IShape ISite IString ITaxonomy itemprop ITenant ITest ITracking IUser IWeb jetbrains JObject json jsoneditor jsoneditoronline JToken labelledby length'l linebreak linkedin linq linting linux localhost lockfile Lombiq lookbehind Lucene markdownlint mcr mediatheme mentoring metadata Meziantou middlewares mixin mkdir msbuild mscorlib msedgedriver mso multiline multisubmit mvc MVVM myapp Namespaced navbar ndproj Newtonsoft NLog nologo NONINFRINGEMENT NPM npx NVARCHAR omnisharp onspecial onwarn orchardcore OSOCE parallelizable pickr plugin plusplus pnpm popstate Portainer postclean pragma prebuild preheader pwsh readdir Reappend refactoring registrationhttpevent registrationworkflow Reks Rekt RHEL rolename Rowling RSPEC ruleset Schoorstra screenshots sdk search'f Serializer setlocal sfc SFCs Shouldly Sipke sln sourced sourcemaps sql sqlcmd standalone stroustrup stylecop stylelint stylelintrc subfolders submenu sudoing superproject SUSE tanspiled taxonomyfield TClass testid TGenerator thetheme TImplementation TIndex TKey TMigration TModel todo Toolset TPage TProvider Trumbowyg tundora TUser TValue uncached Uncomment uninstall untick uri urijs USERPROFILE userspace utf versioning visualstudio visualstudioextension vuejs vuelidate walkthrough warnaserror webapp workaround workflow wpf XDG xpath xsessionrc xunit xxl yaml yml
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:Lombiq/GitHub-Actions.git repository
on the dev branch (ℹ️ how do I use this?):

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);
'
}

(
artifact_dir=$(mktemp -d)
gh_err=$(mktemp)
if gh run download -D "$artifact_dir" -R Lombiq/GitHub-Actions 3280220943 -n check-spelling-comment 2> "$gh_err"; then
patch_remove=$(unzip -p "$artifact_dir/artifact.zip" remove_words.txt 2>/dev/null)
patch_add=$(unzip -p "$artifact_dir/artifact.zip" tokens.txt 2>/dev/null)
should_exclude_patterns=$(unzip -p "$artifact_dir/artifact.zip" should_exclude.txt 2>/dev/null | perl -pe 's{^(.*)}{^\\Q$1\\E\$}')
update_files
elif grep -q "no valid artifacts found to download" "$gh_err"; then
if [ "$(gh api /repos/Lombiq/GitHub-Actions/actions/runs/3280220943/artifacts -q '.artifacts.[]|select(.name=="check-spelling-comment")|.expired')" = "true" ]; then
echo "Run artifact expired. You will need to trigger a new run."
else
echo "Run may not have completed. If so, please wait for it to finish and try again."
fi
elif grep -q "no artifact matches any of the names or patterns provided" "$gh_err"; then
echo "unexpected error, please file a bug to https://github.com/Lombiq/GitHub-Actions/issues/new"
cat "$gh_err"
else
echo "unknown error, please file a bug to https://github.com/Lombiq/GitHub-Actions/issues/new"
cat "$gh_err"
fi
)
git add -u

.github/actions/spelling/action.yml Outdated Show resolved Hide resolved
.github/actions/spelling/action.yml Outdated Show resolved Hide resolved
.github/actions/spelling/excludes.txt Outdated Show resolved Hide resolved
.github/workflows/spell-check-this-repo.yml Outdated Show resolved Hide resolved
.github/workflows/spelling.yml Outdated Show resolved Hide resolved
.github/workflows/spelling.yml Show resolved Hide resolved
Docs/Actions.md Outdated Show resolved Hide resolved
Docs/Workflows.md Outdated Show resolved Hide resolved
Docs/Workflows.md Outdated Show resolved Hide resolved
.github/actions/spelling/action.yml Outdated Show resolved Hide resolved
.github/workflows/spelling.yml Show resolved Hide resolved
.github/actions/spelling/expect.txt Show resolved Hide resolved
.github/actions/spelling/expect.txt Show resolved Hide resolved
.github/actions/spelling/allow.txt Show resolved Hide resolved
Copy link
Member

@Piedone Piedone left a comment

Choose a reason for hiding this comment

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

.github/workflows/spelling.yml Show resolved Hide resolved
@Piedone Piedone merged commit fd25b50 into dev Oct 24, 2022
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.

Evaluate using the Check Spelling action (OSOE-158)
2 participants