mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
[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:
committed by
GitHub
parent
ffdb5d44d7
commit
ba525f068b
@@ -75,7 +75,7 @@ namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces.VSCodeHelper
|
||||
{
|
||||
var files = Directory.GetFiles(path);
|
||||
var iconPath = Path.GetDirectoryName(path);
|
||||
files = files.Where(x => (x.Contains("code") || x.Contains("VSCodium")) && !x.EndsWith(".cmd")).ToArray();
|
||||
files = files.Where(x => (x.Contains("code") || x.Contains("VSCodium")) && !x.EndsWith(".cmd", StringComparison.OrdinalIgnoreCase)).ToArray();
|
||||
|
||||
if (files.Length > 0)
|
||||
{
|
||||
@@ -87,22 +87,22 @@ namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces.VSCodeHelper
|
||||
ExecutablePath = file,
|
||||
};
|
||||
|
||||
if (file.EndsWith("code"))
|
||||
if (file.EndsWith("code", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
version = "Code";
|
||||
instance.VSCodeVersion = VSCodeVersion.Stable;
|
||||
}
|
||||
else if (file.EndsWith("code-insiders"))
|
||||
else if (file.EndsWith("code-insiders", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
version = "Code - Insiders";
|
||||
instance.VSCodeVersion = VSCodeVersion.Insiders;
|
||||
}
|
||||
else if (file.EndsWith("code-exploration"))
|
||||
else if (file.EndsWith("code-exploration", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
version = "Code - Exploration";
|
||||
instance.VSCodeVersion = VSCodeVersion.Exploration;
|
||||
}
|
||||
else if (file.EndsWith("VSCodium"))
|
||||
else if (file.EndsWith("VSCodium", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
version = "VSCodium";
|
||||
instance.VSCodeVersion = VSCodeVersion.Stable; // ?
|
||||
|
||||
Reference in New Issue
Block a user