[PTRun][VSCodeWorkspaces] Enable analyzer and fix warning (#16897)

* [Community.PowerToys.Run.Plugin.VSCodeWorkspaces] Enable analyzer and fix warnings

* fix CA1824: Mark assemblies with NeutralResourcesLanguageAttribute
This commit is contained in:
CleanCodeDeveloper
2022-03-10 11:37:14 +01:00
committed by GitHub
parent ffdb5d44d7
commit ba525f068b
4 changed files with 12 additions and 8 deletions

View File

@@ -149,8 +149,8 @@ namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces
}
// intersect the title with the query
var intersection = Convert.ToInt32(x.Title.ToLowerInvariant().Intersect(query.Search.ToLowerInvariant()).Count() * query.Search.Count());
var differenceWithQuery = Convert.ToInt32((x.Title.Count() - intersection) * query.Search.Count() * 0.7);
var intersection = Convert.ToInt32(x.Title.ToLowerInvariant().Intersect(query.Search.ToLowerInvariant()).Count() * query.Search.Length);
var differenceWithQuery = Convert.ToInt32((x.Title.Length - intersection) * query.Search.Length * 0.7);
x.Score = x.Score - differenceWithQuery + intersection;
// if is a remote machine give it 12 extra points