Skip to content

Commit a123d48

Browse files
committed
chore: fix spelling issues
1 parent cf0a688 commit a123d48

File tree

11 files changed

+68
-27
lines changed

11 files changed

+68
-27
lines changed

ConsoleAppFramework.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1313
ProjectSection(SolutionItems) = preProject
1414
.dockerignore = .dockerignore
1515
.gitignore = .gitignore
16-
.circleci\config.yml = .circleci\config.yml
1716
Directory.Build.props = Directory.Build.props
1817
ReadMe.md = ReadMe.md
18+
exclusion.dic = exclusion.dic
1919
EndProjectSection
2020
EndProject
2121
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleAppFramework", "src\ConsoleAppFramework\ConsoleAppFramework.csproj", "{09BEEA7B-B6D3-4011-BCAB-6DF976713695}"

ReadMe.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ The field secondArg must be between 0 and 2.
670670

671671
By default, the ExitCode is set to 1 in this case.
672672

673-
Filter(Middleware) Pipline / ConsoleAppContext
673+
Filter(Middleware) Pipeline / ConsoleAppContext
674674
---
675675
Filters are provided as a mechanism to hook into the execution before and after. To use filters, define an `internal class` that implements `ConsoleAppFilter`.
676676

@@ -1022,7 +1022,7 @@ When `Microsoft.Extensions.Configuration` is imported, `ConfigureEmptyConfigurat
10221022

10231023
Furthermore, overloads of `Action<IConfiguration, IServiceCollection> configure` and `Action<IConfiguration, ILoggingBuilder> configure` are added to `ConfigureServices` and `ConfigureLogging`, allowing you to retrieve the Configuration when executing the delegate.
10241024

1025-
without Hosting dependency, I've prefere these import packages.
1025+
without Hosting dependency, I've preferred these import packages.
10261026

10271027
```xml
10281028
<ItemGroup>
@@ -1106,7 +1106,7 @@ ConsoleApp.ServiceProvider = scope.ServiceProvider;
11061106
* `app.AddAllCommandType` -> `NotSupported`(use `Add<T>` manually)
11071107
* `[Option(int index)]` -> `[Argument]`
11081108
* `[Option(string shortName, string description)]` -> `Xml Document Comment`
1109-
* `ConsoleAppFilter.Order` -> `NotSupported`(global -> class -> method declrative order)
1109+
* `ConsoleAppFilter.Order` -> `NotSupported`(global -> class -> method declarative order)
11101110
* `ConsoleAppOptions.GlobalFilters` -> `app.UseFilter<T>`
11111111
* `ConsoleAppBase` -> inject `ConsoleAppContext`, `CancellationToken` to method
11121112

exclusion.dic

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
abcd
2+
abcde
3+
abcdefg
4+
aiueo
5+
appsettings
6+
args
7+
authed
8+
awaitable
9+
Awaiter
10+
Binded
11+
Clipr
12+
Cysharp
13+
Decr
14+
dest
15+
Equatable
16+
fooa
17+
foobarbaz
18+
generatortest
19+
hoge
20+
ignorecase
21+
Impl
22+
Incr
23+
Kabayaki
24+
Kokuban
25+
Lamda
26+
Moge
27+
nomsg
28+
nomunomu
29+
Numerics
30+
Parsable
31+
posix
32+
saas
33+
Spectre
34+
stackalloc
35+
stdout
36+
Tacommands
37+
tako
38+
takoyaki
39+
Withargs
40+
Yaki
41+
Zeroargs

sandbox/GeneratorSandbox/Filters.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ async Task<int> GetUserIdAsync()
5454
}
5555
}
5656

57-
record class ApplicationContext(Guid RequiestId, int UserId);
57+
record class ApplicationContext(Guid RequestId, int UserId);
5858

5959
internal class LogRunningTimeFilter(ConsoleAppFilter next) : ConsoleAppFilter(next)
6060
{

src/ConsoleAppFramework/ConsoleAppGenerator.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
1515
// Emit ConsoleApp.g.cs
1616
context.RegisterPostInitializationOutput(EmitConsoleAppTemplateSource);
1717

18-
// Emti ConfigureConfiguration/Logging/Services and Host.AsConsoleApp
18+
// Emit ConfigureConfiguration/Logging/Services and Host.AsConsoleApp
1919
var hasReferences = context.MetadataReferencesProvider
2020
.Collect()
2121
.Select((xs, _) =>
@@ -118,7 +118,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
118118
var isRunAsync = (node.Expression as MemberAccessExpressionSyntax)?.Name.Identifier.Text == "RunAsync";
119119

120120
var command = parser.ParseAndValidateForRun();
121-
return new CommanContext(command, isRunAsync, reporter, node);
121+
return new CommandContext(command, isRunAsync, reporter, node);
122122
})
123123
.WithTrackingName("ConsoleApp.Run.0_CreateSyntaxProvider"); // annotate for IncrementalGeneratorTest
124124

@@ -185,7 +185,7 @@ static void EmitConsoleAppTemplateSource(IncrementalGeneratorPostInitializationC
185185
context.AddSource("ConsoleApp.g.cs", ConsoleAppBaseCode.InitializationCode);
186186
}
187187

188-
static void EmitConsoleAppRun(SourceProductionContext sourceProductionContext, CommanContext commandContext)
188+
static void EmitConsoleAppRun(SourceProductionContext sourceProductionContext, CommandContext commandContext)
189189
{
190190
if (commandContext.DiagnosticReporter.HasDiagnostics)
191191
{
@@ -324,14 +324,14 @@ static void EmitConsoleAppConfigure(SourceProductionContext sourceProductionCont
324324
sourceProductionContext.AddSource("ConsoleApp.Builder.Configure.g.cs", sb.ToString());
325325
}
326326

327-
class CommanContext(Command? command, bool isAsync, DiagnosticReporter diagnosticReporter, InvocationExpressionSyntax node) : IEquatable<CommanContext>
327+
class CommandContext(Command? command, bool isAsync, DiagnosticReporter diagnosticReporter, InvocationExpressionSyntax node) : IEquatable<CommandContext>
328328
{
329329
public Command? Command => command;
330330
public DiagnosticReporter DiagnosticReporter => diagnosticReporter;
331331
public InvocationExpressionSyntax Node => node;
332332
public bool IsAsync => isAsync;
333333

334-
public bool Equals(CommanContext other)
334+
public bool Equals(CommandContext other)
335335
{
336336
// has diagnostics, always go to modified(don't cache)
337337
if (diagnosticReporter.HasDiagnostics || other.DiagnosticReporter.HasDiagnostics) return false;
@@ -396,7 +396,7 @@ public CollectBuilderContext(ConsoleAppFrameworkGeneratorOptions generatorOption
396396

397397
if (filter == null)
398398
{
399-
DiagnosticReporter.ReportDiagnostic(DiagnosticDescriptors.FilterMultipleConsturtor, genericType.GetLocation());
399+
DiagnosticReporter.ReportDiagnostic(DiagnosticDescriptors.FilterMultipleConstructor, genericType.GetLocation());
400400
return null!;
401401
}
402402

src/ConsoleAppFramework/DiagnosticDescriptors.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ public static DiagnosticDescriptor Create(int id, string title, string messageFo
9595
9,
9696
"ConsoleApp.Run does not allow the use of filters, but the function has a filter attribute.");
9797

98-
public static DiagnosticDescriptor FilterMultipleConsturtor { get; } = Create(
98+
public static DiagnosticDescriptor FilterMultipleConstructor { get; } = Create(
9999
10,
100100
"ConsoleAppFilter class does not allow multiple constructors.");
101101

102-
public static DiagnosticDescriptor ClassMultipleConsturtor { get; } = Create(
102+
public static DiagnosticDescriptor ClassMultipleConstructor { get; } = Create(
103103
11,
104104
"ConsoleAppBuilder.Add<T> class does not allow multiple constructors.");
105105

src/ConsoleAppFramework/Emitter.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -470,16 +470,16 @@ public void EmitBuilder(SourceBuilder sb, CommandWithId[] commandIds, bool emitS
470470
void EmitRunBody(ILookup<string, CommandWithId> groupedCommands, int depth, bool isRunAsync)
471471
{
472472
var leafCommand = groupedCommands[""].FirstOrDefault();
473-
IDisposable? ifBlcok = null;
473+
IDisposable? ifBlock = null;
474474
if (!(groupedCommands.Count == 1 && leafCommand != null))
475475
{
476-
ifBlcok = sb.BeginBlock($"if (args.Length == {depth})");
476+
ifBlock = sb.BeginBlock($"if (args.Length == {depth})");
477477
}
478478
EmitLeafCommand(leafCommand);
479-
if (ifBlcok != null)
479+
if (ifBlock != null)
480480
{
481481
sb.AppendLine("return;");
482-
ifBlcok.Dispose();
482+
ifBlock.Dispose();
483483
}
484484
else
485485
{

src/ConsoleAppFramework/Parser.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ internal class Parser(ConsoleAppFrameworkGeneratorOptions generatorOptions, Diag
2525

2626
public Command? ParseAndValidateForBuilderDelegateRegistration() // for ConsoleAppBuilder.Add
2727
{
28-
// Add(string commandName, Delgate command)
28+
// Add(string commandName, Delegate command)
2929
var args = (node as InvocationExpressionSyntax)!.ArgumentList.Arguments;
3030
if (args.Count == 2) // 0 = string command, 1 = lambda
3131
{
@@ -112,7 +112,7 @@ internal class Parser(ConsoleAppFrameworkGeneratorOptions generatorOptions, Diag
112112

113113
if (publicConstructors.Length != 1)
114114
{
115-
context.ReportDiagnostic(DiagnosticDescriptors.ClassMultipleConsturtor, node.GetLocation());
115+
context.ReportDiagnostic(DiagnosticDescriptors.ClassMultipleConstructor, node.GetLocation());
116116
return [];
117117
}
118118

@@ -128,7 +128,7 @@ internal class Parser(ConsoleAppFrameworkGeneratorOptions generatorOptions, Diag
128128

129129
if (filter == null)
130130
{
131-
context.ReportDiagnostic(DiagnosticDescriptors.FilterMultipleConsturtor, x.ApplicationSyntaxReference!.GetSyntax().GetLocation());
131+
context.ReportDiagnostic(DiagnosticDescriptors.FilterMultipleConstructor, x.ApplicationSyntaxReference!.GetSyntax().GetLocation());
132132
return null!;
133133
}
134134

@@ -146,7 +146,7 @@ internal class Parser(ConsoleAppFrameworkGeneratorOptions generatorOptions, Diag
146146
IsIDisposable = hasIDisposable,
147147
IsIAsyncDisposable = hasIAsyncDisposable,
148148
ConstructorParameterTypes = publicConstructors[0].Parameters.Select(x => new EquatableTypeSymbol(x.Type)).ToArray(),
149-
MethodName = "", // without methodname
149+
MethodName = "", // without method name
150150
};
151151

152152
return publicMethods
@@ -481,7 +481,7 @@ internal class Parser(ConsoleAppFrameworkGeneratorOptions generatorOptions, Diag
481481

482482
if (filter == null)
483483
{
484-
context.ReportDiagnostic(DiagnosticDescriptors.FilterMultipleConsturtor, x.ApplicationSyntaxReference!.GetSyntax().GetLocation());
484+
context.ReportDiagnostic(DiagnosticDescriptors.FilterMultipleConstructor, x.ApplicationSyntaxReference!.GetSyntax().GetLocation());
485485
return null!;
486486
}
487487

@@ -493,7 +493,7 @@ internal class Parser(ConsoleAppFrameworkGeneratorOptions generatorOptions, Diag
493493
return null;
494494
}
495495

496-
// validate parametersymbols
496+
// validate parameter symbols
497497
if (parameterDescriptions != null)
498498
{
499499
foreach (var item in parameterDescriptions)

src/ConsoleAppFramework/RoslynExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ public static Location Clone(this Location location)
9292
public static DocumentationCommentTriviaSyntax? GetDocumentationCommentTriviaSyntax(this SyntaxNode node)
9393
{
9494
// Hack note:
95-
// ISymbol.GetDocumentationCommtentXml requires<GenerateDocumentaionFile>true</>.
95+
// ISymbol.GetDocumentationCommentXml requires<GenerateDocumentationFile>true</>.
9696
// However, getting the DocumentationCommentTrivia of a SyntaxNode also requires the same condition.
97-
// It can only be obtained when DocumentationMode is Parse or Diagnostic, but when<GenerateDocumentaionFile>false</>,
97+
// It can only be obtained when DocumentationMode is Parse or Diagnostic, but when<GenerateDocumentationFile>false</>,
9898
// it becomes None, and the necessary Trivia cannot be obtained.
9999
// Therefore, we will attempt to reparse and retrieve it.
100100

tests/ConsoleAppFramework.GeneratorTests/ArrayPraseTest.cs renamed to tests/ConsoleAppFramework.GeneratorTests/ArrayParseTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace ConsoleAppFramework.GeneratorTests
44
{
5-
public class ArrayPraseTest(ITestOutputHelper output)
5+
public class ArrayParseTest(ITestOutputHelper output)
66
{
77
VerifyHelper verifier = new VerifyHelper(output, "CAF");
88

0 commit comments

Comments
 (0)