Skip to content

Add inspector comment tip.#55

Merged
lindexi merged 1 commit intomainfrom
t/lvyi/inspector
Jul 7, 2025
Merged

Add inspector comment tip.#55
lindexi merged 1 commit intomainfrom
t/lvyi/inspector

Conversation

@walterlv
Copy link
Member

@walterlv walterlv commented Jul 7, 2025

Fix #51

image

Copy link

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 adds reminder comments to the generated interceptor methods, warning users to decorate their command object types with [Option] or [Value] attributes to ensure related builder types are available.

  • Inserted inline reminders before each generated return statement in three methods.
  • Aims to prevent compile failures when no properties are annotated.
Comments suppressed due to low confidence (1)

src/DotNetCampus.CommandLine.Analyzer/Generators/InterceptorGenerator.cs:148

  • [nitpick] The inline comment is written in Chinese and may not be accessible to non-Chinese speaking contributors. Consider using English for code comments to improve accessibility and maintain consistency across the codebase.
            // 请确保 {{model.CommandObjectType.Name}} 类型中至少有一个属性标记了 [Option] 或 [Value] 特性;

@CLAassistant
Copy link

CLAassistant commented Jul 7, 2025

CLA assistant check
All committers have signed the CLA.

@lindexi lindexi merged commit 487902f into main Jul 7, 2025
3 checks passed
@lindexi lindexi deleted the t/lvyi/inspector branch July 7, 2025 03:31
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.

命令行库无法构建通过 CommandLine.As.g.cs error CS0234

3 participants