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 he 重整结构 #349

Merged
merged 1 commit into from
Jul 7, 2024
Merged

update he 重整结构 #349

merged 1 commit into from
Jul 7, 2024

Conversation

NMSAzulX
Copy link
Collaborator

@NMSAzulX NMSAzulX commented Jul 7, 2024

Summary by CodeRabbit

  • New Features

    • Added a new method .WithFileOutput() to enhance the compilation process.
  • Refactor

    • Renamed various classes and methods for better clarity:
      • CommentHelper to HECommentHelper
      • DelegateHelper to HEDelegateHelper
      • HESpinLock to HESpinLockHelper
      • VSCSharpProjectInfomation to VSCSProjectInfoHelper
      • VSCSharpMainFileWatcher to VSCSMainProjectWatcher
    • Updated references to align with the new class and method names.

Copy link

coderabbitai bot commented Jul 7, 2024

Walkthrough

This update involves multiple renaming and refactoring tasks throughout the Natasha.CSharp.HotExecutor module. Key changes include updating helper class names to a standardized HE*Helper convention, enhancing functionality with new methods, and improving internal class structures for clearer distinctions between generic and non-generic implementations.

Changes

File Path Change Summary
.../SyntaxPlugin/CS0104Plugin/CS0104TriviaPlugin.cs Updated Handle function to call HECommentHelper.GetCommentScript instead of CommentHelper.GetCommentScript.
.../SyntaxPlugin/OutputPlugin/OutputTriviaPlugin.cs Updated references to CommentHelper to HECommentHelper in functions for generating comment scripts based on release or debug mode.
.../ReCompile/HECompiler.cs Added new method .WithFileOutput() to the _builderCache instance to enhance the compilation process.
.../ReCompile/Utils/HECommentHelper.cs Renamed CommentHelper class to HECommentHelper.
.../ReCompile/Utils/HEDelegateHelper.cs Separated generic and non-generic versions of HEDelegateHelper and added new methods for delegate retrieval and execution.
.../ReCompile/Utils/HESpinLockHelper.cs Renamed internal class HESpinLock to HESpinLockHelper.
.../ReCompile/Utils/VSCSProjectInfoHelper.cs Renamed VSCSharpProjectInfomation class to VSCSProjectInfoHelper and updated the static constructor name accordingly.
.../ReCompile/VSCSMainProjectWatcher.cs Renamed VSCSharpMainFileWatcher to VSCSMainProjectWatcher, updated internal field _compileLock to _compileLockHelper, and updated references to VSCSProjectInfoHelper.

Poem

In the code's vast garden, changes bloom,
Helpers now with names that groom.
From locks that spin to delegates true,
Each line refined, a task to pursue.
Ventures old and new, side by side,
In Natasha's world, we take pride.
🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@NMSAzulX
Copy link
Collaborator Author

NMSAzulX commented Jul 7, 2024

@coderabbitai review

Copy link

coderabbitai bot commented Jul 7, 2024

Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@NMSAzulX
Copy link
Collaborator Author

NMSAzulX commented Jul 7, 2024

未检测到合适的 ISSUE 推荐给您。感谢您的反馈!

该条自动推荐信息来自于 nms-bot.

Copy link

github-actions bot commented Jul 7, 2024

UT Test - Ubuntu

1 tests   1 ✅  0s ⏱️
1 suites  0 💤
1 files    0 ❌

Results for commit 7620a94.

Copy link

github-actions bot commented Jul 7, 2024

UT Test - Windows

1 tests   1 ✅  0s ⏱️
1 suites  0 💤
1 files    0 ❌

Results for commit 7620a94.

@NMSAzulX NMSAzulX merged commit 225c015 into dev.next Jul 7, 2024
8 checks passed
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Outside diff range and nitpick comments (2)
src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/ReCompile/Utils/HEDelegateHelper.cs (2)

Line range hint 23-37:
Fix the exception message.

The exception message should include the method name and type.

-  throw new InvalidOperationException($"Method {methodName} not found in type {typeof(T)}");
+  throw new InvalidOperationException($"Method '{methodName}' not found in type '{typeof(T)}'");

Line range hint 39-55:
Fix the exception message.

The exception message should include the method name and type.

-  throw new InvalidOperationException($"Method {methodName} not found in type {typeof(T)}");
+  throw new InvalidOperationException($"Method '{methodName}' not found in type '{typeof(T)}'");
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 21bc1bd and 7620a94.

Files ignored due to path filters (29)
  • samples/HE/NET5.0/MvcSample/wwwroot/favicon.ico is excluded by !**/*.ico
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css is excluded by !**/dist/**
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map is excluded by !**/dist/**, !**/*.map
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css is excluded by !**/dist/**
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map is excluded by !**/dist/**, !**/*.map
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css is excluded by !**/dist/**
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map is excluded by !**/dist/**, !**/*.map
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css is excluded by !**/dist/**
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map is excluded by !**/dist/**, !**/*.map
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/bootstrap/dist/css/bootstrap.css is excluded by !**/dist/**
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map is excluded by !**/dist/**, !**/*.map
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css is excluded by !**/dist/**
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map is excluded by !**/dist/**, !**/*.map
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js is excluded by !**/dist/**
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js.map is excluded by !**/dist/**, !**/*.map
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js is excluded by !**/dist/**, !**/*.min.js
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map is excluded by !**/dist/**, !**/*.map, !**/*.min.js.map
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/bootstrap/dist/js/bootstrap.js is excluded by !**/dist/**
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/bootstrap/dist/js/bootstrap.js.map is excluded by !**/dist/**, !**/*.map
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js is excluded by !**/dist/**, !**/*.min.js
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js.map is excluded by !**/dist/**, !**/*.map, !**/*.min.js.map
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js is excluded by !**/*.min.js
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/jquery-validation/dist/additional-methods.js is excluded by !**/dist/**
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/jquery-validation/dist/additional-methods.min.js is excluded by !**/dist/**, !**/*.min.js
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/jquery-validation/dist/jquery.validate.js is excluded by !**/dist/**
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js is excluded by !**/dist/**, !**/*.min.js
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/jquery/dist/jquery.js is excluded by !**/dist/**
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/jquery/dist/jquery.min.js is excluded by !**/dist/**, !**/*.min.js
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/jquery/dist/jquery.min.map is excluded by !**/dist/**, !**/*.map
Files selected for processing (49)
  • samples/HE/NET5.0/MvcSample/MvcSample.csproj (1 hunks)
  • samples/HE/NET5.0/MvcSample/Pages/Error.cshtml (1 hunks)
  • samples/HE/NET5.0/MvcSample/Pages/Error.cshtml.cs (1 hunks)
  • samples/HE/NET5.0/MvcSample/Pages/Index.cshtml (1 hunks)
  • samples/HE/NET5.0/MvcSample/Pages/Index.cshtml.cs (1 hunks)
  • samples/HE/NET5.0/MvcSample/Pages/Privacy.cshtml (1 hunks)
  • samples/HE/NET5.0/MvcSample/Pages/Privacy.cshtml.cs (1 hunks)
  • samples/HE/NET5.0/MvcSample/Pages/Shared/_Layout.cshtml (1 hunks)
  • samples/HE/NET5.0/MvcSample/Pages/Shared/_ValidationScriptsPartial.cshtml (1 hunks)
  • samples/HE/NET5.0/MvcSample/Pages/_ViewImports.cshtml (1 hunks)
  • samples/HE/NET5.0/MvcSample/Pages/_ViewStart.cshtml (1 hunks)
  • samples/HE/NET5.0/MvcSample/Program.cs (1 hunks)
  • samples/HE/NET5.0/MvcSample/Startup.cs (1 hunks)
  • samples/HE/NET5.0/MvcSample/appsettings.Development.json (1 hunks)
  • samples/HE/NET5.0/MvcSample/appsettings.json (1 hunks)
  • samples/HE/NET5.0/MvcSample/wwwroot/css/site.css (1 hunks)
  • samples/HE/NET5.0/MvcSample/wwwroot/js/site.js (1 hunks)
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/bootstrap/LICENSE (1 hunks)
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt (1 hunks)
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js (1 hunks)
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/jquery-validation/LICENSE.md (1 hunks)
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/jquery/LICENSE.txt (1 hunks)
  • samples/HE/NET6.0/Webapi2Sample/Program.cs (1 hunks)
  • samples/HE/NET6.0/Webapi2Sample/WeatherForecast.cs (1 hunks)
  • samples/HE/NET6.0/Webapi2Sample/Webapi2Sample.csproj (1 hunks)
  • samples/HE/NET6.0/Webapi2Sample/appsettings.Development.json (1 hunks)
  • samples/HE/NET6.0/Webapi2Sample/appsettings.json (1 hunks)
  • samples/HE/NET6.0/WebapiSample/Controllers/WeatherForecast3Controller - 复制.cs (1 hunks)
  • samples/HE/NET6.0/WebapiSample/Controllers/WeatherForecast3Controller.cs (1 hunks)
  • samples/HE/NET6.0/WebapiSample/Controllers/WeatherForecastController.cs (1 hunks)
  • samples/HE/NET6.0/WebapiSample/Program.cs (1 hunks)
  • samples/HE/NET6.0/WebapiSample/WeatherForecast.cs (1 hunks)
  • samples/HE/NET6.0/WebapiSample/WebapiSample.csproj (1 hunks)
  • samples/HE/NET6.0/WebapiSample/appsettings.Development.json (1 hunks)
  • samples/HE/NET6.0/WebapiSample/appsettings.json (1 hunks)
  • src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/HEProxy.cs (8 hunks)
  • src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/ReBuild/VSCSDependencyProjectWatcher.cs (4 hunks)
  • src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/ReBuild/VSCSProcessor.cs (3 hunks)
  • src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/ReCompile/Component/Logger/HEFileLogger.cs (1 hunks)
  • src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/ReCompile/Component/SyntaxHandler/OnceHandler.cs (2 hunks)
  • src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/ReCompile/Component/SyntaxRewriter/HETreeMethodRewriter.cs (1 hunks)
  • src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/ReCompile/Component/SyntaxRewriter/SyntaxPlugin/CS0104Plugin/CS0104TriviaPlugin.cs (1 hunks)
  • src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/ReCompile/Component/SyntaxRewriter/SyntaxPlugin/OutputPlugin/OutputTriviaPlugin.cs (1 hunks)
  • src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/ReCompile/HECompiler.cs (1 hunks)
  • src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/ReCompile/Utils/HECommentHelper.cs (1 hunks)
  • src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/ReCompile/Utils/HEDelegateHelper.cs (2 hunks)
  • src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/ReCompile/Utils/HESpinLockHelper.cs (1 hunks)
  • src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/ReCompile/Utils/VSCSProjectInfoHelper.cs (2 hunks)
  • src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/ReCompile/VSCSMainProjectWatcher.cs (7 hunks)
Files skipped from review due to trivial changes (27)
  • samples/HE/NET5.0/MvcSample/MvcSample.csproj
  • samples/HE/NET5.0/MvcSample/Pages/Index.cshtml
  • samples/HE/NET5.0/MvcSample/Pages/Index.cshtml.cs
  • samples/HE/NET5.0/MvcSample/Pages/Privacy.cshtml
  • samples/HE/NET5.0/MvcSample/Pages/Privacy.cshtml.cs
  • samples/HE/NET5.0/MvcSample/Pages/Shared/_Layout.cshtml
  • samples/HE/NET5.0/MvcSample/Pages/Shared/_ValidationScriptsPartial.cshtml
  • samples/HE/NET5.0/MvcSample/Pages/_ViewImports.cshtml
  • samples/HE/NET5.0/MvcSample/Pages/_ViewStart.cshtml
  • samples/HE/NET5.0/MvcSample/Program.cs
  • samples/HE/NET5.0/MvcSample/appsettings.Development.json
  • samples/HE/NET5.0/MvcSample/appsettings.json
  • samples/HE/NET5.0/MvcSample/wwwroot/js/site.js
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/bootstrap/LICENSE
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt
  • samples/HE/NET5.0/MvcSample/wwwroot/lib/jquery-validation/LICENSE.md
  • samples/HE/NET6.0/Webapi2Sample/WeatherForecast.cs
  • samples/HE/NET6.0/Webapi2Sample/Webapi2Sample.csproj
  • samples/HE/NET6.0/Webapi2Sample/appsettings.Development.json
  • samples/HE/NET6.0/Webapi2Sample/appsettings.json
  • samples/HE/NET6.0/WebapiSample/WeatherForecast.cs
  • samples/HE/NET6.0/WebapiSample/WebapiSample.csproj
  • samples/HE/NET6.0/WebapiSample/appsettings.Development.json
  • samples/HE/NET6.0/WebapiSample/appsettings.json
  • src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/ReCompile/Component/Logger/HEFileLogger.cs
  • src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/ReCompile/Component/SyntaxRewriter/HETreeMethodRewriter.cs
  • src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/ReCompile/Utils/HECommentHelper.cs
Additional context used
LanguageTool
samples/HE/NET5.0/MvcSample/wwwroot/lib/jquery/LICENSE.txt

[uncategorized] ~7-~7: Possible missing comma found.
Context: ...ng license applies to all parts of this software except as documented below: ==== Perm...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~34-~34: Possible missing comma found.
Context: ...nally maintained libraries used by this software which have their own licenses; we recom...

(AI_HYDRA_LEO_MISSING_COMMA)

Biome
samples/HE/NET5.0/MvcSample/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js

[error] 73-73: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

Additional comments not posted (46)
src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/ReCompile/Utils/HESpinLockHelper.cs (4)

Line range hint 7-11:
LGTM!

The GetLock method correctly uses Interlocked.CompareExchange to acquire a lock atomically.


Line range hint 13-17:
LGTM!

The GetAndWaitLock method correctly uses a loop with Interlocked.CompareExchange and Thread.Sleep to acquire a lock.


Line range hint 19-21:
LGTM!

The IsLocking method correctly checks if the lock is currently held.


Line range hint 23-27:
LGTM!

The ReleaseLock method correctly releases the lock by setting the lock count to 0.

samples/HE/NET5.0/MvcSample/Pages/Error.cshtml (1)

1-26: LGTM!

The changes in the Error.cshtml file are straightforward and involve setting the title and displaying error information.

samples/HE/NET5.0/MvcSample/Pages/Error.cshtml.cs (1)

1-31: LGTM!

The changes in the Error.cshtml.cs file are straightforward and involve setting the request ID and logging.

samples/HE/NET6.0/WebapiSample/Controllers/WeatherForecastController.cs (1)

1-32: LGTM!

The changes in the WeatherForecastController.cs file are straightforward and involve setting up the controller and returning weather forecasts.

samples/HE/NET6.0/WebapiSample/Controllers/WeatherForecast3Controller - 复制.cs (2)

7-7: Verify the class name.

Ensure that the class name WeatherForecast2Controller is correct and follows the intended naming conventions.


16-16: Verify the constructor parameter type.

Ensure that the type ILogger<WeatherForecastController> is correct for the WeatherForecast2Controller class.

samples/HE/NET6.0/WebapiSample/Controllers/WeatherForecast3Controller.cs (2)

7-7: Verify the class name.

Ensure that the class name WeatherForecast3Controller is correct and follows the intended naming conventions.


16-16: Verify the constructor parameter type.

Ensure that the type ILogger<WeatherForecastController> is correct for the WeatherForecast3Controller class.

src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/ReCompile/Component/SyntaxRewriter/SyntaxPlugin/CS0104Plugin/CS0104TriviaPlugin.cs (1)

30-30: Verify the method call to HECommentHelper.GetCommentScript.

Ensure that the method HECommentHelper.GetCommentScript is correctly used and that it returns the expected results.

samples/HE/NET5.0/MvcSample/Startup.cs (2)

23-26: Ensure proper service configuration.

Verify that the services required for the application are correctly configured.


29-50: Ensure proper middleware configuration.

Verify that the middleware required for the application is correctly configured.

samples/HE/NET5.0/MvcSample/wwwroot/css/site.css (2)

4-25: LGTM!

The CSS rules provide necessary styling for the elements.


29-71: LGTM!

The CSS rules provide necessary styling for the elements.

samples/HE/NET5.0/MvcSample/wwwroot/lib/jquery/LICENSE.txt (1)

1-36: LGTM!

The license text provides necessary information for the usage of jQuery.

Tools
LanguageTool

[uncategorized] ~7-~7: Possible missing comma found.
Context: ...ng license applies to all parts of this software except as documented below: ==== Perm...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~34-~34: Possible missing comma found.
Context: ...nally maintained libraries used by this software which have their own licenses; we recom...

(AI_HYDRA_LEO_MISSING_COMMA)

src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/ReCompile/Utils/HEDelegateHelper.cs (1)

8-21: Fix the return type and exception message.

The return type of the method should be Action<object>? instead of Action<object>?. Additionally, the exception message should include the method name and type.

-  public static Action<object>? GetDelegate(Type type, string methodName, BindingFlags flags)
+  public static Action<object>? GetDelegate(Type type, string methodName, BindingFlags flags)
-  throw new InvalidOperationException($"Method {methodName} not found in type {type}");
+  throw new InvalidOperationException($"Method '{methodName}' not found in type '{type}'");

Likely invalid or redundant comment.

src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/ReCompile/HECompiler.cs (1)

32-32: LGTM!

The method .WithFileOutput() is correctly added to the _builderCache instance.

src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/ReCompile/Component/SyntaxRewriter/SyntaxPlugin/OutputPlugin/OutputTriviaPlugin.cs (1)

31-33: Updated helper class name.

The CommentHelper class has been renamed to HECommentHelper. Ensure that the new class name is consistent throughout the codebase.

src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/ReCompile/Component/SyntaxHandler/OnceHandler.cs (1)

9-9: Ensure the consistency of the comment format.

The _onceComment is now stored in lowercase. Ensure that this change is consistent with how comments are processed in other parts of the code.

samples/HE/NET6.0/Webapi2Sample/Program.cs (2)

1-3: Added necessary using statements.

New using statements for Microsoft.AspNetCore.Mvc.Controllers and Microsoft.AspNetCore.Mvc.ModelBinding have been added.


27-35: Updated helper class name and usage.

The HEDelegateHelper class is now used to get delegates for modelMetadataProvider and controllerActivatorProvider. Ensure that the new class name and method calls are consistent throughout the codebase.

samples/HE/NET6.0/WebapiSample/Program.cs (2)

1-7: Added necessary using statements.

New using statements for Microsoft.AspNetCore.Mvc.Controllers, Microsoft.AspNetCore.Mvc.ModelBinding, Microsoft.AspNetCore.Mvc.ModelBinding.Metadata, Microsoft.Extensions.DependencyInjection, Natasha.CSharp.HotExecutor.Component, and Swashbuckle.AspNetCore.Swagger have been added.


53-67: Updated helper class name and usage.

The HEDelegateHelper class is now used to get method information for modelMetadataProvider and controllerActivatorProvider. Ensure that the new class name and method calls are consistent throughout the codebase.

src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/ReCompile/Utils/VSCSProjectInfoHelper.cs (2)

6-6: Class name change approved.

The class has been renamed to VSCSProjectInfoHelper for better clarity.


21-21: Constructor changes approved.

The constructor has been updated to reflect the new class name.

src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/ReBuild/VSCSProcessor.cs (3)

22-22: Method call change approved.

The method call has been updated to VSCSProjectInfoHelper.SlnPath.


37-39: Method call changes approved.

The method calls have been updated to VSCSProjectInfoHelper.BinPath and VSCSProjectInfoHelper.ExecuteName.


94-94: Method call change approved.

The method call has been updated to VSCSProjectInfoHelper.ExecuteName.

src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/ReCompile/VSCSMainProjectWatcher.cs (6)

10-10: Class name change approved.

The class has been renamed to VSCSMainProjectWatcher for better clarity.


18-18: Constructor changes approved.

The constructor has been updated to reflect the new class name and field references.


37-37: Method call change approved.

The method call has been updated to VSCSProjectInfoHelper.MainCsprojPath.


55-60: Method call changes approved.

The method calls have been updated to VSCSProjectInfoHelper.IsXamlAndResxFile and VSCSProjectInfoHelper.CheckFileAvailiable.


81-86: Method call changes approved.

The method calls have been updated to VSCSProjectInfoHelper.IsXamlAndResxFile and VSCSProjectInfoHelper.CheckFileAvailiable.


Line range hint 105-133:
Method call changes approved.

The method calls have been updated to VSCSProjectInfoHelper.IsXamlAndResxFile and VSCSProjectInfoHelper.CheckFileAvailiable.

src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/ReBuild/VSCSDependencyProjectWatcher.cs (3)

18-20: Method call changes approved.

The method calls have been updated to VSCSProjectInfoHelper.DebugPath, VSCSProjectInfoHelper.ReleasePath, and VSCSProjectInfoHelper.ExecutePath.


Line range hint 75-96:
Method call changes approved.

The method calls have been updated to VSCSProjectInfoHelper.ExecuteName and VSCSProjectInfoHelper.BinPath.


134-142: Method call changes approved.

The method calls have been updated to VSCSProjectInfoHelper.CheckFileAvivaliable.

src/Natasha.CSharp/Extension/HotExecutor/Natasha.CSharp.HotExecutor/HEProxy.cs (7)

9-9: Approved: Import addition.

The import System.Diagnostics is necessary for the usage of Debug.WriteLine.


22-22: Approved: Field addition.

The field _processor of type VSCSProcessor is necessary for project processing tasks.


23-23: Approved: Field addition.

The field _csprojWatcher of type VSCSDependencyProjectWatcher is necessary for monitoring project dependencies.


31-31: Approved: Field addition.

The field _buildLock of type HESpinLockHelper is necessary for synchronizing build processes.


32-32: Approved: Field addition.

The field _mainWatcher of type VSCSMainProjectWatcher is necessary for monitoring the main project.


62-62: Approved: Method call.

The _csprojWatcher is instantiated with VSCSProjectInfoHelper.CSProjFilePath to set the project file path for the watcher.


70-72: Approved: Condition.

The condition checks if VSCSProjectInfoHelper.EnableImplicitUsings is true to register the _cs0104TriviaPlugin.

var container = $(this).find("[data-valmsg-summary=true]"),
list = container.find("ul");

if (list && list.length && validator.errorList.length) {
Copy link

Choose a reason for hiding this comment

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

Suggestion: Use optional chaining.

Change to an optional chain to improve readability and avoid potential null or undefined errors.

- if (list && list.length && validator.errorList.length) {
+ if (list?.length && validator.errorList.length) {
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (list && list.length && validator.errorList.length) {
if (list?.length && validator.errorList.length) {
Tools
Biome

[error] 73-73: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

1 participant