Skip to content

Conversation

@mariam-abdulla
Copy link
Member

@mariam-abdulla mariam-abdulla commented Jan 10, 2025

This pull request includes several changes to improve and refactor the dotnet-test command in the .NET CLI. The changes focus on enhancing file path validation, updating localizable strings, and refactoring the MSBuild handler.

Refactoring and Enhancements:

Code Simplification:

Localization Updates:

New Records:

Removed Obsolete Code:

mariam-abdulla and others added 30 commits January 3, 2025 13:34
Co-authored-by: Amaury Levé <amauryleve@microsoft.com>
…erties' of https://github.com/dotnet/sdk into dev/mabdullah/use-msbuild-apis-to-retrieve-project-properties
Co-authored-by: Amaury Levé <amauryleve@microsoft.com>
Co-authored-by: Amaury Levé <amauryleve@microsoft.com>
Co-authored-by: Amaury Levé <amauryleve@microsoft.com>
Co-authored-by: Amaury Levé <amauryleve@microsoft.com>
Co-authored-by: Amaury Levé <amauryleve@microsoft.com>
Co-authored-by: Amaury Levé <amauryleve@microsoft.com>
Co-authored-by: Amaury Levé <amauryleve@microsoft.com>
…erties' of https://github.com/dotnet/sdk into dev/mabdullah/use-msbuild-apis-to-retrieve-project-properties
@mariam-abdulla mariam-abdulla requested a review from a team as a code owner January 10, 2025 09:52
@ghost ghost added Area-dotnet test untriaged Request triage from a team member labels Jan 10, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 9 out of 24 changed files in this pull request and generated 1 comment.

Files not reviewed (15)
  • src/Cli/dotnet/commands/dotnet-test/LocalizableStrings.resx: Language not supported
  • src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.cs.xlf: Language not supported
  • src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.de.xlf: Language not supported
  • src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.es.xlf: Language not supported
  • src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.fr.xlf: Language not supported
  • src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.it.xlf: Language not supported
  • src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ja.xlf: Language not supported
  • src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ko.xlf: Language not supported
  • src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pl.xlf: Language not supported
  • src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pt-BR.xlf: Language not supported
  • src/Cli/dotnet/commands/dotnet-test/BuiltInOptions.cs: Evaluated as low risk
  • src/Cli/dotnet/commands/dotnet-test/TestingPlatformCommand.Help.cs: Evaluated as low risk
  • src/Cli/dotnet/commands/dotnet-test/TestingPlatformOptions.cs: Evaluated as low risk
  • src/Cli/dotnet/commands/dotnet-test/TestCommandParser.cs: Evaluated as low risk
  • src/Cli/dotnet/commands/dotnet-test/TestApplication.cs: Evaluated as low risk
Comments suppressed due to low confidence (3)

src/Cli/dotnet/commands/dotnet-test/TestingPlatformCommand.cs:25

  • Changing the Run method from async Task to int removes the ability to await asynchronous operations, which could lead to unhandled asynchronous operations and unexpected behavior.
public int Run(ParseResult parseResult)

src/Cli/dotnet/commands/dotnet-test/SolutionAndProjectUtility.cs:81

  • [nitpick] The method GetProjectFilePaths is defined twice in the same file. Consider renaming one of the methods to avoid confusion.
private static string[] GetProjectFilePaths(string directory)

src/Cli/dotnet/commands/dotnet-test/SolutionAndProjectUtility.cs:24

  • The new behavior introduced by the --solution option should be covered by tests to ensure it works as expected.
var possibleSolutionPaths = GetSolutionFilePaths(directory);

return false;
}

if (!File.Exists(filePath))
Copy link
Member

Choose a reason for hiding this comment

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

@baronfel do you have some helper around filesystem for mocking and more or is it fine to use this check directly?

@ViktorHofer
Copy link
Member

Updating with latest main as we had a build break that just got fixed with 6b3a36d

@mariam-abdulla mariam-abdulla changed the title Support --solution option in dotnet test Support --solution and --directory options in dotnet test Jan 13, 2025
@mariam-abdulla mariam-abdulla merged commit 818246b into main Jan 13, 2025
38 checks passed
@mariam-abdulla mariam-abdulla deleted the dev/mabdullah/support-solution-option-in-dotnet-test branch January 13, 2025 13:46
@Evangelink
Copy link
Member

Relates to #45927

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-dotnet test untriaged Request triage from a team member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants