Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into dev/migrie/f/dec-self…
Browse files Browse the repository at this point in the history
…host
  • Loading branch information
zadjii committed Dec 16, 2024
2 parents 14f18e4 + a92b1e6 commit 9c5a725
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/modules/cmdpal/Microsoft.CmdPal.UI/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ private static ServiceProvider ConfigureServices()
services.AddSingleton<ICommandProvider, AllAppsCommandProvider>();
services.AddSingleton<ICommandProvider, ShellCommandsProvider>();
services.AddSingleton<ICommandProvider, CalculatorCommandProvider>();
services.AddSingleton<ICommandProvider, BookmarksCommandProvider>();
services.AddSingleton<ICommandProvider, IndexerActionsProvider>();
services.AddSingleton<ICommandProvider, BookmarksCommandProvider>();
services.AddSingleton<ICommandProvider, SettingsCommandProvider>();
services.AddSingleton<ICommandProvider, QuitCommandProvider>();
services.AddSingleton<ICommandProvider, ReloadExtensionsCommandProvider>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ public static IEnumerable<IListItem> FilterList(IEnumerable<IListItem> items, st
public static void InPlaceUpdateList<T>(Collection<T> original, IEnumerable<T> newContents)
where T : class
{
// we're not changing newContents - stash this so we don't re-evaluate it every time
var numberOfNew = newContents.Count();

// Short circuit - new contents should just be empty
if (!newContents.Any())
if (numberOfNew == 0)
{
original.Clear();
return;
Expand Down Expand Up @@ -106,14 +109,14 @@ public static void InPlaceUpdateList<T>(Collection<T> original, IEnumerable<T> n
}

// Remove any extra trailing items from the destination
while (original.Count > newContents.Count())
while (original.Count > numberOfNew)
{
// RemoveAtEnd
original.RemoveAt(original.Count - 1);
}

// Add any extra trailing items from the source
if (original.Count < newContents.Count())
if (original.Count < numberOfNew)
{
var remaining = newContents.Skip(original.Count);
foreach (var item in remaining)
Expand Down

1 comment on commit 9c5a725

@github-actions
Copy link

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 or 📝 job summary for details.

Unrecognized words (234)
ACVS
adaptivecards
affordances
agressive
agressively
Aliias
Allman
apicontract
APPICONREFERENCE
APPMODEL
APPPUBLISHER
asynchonously
AVery
BNDBk
bodgy
Bools
builttoroam
BYEXENAME
Cantarell
cdn
channelurl
charater
CLSIDs
cmdpal
colid
commandpalette
contextitems
contractversion
cpcontrols
CREATETHREAD
CREATEWINDOW
cswin
Ctl
CVS
datas
DBCOLUMNACCESS
DBCOUNTITEM
DBGUIDDEFAULT
DBID
DBIDUNION
DBORDINAL
DBPROP
DBPROPIDSET
DBPROPSET
DBROWCOUNT
DBROWOFFSET
DBROWOPTIONS
DDEAPPLICATION
DDECOMMAND
DDEIFEXEC
DDETOPIC
debouncer
defaultlib
DEFAULTTOFOLDER
DEFAULTTOSTAR
DELEGATEEXECUTE
devpal
dic
dragable
Droid
DROPTARGET
emoji
Errrors
ESPN
extensionsdk
favourites
filemgmt
filterbox
Fira
flaticon
fmtid
footgunning
fpvm
Fqc
FRIENDLYAPPNAME
FRIENDLYDOCNAME
getcommand
gifv
gitroot
googleapis
Griese
gsl
Hande
harcoded
HCHAPTER
HKC
homies
HProcess
HROW
HSSH
icf
icommanditems
icommandprovider
icondatatype
idk
ieq
iextn
IGNOREBASECLASS
IGo
IIDI
imgflip
imgur
implementaions
implmenting
inbox
infotip
initalize
INLINEPREFIX
inotifypropchanged
intederminate
INVALIDCALL
INVALIDINDEX
IRow
IRowset
isection
Itemo
keyboardtester
Keychain
kinda
libraryincludes
libucrt
libucrtd
listpage
localappdata
LTk
LUQ
lvm
mapi
MBM
mdpvm
meme
memicmp
microwaved
minwindef
mobileredirect
MSDAOSP
MSDASC
MSIDXS
MSIDXSPROP
mtu
murmurhash
MVVMTK
NGQt
nicksnettravels
Nmae
NOFIXUPS
nonspace
NOOPEN
NOREMAPCLSID
NOTRUNCATE
NOUSERSETTINGS
NShow
NTZm
nullness
openas
optionalcolor
OWMt
OWRj
paintin
Playbadge
Poc
Podcasts
Pokedex
ppwsz
prblem
prgh
Propid
propset
propvar
Puser
pvar
QUICKTIP
QXZ
raisee
Rasterization
realease
reavealed
reblogs
refelct
refering
REGISTERCLASSEX
REMAPRUNDLL
renamve
rgh
rguid
ROWSETEXT
rsdk
searchtext
seearch
SEEMASKINVOKEIDLIST
seperators
SFBS
sharepoint
SHELLEXTENSION
SHELLNEWVALUE
shich
shurg
somee
sooon
sourced
sourcedoc
Spongebob
spongebot
stdcpp
SWSHOW
SWSHOWNORMAL
throughs
TIcon
TILEINFO
tlc
tltay
tthe
ucrt
ucrtd
unistalls
videourl
vkey
VMs
vulnerbilities
wasdk
WCT
WHEREID
Wholegrain
wic
WUX
xclip
xdoc
XJSNh
ycombinator
youtube
YTM
zadjii
ZXk
ZXNs
Previously acknowledged words that are now absent BODGY Emoji Infotip IPC Managed Message pef Pipe SYSTEMWOW VKey Way Wbemidl WIC 🫥
Some files were automatically ignored 🙈

These sample patterns would exclude them:

^\Qsrc/modules/cmdpal/doc/initial-sdk-spec/list-elements-mock-002.pdn\E$
^\Qsrc/modules/cmdpal/Exts/PokedexExtension/Pages/PokedexExtensionPage.cs\E$

You should consider adding them to:

.github/actions/spell-check/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 and update file exclusions, you could run the following commands

... in a clone of the [email protected]:zadjii-msft/PowerToys.git repository
on the dev/migrie/f/dec-selfhost branch (ℹ️ how do I use this?):

curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/v0.0.22/apply.pl' |
perl - 'https://github.com/zadjii-msft/PowerToys/actions/runs/12378243419/attempts/1'
Available 📚 dictionaries could cover words (expected and unrecognized) not in the 📘 dictionary

This includes both expected items (1921) from .github/actions/spell-check/expect.txt and unrecognized words (234)

Dictionary Entries Covers Uniquely
cspell:npm/dict/npm.txt 302 1 1
cspell:r/src/r.txt 543 1 1
cspell:cpp/src/people.txt 23 1
cspell:cpp/src/ecosystem.txt 51 1

Consider adding them (in .github/workflows/spelling2.yml) for uses: check-spelling/[email protected] in its with:

      with:
        extra_dictionaries:
          cspell:npm/dict/npm.txt
          cspell:r/src/r.txt
          cspell:cpp/src/people.txt
          cspell:cpp/src/ecosystem.txt

To stop checking additional dictionaries, add (in .github/workflows/spelling2.yml) for uses: check-spelling/[email protected] in its with:

check_extra_dictionaries: ''
Pattern suggestions ✂️ (2)

You could add these patterns to .github/actions/spell-check/patterns.txt:

# Automatically suggested patterns
# hit-count: 1 file-count: 1
# Amazon
\bamazon\.com/[-\w]+/(?:dp/[0-9A-Z]+|)

# hit-count: 1 file-count: 1
# imgur
\bimgur\.com/[^.]+

Errors (5)

See the 📜action log or 📝 job summary for details.

❌ Errors Count
ℹ️ binary-file 1
ℹ️ candidate-pattern 2
❌ check-file-path 727
❌ forbidden-pattern 4
ℹ️ noisy-file 1

See ❌ Event descriptions for more information.

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.