Skip to content

Conversation

jjonescz
Copy link
Member

@jjonescz jjonescz commented Sep 4, 2025

Fixes #49817.

@jjonescz jjonescz added the Area-run-file Items related to the "dotnet run <file>" effort label Sep 4, 2025
@jjonescz jjonescz marked this pull request as ready for review September 4, 2025 16:01
@jjonescz jjonescz requested review from a team and Copilot September 4, 2025 16:01
Copy link
Contributor

@Copilot 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.

Pull Request Overview

This PR simplifies file-level directive diagnostics by removing redundant location information from error messages and updating the error reporting format. The changes centralize location formatting and eliminate duplication where file path and line numbers were included in both the diagnostic location and message text.

  • Refactored directive error messages to exclude file path and line number parameters
  • Updated error reporting to use a consistent format with location followed by "error:" prefix
  • Modified test infrastructure to work with the new diagnostic format

Reviewed Changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/dotnet.Tests/CommandTests/Run/RunFileTests.cs Added DirectiveError helper method and updated test assertions to use new error format
test/dotnet.Tests/CommandTests/Project/Convert/DotnetProjectConvertTests.cs Updated test methods to use new error format and modified expected error structures
src/Cli/dotnet/Commands/Run/VirtualProjectBuildingCommand.cs Simplified diagnostic reporting by removing location lambdas and updating error message format
src/Cli/dotnet/Commands/CliCommandStrings.resx Updated error message strings to remove location parameters and added new DirectiveError string
Multiple .xlf files Updated localization files with new error message formats and added DirectiveError translation entries

@jjonescz
Copy link
Member Author

@RikkiGibson @333fred for reviews of a simple PR, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-run-file Items related to the "dotnet run <file>" effort
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants