Skip to content

Conversation

@stefansjfw
Copy link
Contributor

@stefansjfw stefansjfw commented Jan 4, 2022

Summary of the Pull Request

What is this about:
Rename BugReportTool to PowerToys.BugReportTool
Rename WebcamReportTool to PowerToys.WebcamReportTool

What is included in the PR:

How does someone test / validate:

Quality Checklist

  • Linked issue: PowerToys and exe/dll naming #2125
  • Communication: I've discussed this with core contributors in the issue.
  • Tests: Added/updated and all pass
  • Installer: Added/updated and all pass
  • Localization: All end user facing strings can be localized
  • Docs: Added/ updated
  • Binaries: Any new files are added to WXS / YML

Contributor License Agreement (CLA)

A CLA must be signed. If not, go over here and sign the CLA.

@github-actions
Copy link

github-actions bot commented Jan 4, 2022

@check-spelling-bot Report

🔴 Please review

See the files view or the action log for details.

Unrecognized words (2)

Pdb
Toolset

Previously acknowledged words that are now absent appcontainer azurecr binskim buildcommand buildtools cdpxwin CPPARM CPPx defaultcommand dupenv DUSTIN errorlevel estdir etcore Firefox Gamebar Grayscale LASTEXITCODE LEQ linkid Minimizeallwindows mkdir moderncop namings neq nocache npm pdb policheck popd pushd robocopy SHAREIMAGELISTS spamming spdth Switchbetweenvirtualdesktops SYSTEMASTERISK toolset umd vse vsix WDK wdksetup wdkvsix We'd webclient webpack WINMSAPP
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 [email protected]:microsoft/PowerToys.git repository
on the stefan/unify_exe_naming_tools branch:

update_files() {
perl -e '
my @expect_files=qw('".github/actions/spelling/whitelist.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);
'
}

comment_json=$(mktemp)
curl -L -s -S \
-H "Content-Type: application/json" \
"https://api.github.com/repos/microsoft/PowerToys/issues/comments/1004834859" > "$comment_json"
comment_body=$(mktemp)
jq -r ".body // empty" "$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; $_=<>; 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

Copy link
Contributor

@franky920920 franky920920 left a comment

Choose a reason for hiding this comment

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

Not tested but code LGTM.
I'll build an test this tonight (UTC+8)

Copy link
Contributor

@franky920920 franky920920 left a comment

Choose a reason for hiding this comment

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

Tested and worked as expected.

@stefansjfw stefansjfw force-pushed the stefan/unify_exe_naming_tools branch from 587f0eb to 607c4a5 Compare January 12, 2022 10:20
Copy link
Contributor

@jaimecbernardo jaimecbernardo left a comment

Choose a reason for hiding this comment

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

LGTM!

@stefansjfw stefansjfw merged commit 127cf4e into main Jan 12, 2022
@stefansjfw stefansjfw deleted the stefan/unify_exe_naming_tools branch January 12, 2022 12:00
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.

4 participants