Skip to content

Commit 98e765f

Browse files
committed
Fix spelling errors in src folder
1 parent 51fd8dc commit 98e765f

File tree

101 files changed

+698
-627
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+698
-627
lines changed

.editorconfig

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ insert_final_newline = true
1111
indent_style = space
1212
indent_size = 4
1313
trim_trailing_whitespace = true
14+
spelling_exclusion_path = exclusion.dic
1415

1516
# JSON files
1617
[*.json]

Microsoft.TemplateEngine.sln

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
6262
.editorconfig = .editorconfig
6363
Directory.Build.props = Directory.Build.props
6464
Directory.Build.targets = Directory.Build.targets
65+
exclusion.dic = exclusion.dic
6566
EndProjectSection
6667
EndProject
6768
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{B794BF86-4185-4DCE-AC86-C27D5D966B9B}"

exclusion.dic

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
semver
2+
Infos
3+
nupkg
4+
nuget
5+
Langpacks
6+
templateengine
7+
constantine
8+
Lexographic
9+
noops
10+
balancednesting
11+
expandvariables
12+
dotnetcli
13+
Sdks
14+
maui
15+
nuspec
16+
mytemplate
17+
myoption
18+
myname
19+
othername
20+
templatecache
21+
firstrun
22+
netcoreapp
23+
netstandard
24+
doesn
25+
Installe
26+
templatestrings
27+
firefox
28+
sasl
29+
lockd
30+
amanda
31+
ndbpx
32+
msbuild
33+
Haml
34+
jsonld
35+
hjson
36+
geojson
37+
topojson
38+
bowerrc
39+
npmrc
40+
postcssrc
41+
babelrc
42+
csslintrc
43+
eslintrc
44+
lintrc
45+
jshintrc
46+
stylelintrc
47+
yarnrc
48+
cshtml
49+
vbhtml
50+
proj
51+
pubxml
52+
aspx
53+
vsixmanifest
54+
vsct
55+
axml
56+
plist
57+
resx
58+
axaml
59+
yaml
60+
Dockerfile
61+
gitattributes
62+
dockerignore
63+
gitignore
64+
Locs
65+
Globbing
66+
filelist
67+
Deserializer
68+
awaiter
69+
nupkgs

src/Microsoft.TemplateEngine.Abstractions/Components/IBindSymbolSource.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public interface IBindSymbolSource : IPrioritizedComponent
1818
public string DisplayName { get; }
1919

2020
/// <summary>
21-
/// Prefix that is used in binding to refernece the component.
21+
/// Prefix that is used in binding to reference the component.
2222
/// </summary>
2323
public string? SourcePrefix { get; }
2424

@@ -28,12 +28,12 @@ public interface IBindSymbolSource : IPrioritizedComponent
2828
public bool RequiresPrefixMatch { get; }
2929

3030
/// <summary>
31-
/// Gets the value corresponding to <paramref name="bindname"/>.
31+
/// Gets the value corresponding to <paramref name="bindName"/>.
3232
/// </summary>
3333
/// <param name="settings">template engine environment settings.</param>
34-
/// <param name="bindname">the value to retrieve (without prefix).</param>
34+
/// <param name="bindName">the value to retrieve (without prefix).</param>
3535
/// <param name="cancellationToken">cancellation token.</param>
3636
/// <returns></returns>
37-
public Task<string?> GetBoundValueAsync(IEngineEnvironmentSettings settings, string bindname, CancellationToken cancellationToken);
37+
public Task<string?> GetBoundValueAsync(IEngineEnvironmentSettings settings, string bindName, CancellationToken cancellationToken);
3838
}
3939
}

src/Microsoft.TemplateEngine.Abstractions/Constraints/TemplateConstraintInfo.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
namespace Microsoft.TemplateEngine.Abstractions.Constraints
77
{
88
/// <summary>
9-
/// Represents information about template constraint defintion in template cache <see cref="ITemplateInfo"/>.
9+
/// Represents information about template constraint definition in template cache <see cref="ITemplateInfo"/>.
1010
/// </summary>
1111
public class TemplateConstraintInfo
1212
{
1313
/// <summary>
14-
/// Creates instance of the clase.
14+
/// Creates instance of the class.
1515
/// </summary>
1616
/// <param name="type">Constraint type, matches the type defined in <see cref="ITemplateConstraint"/> implementation and template.json.</param>
1717
/// <param name="args">Arguments for constraint evaluation.</param>
@@ -33,7 +33,7 @@ public TemplateConstraintInfo(string type, string? args)
3333
public string Type { get; }
3434

3535
/// <summary>
36-
/// Gets the constraint argumens.
36+
/// Gets the constraint arguments.
3737
/// </summary>
3838
public string? Args { get; }
3939
}

src/Microsoft.TemplateEngine.Abstractions/PhysicalFileSystem/IPhysicalFileSystem.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public interface IPhysicalFileSystem
107107
/// Creates new <see cref="FileSystemWatcher"/> which monitors specified path and on any changes calls <paramref name="fileChanged"/> callback.
108108
/// To stop watching dispose returned object.
109109
/// </remarks>
110-
IDisposable WatchFileChanges(string filepath, FileSystemEventHandler fileChanged);
110+
IDisposable WatchFileChanges(string filePath, FileSystemEventHandler fileChanged);
111111

112112
/// <summary>
113113
/// Gets the last write time for the <paramref name="file"/> in UTC.
@@ -126,7 +126,7 @@ public interface IPhysicalFileSystem
126126
void SetLastWriteTimeUtc(string file, DateTime lastWriteTimeUtc);
127127

128128
/// <summary>
129-
/// If target is a subpath of relativeTo a relative bath from relativeTo to subpath will be returned.
129+
/// If target is a sub-path of relativeTo a relative bath from relativeTo to sub-path will be returned.
130130
/// </summary>
131131
/// <param name="target">Path to be converted to relative if possible.</param>
132132
/// <param name="relativeTo">Base of the relative path to be returned.</param>

src/Microsoft.TemplateEngine.Abstractions/PublicAPI.Shipped.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ Microsoft.TemplateEngine.Abstractions.PhysicalFileSystem.IPhysicalFileSystem.Rea
187187
Microsoft.TemplateEngine.Abstractions.PhysicalFileSystem.IPhysicalFileSystem.ReadAllText(string! path) -> string!
188188
Microsoft.TemplateEngine.Abstractions.PhysicalFileSystem.IPhysicalFileSystem.SetFileAttributes(string! file, System.IO.FileAttributes attributes) -> void
189189
Microsoft.TemplateEngine.Abstractions.PhysicalFileSystem.IPhysicalFileSystem.SetLastWriteTimeUtc(string! file, System.DateTime lastWriteTimeUtc) -> void
190-
Microsoft.TemplateEngine.Abstractions.PhysicalFileSystem.IPhysicalFileSystem.WatchFileChanges(string! filepath, System.IO.FileSystemEventHandler! fileChanged) -> System.IDisposable!
190+
Microsoft.TemplateEngine.Abstractions.PhysicalFileSystem.IPhysicalFileSystem.WatchFileChanges(string! filePath, System.IO.FileSystemEventHandler! fileChanged) -> System.IDisposable!
191191
Microsoft.TemplateEngine.Abstractions.PhysicalFileSystem.IPhysicalFileSystem.WriteAllText(string! path, string! value) -> void
192192
Microsoft.TemplateEngine.Abstractions.TemplateFiltering.ITemplateMatchInfo
193193
Microsoft.TemplateEngine.Abstractions.TemplateFiltering.ITemplateMatchInfo.AddMatchDisposition(Microsoft.TemplateEngine.Abstractions.TemplateFiltering.MatchInfo! newDisposition) -> void
@@ -232,7 +232,7 @@ const Microsoft.TemplateEngine.Abstractions.Installer.InstallerConstants.NuGetSo
232232
const Microsoft.TemplateEngine.Abstractions.TemplateFiltering.MatchInfo.BuiltIn.Constraint = "Constraint" -> string!
233233
Microsoft.TemplateEngine.Abstractions.Components.IBindSymbolSource
234234
Microsoft.TemplateEngine.Abstractions.Components.IBindSymbolSource.DisplayName.get -> string!
235-
Microsoft.TemplateEngine.Abstractions.Components.IBindSymbolSource.GetBoundValueAsync(Microsoft.TemplateEngine.Abstractions.IEngineEnvironmentSettings! settings, string! bindname, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<string?>!
235+
Microsoft.TemplateEngine.Abstractions.Components.IBindSymbolSource.GetBoundValueAsync(Microsoft.TemplateEngine.Abstractions.IEngineEnvironmentSettings! settings, string! bindName, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<string?>!
236236
Microsoft.TemplateEngine.Abstractions.Components.IBindSymbolSource.RequiresPrefixMatch.get -> bool
237237
Microsoft.TemplateEngine.Abstractions.Components.IBindSymbolSource.SourcePrefix.get -> string?
238238
Microsoft.TemplateEngine.Abstractions.Components.ISdkInfoProvider

src/Microsoft.TemplateEngine.Core.Contracts/IProcessorState.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public interface IProcessorState
4545
/// <param name="match">The token to find.</param>
4646
/// <param name="bufferLength">The length of the buffer after the token is found.</param>
4747
/// <param name="currentBufferPosition">The position in the buffer after the token is found.</param>
48-
/// <param name="consumeToken">True if token should be seeked through.</param>
48+
/// <param name="consumeToken">True if token should be sought through.</param>
4949
void SeekSourceForwardUntil(ITokenTrie match, ref int bufferLength, ref int currentBufferPosition, bool consumeToken = false);
5050

5151
/// <summary>
@@ -57,7 +57,7 @@ public interface IProcessorState
5757
/// Seeks target stream backwards until <paramref name="match"/> is found.
5858
/// </summary>
5959
/// <param name="match">The token to find.</param>
60-
/// <param name="consumeToken">True if token should be seeked through.</param>
60+
/// <param name="consumeToken">True if token should be sought through.</param>
6161
void SeekTargetBackUntil(ITokenTrie match, bool consumeToken = false);
6262

6363
/// <summary>

src/Microsoft.TemplateEngine.Core/Expressions/Converter.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ private class DoubleConverter : ConverterItem<double>
145145
{
146146
if (source is string s)
147147
{
148-
return ParserExtensions.DoubleTryParseСurrentOrInvariant(s, out result);
148+
return ParserExtensions.DoubleTryParseCurrentOrInvariant(s, out result);
149149
}
150150

151151
result = 0;

src/Microsoft.TemplateEngine.Core/Expressions/Cpp/CppStyleEvaluatorDefinition.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ private static bool EvaluateCondition(IReadOnlyList<TokenRef> tokens, IReadOnlyL
533533

534534
private static object? InferTypeAndConvertLiteral(string literal)
535535
{
536-
//A propertly quoted string must be...
536+
// A properly quoted string must be...
537537
// At least two characters long
538538
// Start and end with the same character
539539
// The character that the string starts with must be one of the supported quote kinds
@@ -556,7 +556,7 @@ private static bool EvaluateCondition(IReadOnlyList<TokenRef> tokens, IReadOnlyL
556556

557557
if ((literal.Contains(CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator)
558558
|| literal.Contains(CultureInfo.InvariantCulture.NumberFormat.NumberDecimalSeparator))
559-
&& ParserExtensions.DoubleTryParseСurrentOrInvariant(literal, out double literalDouble))
559+
&& ParserExtensions.DoubleTryParseCurrentOrInvariant(literal, out double literalDouble))
560560
{
561561
return literalDouble;
562562
}

src/Microsoft.TemplateEngine.Core/Expressions/Cpp2/Cpp2StyleEvaluatorDefinition.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ protected override ITokenTrie GetSymbols(IProcessorState processor)
113113
trie.AddToken(processor.Encoding.GetBytes("<<"));
114114
trie.AddToken(processor.Encoding.GetBytes(">>"));
115115

116-
//Maths
116+
//Math operators
117117
trie.AddToken(processor.Encoding.GetBytes("+"));
118118
trie.AddToken(processor.Encoding.GetBytes("-"));
119119
trie.AddToken(processor.Encoding.GetBytes("*"));

src/Microsoft.TemplateEngine.Core/Expressions/VisualBasic/VisualBasicStyleEvaluatorDefintion.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ protected override ITokenTrie GetSymbols(IProcessorState processor)
119119
trie.AddToken(processor.Encoding.GetBytes("<<"));
120120
trie.AddToken(processor.Encoding.GetBytes(">>"));
121121

122-
//Maths
122+
//Math operators
123123
trie.AddToken(processor.Encoding.GetBytes("+"));
124124
trie.AddToken(processor.Encoding.GetBytes("-"));
125125
trie.AddToken(processor.Encoding.GetBytes("*"));

src/Microsoft.TemplateEngine.Core/Operations/BalancedNesting.cs

+8-8
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ public IOperation GetOperation(Encoding encoding, IProcessorState processorState
4545
IToken realEndToken = _realEndToken.ToToken(encoding);
4646
IToken pseudoEndToken = _pseudoEndToken.ToToken(encoding);
4747

48-
return new Impl(startToken, realEndToken, pseudoEndToken, _id, _resetFlag, _initialState);
48+
return new Implementation(startToken, realEndToken, pseudoEndToken, _id, _resetFlag, _initialState);
4949
}
5050

51-
private class Impl : IOperation
51+
private class Implementation : IOperation
5252
{
5353
// the order they're added to this.Tokens in the constructor must be the same as this!
5454
private const int StartTokenIndex = 0;
@@ -57,19 +57,19 @@ private class Impl : IOperation
5757
private const int PseudoEndTokenIndex = 2;
5858
private readonly IToken _startToken;
5959
private readonly IToken _realEndToken;
60-
private readonly IToken _psuedoEndToken;
60+
private readonly IToken _pseudoEndToken;
6161
private readonly string? _id;
6262
private readonly string? _resetFlag;
6363
private int _depth;
6464

65-
public Impl(IToken start, IToken realEnd, IToken pseudoEnd, string? id, string? resetFlag, bool initialState)
65+
public Implementation(IToken start, IToken realEnd, IToken pseudoEnd, string? id, string? resetFlag, bool initialState)
6666
{
6767
_startToken = start;
6868
_realEndToken = realEnd;
69-
_psuedoEndToken = pseudoEnd;
69+
_pseudoEndToken = pseudoEnd;
7070
_id = id;
7171
_resetFlag = resetFlag;
72-
Tokens = new[] { _startToken, _realEndToken, _psuedoEndToken };
72+
Tokens = new[] { _startToken, _realEndToken, _pseudoEndToken };
7373
_depth = 0;
7474
IsInitialStateOn = string.IsNullOrEmpty(id) || initialState;
7575
}
@@ -83,7 +83,7 @@ public Impl(IToken start, IToken realEnd, IToken pseudoEnd, string? id, string?
8383
public int HandleMatch(IProcessorState processor, int bufferLength, ref int currentBufferPosition, int token)
8484
{
8585
// check if this operation has been reset. If so, set _depth = 0
86-
// this fixes the reset problem, but not the trailing unbalanced pseduo comment problem, i.e. it won't turn this:
86+
// this fixes the reset problem, but not the trailing unbalanced pseudo comment problem, i.e. it won't turn this:
8787
// <!-- <!-- comment -- >
8888
// into this:
8989
// <!-- <!-- comment -->
@@ -114,7 +114,7 @@ public int HandleMatch(IProcessorState processor, int bufferLength, ref int curr
114114
if (_depth == 0 && token == PseudoEndTokenIndex)
115115
{
116116
processor.WriteToTarget(_realEndToken.Value, _realEndToken.Start, _realEndToken.Length);
117-
return _psuedoEndToken.Length; // the source buffer needs to skip over this token.
117+
return _pseudoEndToken.Length; // the source buffer needs to skip over this token.
118118
}
119119
else
120120
{

src/Microsoft.TemplateEngine.Core/Operations/Conditional.cs

+9-9
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public Conditional(ConditionalTokens tokenVariants, bool wholeLine, bool trimWhi
5959
public ConditionalTokens Tokens => _tokens;
6060

6161
/// <summary>
62-
/// Returns the numner of elements in the longest of the token variant lists.
62+
/// Returns the number of elements in the longest of the token variant lists.
6363
/// </summary>
6464
private int LongestTokenVariantListSize
6565
{
@@ -94,7 +94,7 @@ public IOperation GetOperation(Encoding encoding, IProcessorState processorState
9494
AddTokensOfTypeToTokenListAndTrie(trie, tokens, Tokens.ActionableElseTokens, ElseTokenActionableBaseIndex, encoding);
9595
AddTokensOfTypeToTokenListAndTrie(trie, tokens, Tokens.ActionableElseIfTokens, ElseIfTokenActionableBaseIndex, encoding);
9696

97-
return new Impl(this, tokens, trie, _id, _initialState);
97+
return new Implementation(this, tokens, trie, _id, _initialState);
9898
}
9999

100100
/// <summary>
@@ -130,15 +130,15 @@ private void AddTokensOfTypeToTokenListAndTrie(ITokenTrie trie, List<IToken> tok
130130
}
131131
}
132132

133-
private class Impl : IOperation
133+
private class Implementation : IOperation
134134
{
135135
private readonly Conditional _definition;
136136
private readonly Stack<EvaluationState> _pendingCompletion = new Stack<EvaluationState>();
137137
private readonly ITokenTrie _trie;
138138
private readonly string? _id;
139139
private EvaluationState? _current;
140140

141-
public Impl(Conditional definition, IReadOnlyList<IToken> tokens, ITokenTrie trie, string? id, bool initialState)
141+
public Implementation(Conditional definition, IReadOnlyList<IToken> tokens, ITokenTrie trie, string? id, bool initialState)
142142
{
143143
_trie = trie;
144144
_definition = definition;
@@ -430,12 +430,12 @@ private bool SeekToToken(IProcessorState processor, ref int bufferLength, ref in
430430

431431
private class EvaluationState
432432
{
433-
private readonly Impl _impl;
433+
private readonly Implementation _implementation;
434434
private bool _branchTaken;
435435

436-
public EvaluationState(Impl impl)
436+
public EvaluationState(Implementation implementation)
437437
{
438-
_impl = impl;
438+
_implementation = implementation;
439439
ActionableOperationsEnabled = false;
440440
}
441441

@@ -451,15 +451,15 @@ public void ToggleActionableOperations(bool enabled, IProcessorState processor)
451451
{
452452
ActionableOperationsEnabled = enabled;
453453

454-
foreach (string otherOptionDisableFlag in _impl._definition.Tokens.ActionableOperations)
454+
foreach (string otherOptionDisableFlag in _implementation._definition.Tokens.ActionableOperations)
455455
{
456456
processor.Config.Flags[otherOptionDisableFlag] = enabled;
457457
}
458458
}
459459

460460
internal bool Evaluate(IProcessorState processor, ref int bufferLength, ref int currentBufferPosition)
461461
{
462-
BranchTaken = _impl._definition._evaluator(processor, ref bufferLength, ref currentBufferPosition, out bool faulted);
462+
BranchTaken = _implementation._definition._evaluator(processor, ref bufferLength, ref currentBufferPosition, out bool faulted);
463463
return BranchTaken;
464464
}
465465
}

src/Microsoft.TemplateEngine.Core/Operations/ExpandVariables.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ public ExpandVariables(string? id, bool initialState)
2424

2525
public IOperation GetOperation(Encoding encoding, IProcessorState processor)
2626
{
27-
return new Impl(processor, _id, _initialState);
27+
return new Implementation(processor, _id, _initialState);
2828
}
2929

30-
private class Impl : IOperation
30+
private class Implementation : IOperation
3131
{
3232
private readonly string? _id;
3333

34-
public Impl(IProcessorState processor, string? id, bool initialState)
34+
public Implementation(IProcessorState processor, string? id, bool initialState)
3535
{
3636
Tokens = processor.EncodingConfig.VariableKeys;
3737
_id = id;

src/Microsoft.TemplateEngine.Core/Operations/Include.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@ public IOperation GetOperation(Encoding encoding, IProcessorState processorState
4141
IToken endTokenBytes = EndToken.ToToken(encoding);
4242
TokenTrie endTokenMatcher = new TokenTrie();
4343
endTokenMatcher.AddToken(endTokenBytes);
44-
return new Impl(tokenBytes, endTokenMatcher, this, _id, _initialState);
44+
return new Implementation(tokenBytes, endTokenMatcher, this, _id, _initialState);
4545
}
4646

47-
private class Impl : IOperation
47+
private class Implementation : IOperation
4848
{
4949
private readonly Include _source;
5050
private readonly ITokenTrie _endTokenMatcher;
5151
private readonly string? _id;
5252

53-
public Impl(IToken token, ITokenTrie endTokenMatcher, Include source, string? id, bool initialState)
53+
public Implementation(IToken token, ITokenTrie endTokenMatcher, Include source, string? id, bool initialState)
5454
{
5555
Tokens = new[] { token };
5656
_source = source;

0 commit comments

Comments
 (0)