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

Update and Refactor Codebase: Improve Async Usage, Package Management, and Code Quality #20

Merged
merged 7 commits into from
Sep 19, 2023

Conversation

lemillermicrosoft
Copy link
Owner

@lemillermicrosoft lemillermicrosoft commented Sep 18, 2023

Summary

This pull request includes a series of updates and refactoring efforts across the codebase, focusing on improving async usage, introducing central package management, updating package references, and enhancing code quality and readability.

Changes

  • Remove unnecessary TODO comment and severity setting in .editorconfig
  • Set dotnet_diagnostic.CA2201.severity to none in .editorconfig
  • Add dotnet_diagnostic.VSTHRD200.severity setting in .editorconfig
  • Create Directory.Build.targets file to enable central package management and run 'dotnet format' on dev machines during Release builds
  • Create Directory.Packages.props file to centrally manage package versions and include analyzers
  • Enable central package management in Directory.Packages.props
  • Add package versions and package references for analyzers in Directory.Packages.props
  • Replace synchronous ReadToEnd with async ReadToEndAsync in multiple files
  • Remove unnecessary newline characters in ConfigCommand.cs
  • Change ConfigConstants class to static
  • Update package references in SKonsole.csproj to use the latest versions without specifying version numbers
  • Make GitDiffStaged method in GitSkill.cs async
  • Update CondenseSkill.cs to use 'this' keyword for better readability
  • Add RootNamespace to CondenseSkill.csproj
  • Updated CondenseSkill.csproj and PRSkill.csproj files
  • Refactored EnglishRobertaTokenizer.cs by making the class sealed
  • Removed unnecessary using directives in PullRequestSkill.cs
  • Updated PackageReference for Microsoft.SemanticKernel in PRSkill.csproj
  • Simplified object creation in RedirectTextCompletionResult.cs
  • Removed unnecessary whitespace and newline characters in various files
  • Made FormatInstructionsProvider a static class
  • Updated the output format instructions in FormatInstructionsProvider.cs

Powered by Microsoft Semantic Kernel

Update the .editorconfig file to disable some diagnostics, such as
CA2201 and VSTHRD200, and remove the unnecessary severity setting for
dotnet_analyzer_diagnostic. This change aims to improve code quality
and maintainability while reducing unwanted changes introduced by
"dotnet format".
Implement Central Package Management using Directory.Packages.props and
Directory.Build.targets. This centralizes package versions and analyzers
across all projects. Also, add a target to run 'dotnet format' on build
for Release configurations in dev environments.

Update the Microsoft.SemanticKernel package reference in
PRSkill.csproj to use the latest version. This change ensures
compatibility and performance improvements for the project.
This commit replaces the synchronous ReadToEnd method with the
asynchronous ReadToEndAsync method in CommitCommand and PRCommand
classes. It also makes ConfigConstants class static and removes
unnecessary newlines in ConfigCommand.
This commit updates the GitDiffStaged method in GitSkill.cs to use
async-await for better performance and readability. The method now
returns an awaitable Task and reads the process output asynchronously.
- Update method call to use `this` keyword for consistency
- Add BOM to resource files for proper encoding
- Change EnglishRobertaTokenizer class to sealed
- Remove unnecessary usings and reorder them
- Simplify object initialization
- Make FormatInstructionsProvider static
- Minor formatting adjustments
@lemillermicrosoft
Copy link
Owner Author

/sk generate-pr-description

@github-actions github-actions bot changed the title 918 editorconfig 918 editorconfig Update and Refactor Codebase: Improve Async Usage, Package Management, and Code Quality Sep 18, 2023
@github-actions
Copy link

Generate PR Description: succeeded ✅
https://github.com/lemillermicrosoft/skonsole/actions/runs/6228997005

@lemillermicrosoft lemillermicrosoft changed the title 918 editorconfig Update and Refactor Codebase: Improve Async Usage, Package Management, and Code Quality Update and Refactor Codebase: Improve Async Usage, Package Management, and Code Quality Sep 18, 2023
@lemillermicrosoft lemillermicrosoft merged commit 59dc149 into main Sep 19, 2023
2 checks passed
@lemillermicrosoft lemillermicrosoft deleted the 918_editorconfig branch September 29, 2023 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant