Skip to content

Commit 9335433

Browse files
committed
Change: Code Cleanup
1 parent cef4fec commit 9335433

File tree

9 files changed

+27
-23
lines changed

9 files changed

+27
-23
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# CodeOfChaos.Ansi
2+
23
A small library to use Fluent style-ish string builders to add color to your console output.

src/CodeOfChaos.Ansi.Generators/AnsiStringBuilderGenerator.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ private static void GenerateCode(SourceProductionContext context, ImmutableArray
4848
.AppendLine("}")
4949
.ToStringAndClear());
5050
#endregion
51-
51+
5252
#region Fore & Background
5353
foreach (string section in new[] { "Foreground", "Background", "Underline" }) {
5454
context.AddSource($"Ansi{section}Builder.g.cs", builder
@@ -138,6 +138,7 @@ private static ColorEntry[] ParseColorFile(SourceProductionContext context, Addi
138138
DiagnosticSeverity.Warning,
139139
true),
140140
Location.None));
141+
141142
return [];
142143
}
143144
catch (FormatException ex) {
@@ -151,6 +152,7 @@ private static ColorEntry[] ParseColorFile(SourceProductionContext context, Addi
151152
DiagnosticSeverity.Warning,
152153
true),
153154
Location.None));
155+
154156
return [];
155157
}
156158
}

src/CodeOfChaos.Ansi.Generators/CodeOfChaos.Ansi.Generators.csproj

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,22 @@
3131
</PropertyGroup>
3232

3333
<ItemGroup>
34-
<None Include="../../LICENSE" Pack="true" PackagePath="" Visible="false" />
35-
<None Include="../../README.md" Pack="true" PackagePath="" />
36-
<None Include="../../assets/icon.png" Pack="true" PackagePath="" Visible="false" />
34+
<None Include="../../LICENSE" Pack="true" PackagePath="" Visible="false"/>
35+
<None Include="../../README.md" Pack="true" PackagePath=""/>
36+
<None Include="../../assets/icon.png" Pack="true" PackagePath="" Visible="false"/>
3737
</ItemGroup>
3838

3939
<!-- Package dependencies -->
4040
<ItemGroup>
41-
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" PrivateAssets="all" />
42-
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.12.0" PrivateAssets="all" />
43-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.12.0" PrivateAssets="all" />
44-
<PackageReference Include="CodeOfChaos.GeneratorTools" Version="1.4.0" Pack="true" GeneratePathProperty="true" PrivateAssets="all" />
41+
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" PrivateAssets="all"/>
42+
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.12.0" PrivateAssets="all"/>
43+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.12.0" PrivateAssets="all"/>
44+
<PackageReference Include="CodeOfChaos.GeneratorTools" Version="1.4.0" Pack="true" GeneratePathProperty="true" PrivateAssets="all"/>
4545
</ItemGroup>
4646

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

5252
</Project>

src/CodeOfChaos.Ansi/ByteVector3.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ public ByteVector3(int x, int y, int z) : this(
2525
(byte)Math.Clamp(x, byte.MinValue, byte.MaxValue),
2626
(byte)Math.Clamp(y, byte.MinValue, byte.MaxValue),
2727
(byte)Math.Clamp(z, byte.MinValue, byte.MaxValue)
28-
) {
29-
}
28+
) {}
3029

3130
// -----------------------------------------------------------------------------------------------------------------
3231
// Methods

src/CodeOfChaos.Ansi/CodeOfChaos.Ansi.csproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,23 @@
2222
</PropertyGroup>
2323

2424
<ItemGroup>
25-
<None Include="../../LICENSE" Pack="true" PackagePath="" Visible="false" />
26-
<None Include="../../README.md" Pack="true" PackagePath="" />
27-
<None Include="../../assets/icon.png" Pack="true" PackagePath="" Visible="false" />
25+
<None Include="../../LICENSE" Pack="true" PackagePath="" Visible="false"/>
26+
<None Include="../../README.md" Pack="true" PackagePath=""/>
27+
<None Include="../../assets/icon.png" Pack="true" PackagePath="" Visible="false"/>
2828
</ItemGroup>
2929

3030
<ItemGroup>
3131
<!-- ProjectReference for the generator as an analyzer -->
32-
<ProjectReference Include="..\CodeOfChaos.Ansi.Generators\CodeOfChaos.Ansi.Generators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
32+
<ProjectReference Include="..\CodeOfChaos.Ansi.Generators\CodeOfChaos.Ansi.Generators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
3333

3434
<!-- Ugly, but this is because of some weirdness with how analyzers are imported through a project reference -->
35-
<PackageReference Include="CodeOfChaos.GeneratorTools" Version="1.4.0" GeneratePathProperty="true" PrivateAssets="all" />
36-
<Analyzer Include="$(PkgCodeOfChaos_GeneratorTools)\lib\netstandard2.0\*.dll" />
35+
<PackageReference Include="CodeOfChaos.GeneratorTools" Version="1.4.0" GeneratePathProperty="true" PrivateAssets="all"/>
36+
<Analyzer Include="$(PkgCodeOfChaos_GeneratorTools)\lib\netstandard2.0\*.dll"/>
3737
</ItemGroup>
3838

3939
<ItemGroup>
40-
<None Include="Assets\ASB.CssColors.xml" />
41-
<AdditionalFiles Include="Assets\ASB.CssColors.xml" />
40+
<None Include="Assets\ASB.CssColors.xml"/>
41+
<AdditionalFiles Include="Assets\ASB.CssColors.xml"/>
4242
</ItemGroup>
4343

4444
</Project>
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<wpf:ResourceDictionary xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib"
1+
<wpf:ResourceDictionary xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
2+
xmlns:s="clr-namespace:System;assembly=mscorlib"
23
xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
34
xml:space="preserve">
45
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=builders/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

src/Tools.CodeOfChaos.Ansi/Program.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public static async Task Main(string[] args) {
2525
"CodeOfChaos.Ansi",
2626
"CodeOfChaos.Ansi.Generators"
2727
);
28+
2829
string oneLineArgs = InputHelper.ToOneLine(args).Replace("%PROJECTS%", projects);
2930

3031
// Finally start executing

src/Tools.CodeOfChaos.Ansi/Tools.CodeOfChaos.Ansi.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="CodeOfChaos.CliArgsParser.Library" Version="4.6.0" />
12+
<PackageReference Include="CodeOfChaos.CliArgsParser.Library" Version="4.6.0"/>
1313
</ItemGroup>
1414

1515
</Project>

tests/Tests.CodeOfChaos.Ansi/Tests.CodeOfChaos.Ansi.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<ItemGroup>
1414
<PackageReference Include="JetBrains.Annotations" Version="2024.3.0"/>
1515
<PackageReference Include="Moq" Version="4.20.72"/>
16-
<PackageReference Include="TUnit" Version="0.13.3" />
16+
<PackageReference Include="TUnit" Version="0.13.3"/>
1717
<PackageReference Include="Bogus" Version="35.6.1"/>
1818
</ItemGroup>
1919

0 commit comments

Comments
 (0)