Skip to content

Switch to PowerShell Gallery mirror #2221

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

Merged
merged 1 commit into from
Mar 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/installPSResources.ps1
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ param(
)

if ($PSRepository -eq "CFS" -and -not (Get-PSResourceRepository -Name CFS -ErrorAction SilentlyContinue)) {
Register-PSResourceRepository -Name CFS -Uri "https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/nuget/v3/index.json"
Register-PSResourceRepository -Name CFS -Uri "https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/PowerShellGalleryMirror/nuget/v3/index.json"
}

# NOTE: Due to a bug in Install-PSResource with upstream feeds, we have to

Unchanged files with check annotations Beta

Assert.False(symbol.IsDeclaration);
AssertIsRegion(symbol.NameRegion, 16, 29, 16, 39);
symbol = Assert.Single(symbols.Where(i => i.Type == SymbolType.Workflow));

Check warning on line 799 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (windows-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)

Check warning on line 799 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (macos-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)

Check warning on line 799 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (ubuntu-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)
Assert.Equal("fn AWorkflow", symbol.Id);
Assert.Equal("workflow AWorkflow ()", symbol.Name);
Assert.True(symbol.IsDeclaration);
symbol = Assert.Single(symbols.Where(i => i.Type == SymbolType.Class));

Check warning on line 804 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (windows-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)

Check warning on line 804 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (macos-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)

Check warning on line 804 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (ubuntu-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)
Assert.Equal("type AClass", symbol.Id);
Assert.Equal("class AClass { }", symbol.Name);
Assert.True(symbol.IsDeclaration);
symbol = Assert.Single(symbols.Where(i => i.Type == SymbolType.Property));

Check warning on line 809 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (windows-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)

Check warning on line 809 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (macos-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)

Check warning on line 809 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (ubuntu-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)
Assert.Equal("prop AProperty", symbol.Id);
Assert.Equal("[string] $AProperty", symbol.Name);
Assert.True(symbol.IsDeclaration);
symbol = Assert.Single(symbols.Where(i => i.Type == SymbolType.Constructor));

Check warning on line 814 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (macos-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)
Assert.Equal("mtd AClass", symbol.Id);
Assert.Equal("AClass([string]$AParameter)", symbol.Name);
Assert.True(symbol.IsDeclaration);
symbol = Assert.Single(symbols.Where(i => i.Type == SymbolType.Method));

Check warning on line 819 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (macos-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)
Assert.Equal("mtd AMethod", symbol.Id);
Assert.Equal("void AMethod([string]$param1, [int]$param2, $param3)", symbol.Name);
Assert.True(symbol.IsDeclaration);
symbol = Assert.Single(symbols.Where(i => i.Type == SymbolType.Enum));

Check warning on line 824 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (macos-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)
Assert.Equal("type AEnum", symbol.Id);
Assert.Equal("enum AEnum { }", symbol.Name);
Assert.True(symbol.IsDeclaration);
symbol = Assert.Single(symbols.Where(i => i.Type == SymbolType.EnumMember));

Check warning on line 829 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (macos-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)
Assert.Equal("prop AValue", symbol.Id);
Assert.Equal("AValue", symbol.Name);
Assert.True(symbol.IsDeclaration);
{
IEnumerable<SymbolReference> symbols = FindSymbolsInFile(FindSymbolsInNewLineSymbolFile.SourceDetails);
SymbolReference symbol = Assert.Single(symbols.Where(i => i.Type == SymbolType.Function));

Check warning on line 869 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (windows-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)

Check warning on line 869 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (macos-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)

Check warning on line 869 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (ubuntu-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)
Assert.Equal("fn returnTrue", symbol.Id);
AssertIsRegion(symbol.NameRegion, 2, 1, 2, 11);
AssertIsRegion(symbol.ScriptRegion, 1, 1, 4, 2);
symbol = Assert.Single(symbols.Where(i => i.Type == SymbolType.Class));

Check warning on line 874 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (windows-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)

Check warning on line 874 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (macos-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)

Check warning on line 874 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (ubuntu-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)
Assert.Equal("type NewLineClass", symbol.Id);
AssertIsRegion(symbol.NameRegion, 7, 1, 7, 13);
AssertIsRegion(symbol.ScriptRegion, 6, 1, 23, 2);
symbol = Assert.Single(symbols.Where(i => i.Type == SymbolType.Constructor));

Check warning on line 879 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (windows-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)

Check warning on line 879 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (macos-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)

Check warning on line 879 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (ubuntu-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)
Assert.Equal("mtd NewLineClass", symbol.Id);
AssertIsRegion(symbol.NameRegion, 8, 5, 8, 17);
AssertIsRegion(symbol.ScriptRegion, 8, 5, 10, 6);
symbol = Assert.Single(symbols.Where(i => i.Type == SymbolType.Property));

Check warning on line 884 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (windows-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)

Check warning on line 884 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (ubuntu-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)
Assert.Equal("prop SomePropWithDefault", symbol.Id);
AssertIsRegion(symbol.NameRegion, 15, 5, 15, 25);
AssertIsRegion(symbol.ScriptRegion, 12, 5, 15, 40);
symbol = Assert.Single(symbols.Where(i => i.Type == SymbolType.Method));

Check warning on line 889 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (windows-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)

Check warning on line 889 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (ubuntu-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)
Assert.Equal("mtd MyClassMethod", symbol.Id);
Assert.Equal("string MyClassMethod([MyNewLineEnum]$param1)", symbol.Name);
AssertIsRegion(symbol.NameRegion, 20, 5, 20, 18);
AssertIsRegion(symbol.ScriptRegion, 17, 5, 22, 6);
symbol = Assert.Single(symbols.Where(i => i.Type == SymbolType.Enum));

Check warning on line 895 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (windows-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)

Check warning on line 895 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (ubuntu-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)
Assert.Equal("type MyNewLineEnum", symbol.Id);
AssertIsRegion(symbol.NameRegion, 26, 1, 26, 14);
AssertIsRegion(symbol.ScriptRegion, 25, 1, 28, 2);
symbol = Assert.Single(symbols.Where(i => i.Type == SymbolType.EnumMember));

Check warning on line 900 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (windows-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)

Check warning on line 900 in test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs

GitHub Actions / dotnet (ubuntu-latest)

Do not use a Where clause to filter before calling Assert.Single. Use the overload of Assert.Single that accepts a filtering function. (https://xunit.net/xunit.analyzers/rules/xUnit2031)
Assert.Equal("prop First", symbol.Id);
AssertIsRegion(symbol.NameRegion, 27, 5, 27, 10);
AssertIsRegion(symbol.ScriptRegion, 27, 5, 27, 10);