Skip to content

Commit

Permalink
Feat: Generator setup
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnaSasDev committed Jan 10, 2025
1 parent 605f49f commit 277412e
Show file tree
Hide file tree
Showing 11 changed files with 564 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ dotnet_naming_symbols.private_instance_fields_symbols.resharper_applicable_kinds
dotnet_naming_symbols.private_instance_fields_symbols.resharper_required_modifiers = instance
dotnet_naming_symbols.private_instance_fields_symbols_1.applicable_accessibilities = private
dotnet_naming_symbols.private_instance_fields_symbols_1.applicable_kinds = field
dotnet_naming_symbols.private_instance_fields_symbols_1.resharper_applicable_kinds = field,readonly_field
dotnet_naming_symbols.private_instance_fields_symbols_1.resharper_applicable_kinds = field, readonly_field
dotnet_naming_symbols.private_instance_fields_symbols_1.resharper_required_modifiers = instance
dotnet_naming_symbols.private_static_fields_symbols.applicable_accessibilities = private
dotnet_naming_symbols.private_static_fields_symbols.applicable_kinds = field
Expand All @@ -84,11 +84,11 @@ dotnet_naming_symbols.private_static_readonly_symbols.required_modifiers = reado
dotnet_naming_symbols.private_static_readonly_symbols.resharper_applicable_kinds = readonly_field
dotnet_naming_symbols.private_static_readonly_symbols.resharper_required_modifiers = static
dotnet_naming_symbols.unity_serialized_field_symbols.applicable_accessibilities = *
dotnet_naming_symbols.unity_serialized_field_symbols.applicable_kinds =
dotnet_naming_symbols.unity_serialized_field_symbols.applicable_kinds =
dotnet_naming_symbols.unity_serialized_field_symbols.resharper_applicable_kinds = unity_serialised_field
dotnet_naming_symbols.unity_serialized_field_symbols.resharper_required_modifiers = instance
dotnet_naming_symbols.unity_serialized_field_symbols_1.applicable_accessibilities = *
dotnet_naming_symbols.unity_serialized_field_symbols_1.applicable_kinds =
dotnet_naming_symbols.unity_serialized_field_symbols_1.applicable_kinds =
dotnet_naming_symbols.unity_serialized_field_symbols_1.resharper_applicable_kinds = unity_serialised_field
dotnet_naming_symbols.unity_serialized_field_symbols_1.resharper_required_modifiers = instance
dotnet_sort_system_directives_first = false
Expand Down Expand Up @@ -143,7 +143,7 @@ resharper_formatter_tags_enabled = true
resharper_indent_preprocessor_if = usual_indent
resharper_indent_preprocessor_other = do_not_change
resharper_indent_raw_literal_string = indent
resharper_instance_members_qualify_declared_in =
resharper_instance_members_qualify_declared_in =
resharper_keep_existing_attribute_arrangement = true
resharper_keep_existing_declaration_block_arrangement = true
resharper_keep_existing_embedded_block_arrangement = true
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ jobs:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: |
dotnet nuget push src/CodeOfChaos.Ansi/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json --skip-duplicate
dotnet nuget push src/CodeOfChaos.Ansi.Generators/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json --skip-duplicate
7 changes: 7 additions & 0 deletions CodeOfChaos.Ansi.sln
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tools.CodeOfChaos.Ansi", "s
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "example", "example", "{A5F3433A-9F39-4372-B994-E262F597F1D2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeOfChaos.Ansi.Generators", "src\CodeOfChaos.Ansi.Generators\CodeOfChaos.Ansi.Generators.csproj", "{82941FB2-B148-4A12-8DFB-71769B4F4DD8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -32,10 +34,15 @@ Global
{ADEADD97-0AFA-4D9E-970B-9FFB932949B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ADEADD97-0AFA-4D9E-970B-9FFB932949B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ADEADD97-0AFA-4D9E-970B-9FFB932949B3}.Release|Any CPU.Build.0 = Release|Any CPU
{82941FB2-B148-4A12-8DFB-71769B4F4DD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{82941FB2-B148-4A12-8DFB-71769B4F4DD8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{82941FB2-B148-4A12-8DFB-71769B4F4DD8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{82941FB2-B148-4A12-8DFB-71769B4F4DD8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{26284571-0E09-4BAF-8C2B-DF87DCC1BA0B} = {8DD280D4-1E14-4D5E-AFE6-58DD8F079DCC}
{64B26DED-68C3-47FF-B409-1C8FAD4F9176} = {197E72AD-DEAB-4350-AFC3-A3BB38720BF5}
{ADEADD97-0AFA-4D9E-970B-9FFB932949B3} = {AF1A203C-6EF1-440E-BB3C-55B1DBFE9C19}
{82941FB2-B148-4A12-8DFB-71769B4F4DD8} = {197E72AD-DEAB-4350-AFC3-A3BB38720BF5}
EndGlobalSection
EndGlobal
Empty file added README.md
Empty file.
Binary file added assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/CodeOfChaos.Ansi.Generators/Class1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
namespace CodeOfChaos.Ansi.Generators;
public class Class1 {

}
52 changes: 52 additions & 0 deletions src/CodeOfChaos.Ansi.Generators/CodeOfChaos.Ansi.Generators.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<IsPackable>true</IsPackable>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>

<GeneratePackageOnBuild>true</GeneratePackageOnBuild> <!-- Generates a package at build -->
<IncludeBuildOutput>false</IncludeBuildOutput> <!-- Do not include the generator as a lib dependency -->
<IsDeveloperDependency>true</IsDeveloperDependency>
<DevelopmentDependency>true</DevelopmentDependency>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
<IsRoslynComponent>true</IsRoslynComponent>
<NoWarn>NU5128</NoWarn>

<!-- Main package name -->
<PackageId>CodeOfChaos.Ansi.Generators</PackageId>
<Version>1.0.0-preview.0</Version>
<Authors>Anna Sas</Authors>
<Description>A library to write Ansi Colored text as a stringbuilder</Description>
<PackageProjectUrl>https://github.com/code-of-chaos/cs-code_of_chaos-ansi/</PackageProjectUrl>
<PackageTags>ansi input stringbuilder</PackageTags>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<DebugType>embedded</DebugType>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageIcon>icon.png</PackageIcon>
</PropertyGroup>

<ItemGroup>
<None Include="../../LICENSE" Pack="true" PackagePath="" Visible="false" />
<None Include="../../README.md" Pack="true" PackagePath="" />
<None Include="../../assets/icon.png" Pack="true" PackagePath="" Visible="false" />
</ItemGroup>

<!-- Package dependencies -->
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.12.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.12.0" PrivateAssets="all" />
<PackageReference Include="CodeOfChaos.GeneratorTools" Version="1.1.2" Pack="true" GeneratePathProperty="true" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
<None Include="$(PkgCodeOfChaos_GeneratorTools)\lib\netstandard2.0\*.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
</ItemGroup>

</Project>
Loading

0 comments on commit 277412e

Please sign in to comment.