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

提供添加文件头部信息的分析器和修复器 #8

Open
vipwan opened this issue Sep 6, 2024 · 0 comments
Open

提供添加文件头部信息的分析器和修复器 #8

vipwan opened this issue Sep 6, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@vipwan
Copy link
Owner

vipwan commented Sep 6, 2024

首先添加Biwen.AutoClassGen.Comment文件到项目根目录,格式如下:

请注意: 严格约定配置项的首字母大写

// Licensed to the {Product} under one or more agreements.
// The {Product} licenses this file to you under the {Copyright} license. 
// See the LICENSE file in the project root for more information.13456789
// 1234 {Product} {File} 
// {Date}  {Title} {Author} {Company}

项目文件.csproj中如果包含如下的配置项将会被引用,否则将会使用缺省值!

<Project Sdk="Microsoft.NET.Sdk.Web">
	<PropertyGroup>
		<TargetFramework>net8.0</TargetFramework>
		<Description>This is a test console App</Description>
		<Copyright>MIT</Copyright>
		<Company>Inc</Company>
		<Authors>万雅虎</Authors>
	</PropertyGroup>
	<Import Project="../Version.props" />
</Project>

支持的变量有: Date,File,Title,Author,Product,Copyright,Version

.cs源文件不存在头部信息时分析器将生成GEN050警告信息,

image

提供的修复器如下:

image

@vipwan vipwan added the documentation Improvements or additions to documentation label Sep 10, 2024
@vipwan vipwan pinned this issue Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant