Skip to content
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

Refactor code and update test coverage settings #946

Merged
merged 2 commits into from
Dec 16, 2024

Conversation

vb2ae
Copy link
Member

@vb2ae vb2ae commented Dec 16, 2024

This pull request includes several changes to improve the code formatting and configuration of the project. The most important changes include modifying the unit test configuration to use a settings file, adding a new coverage.runsettings file, and reformatting various classes to follow a consistent coding style.

Configuration changes:

  • .github/workflows/dotnet.yml: Updated the unit test command to use --settings coverage.runsettings instead of specifying coverage parameters directly.
  • coverage.runsettings: Added a new settings file to configure code coverage collection in JSON format.

Code formatting:

Closes #945

Refactor Parameter.cs and XamlMetadataProvider.cs for consistent style:
- Add braces for all control structures
- Add spaces around operators and after commas
- Rename method parameters for clarity
- Replace AvaloniaProperty with DependencyProperty
- Improve XML documentation comments

Update unit test step to use coverage.runsettings:
- Replace previous coverage command with --settings coverage.runsettings

Remove step to restore NuGet packages for the tutorial

Add coverage.runsettings for code coverage configuration:
- Use XPlat code coverage data collector
- Configure JSON format for coverage report
@vb2ae vb2ae linked an issue Dec 16, 2024 that may be closed by this pull request
1 task
@vb2ae vb2ae requested a review from Copilot December 16, 2024 12:35

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 11 changed files in this pull request and generated no comments.

Files not reviewed (2)
  • coverage.runsettings: Language not supported
  • .github/workflows/dotnet.yml: Evaluated as low risk
Simplified the CreateXamlMember method by removing the unused variable `userType`. The result of `GetXamlTypeByName("Caliburn.Micro.View")` is now discarded using the discard operator `_`, indicating that the result is not needed for further processing.
@vb2ae vb2ae requested a review from Copilot December 16, 2024 13:21

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 11 changed files in this pull request and generated no comments.

Files not reviewed (2)
  • coverage.runsettings: Language not supported
  • .github/workflows/dotnet.yml: Evaluated as low risk
@vb2ae vb2ae linked an issue Dec 16, 2024 that may be closed by this pull request
1 task
@vb2ae vb2ae merged commit 50a84b0 into master Dec 16, 2024
4 checks passed
@vb2ae vb2ae deleted the 945-fix-code-scanning-alert-missed-ternary-opportunity branch December 16, 2024 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant