Skip to content

Commit

Permalink
Fix some typos
Browse files Browse the repository at this point in the history
  • Loading branch information
raulsntos committed Apr 18, 2024
1 parent b07c100 commit a647f3a
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
Expand Up @@ -130,7 +130,7 @@ private static void ReportDiagnostic(SymbolAnalysisContext context, INamedTypeSy
ImmutableDictionary<string, string?>.Builder builder = ImmutableDictionary.CreateBuilder<string, string?>();
builder.Add("Signature", missingCtorSignature.ToString());

//create dignostic and store signature into diagnostic property for fixer
//create diagnostic and store signature into diagnostic property for fixer
Diagnostic diagnostic = namedTypeSymbol.Locations.CreateDiagnostic(MissingConstructorRule, builder.ToImmutableDictionary(), namedTypeSymbol.Name, constructorSignature);

//report diagnostic
Expand Down
Expand Up @@ -89,7 +89,7 @@ public static bool IsValidImplicitConversion([NotNullWhen(true)] IOperation? ope
}

/// <summary>
/// Check if the operation is deferred type and also it is a collecton enumerated by a for each loop.
/// Check if the operation is deferred type and also it is a collection enumerated by a for each loop.
/// </summary>
public static bool IsOperationEnumeratedByForEachLoop(
IOperation operation,
Expand Down Expand Up @@ -399,7 +399,7 @@ public static bool IsLinqChainInvocation(IInvocationOperation invocationOperatio
foreach (var method in methods)
{
// Usually there are two overloads for these methods, like ToImmutableArray,
// it has two overloads, one convert from ImmutableArray.Builder and one covert from IEnumerable<T>
// it has two overloads, one convert from ImmutableArray.Builder and one convert from IEnumerable<T>
// and we only want the last one
if (method is IMethodSymbol { Parameters: { Length: > 0 } parameters, IsExtensionMethod: true } methodSymbol
&& parameters[0].Type.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T)
Expand Down
Expand Up @@ -96,7 +96,7 @@ internal class GlobalFlowStateDictionaryAnalysis : ForwardDataFlowAnalysis<

protected override GlobalFlowStateDictionaryAnalysisResult ToResult(GlobalFlowStateDictionaryAnalysisContext analysisContext, GlobalFlowStateDictionaryAnalysisResult dataFlowAnalysisResult)
{
// Use the global values map. Drop the per-operation inforamation
// Use the global values map. Drop the per-operation information
var operationVisitor = (GlobalFlowStateDictionaryFlowOperationVisitor)OperationVisitor;
return dataFlowAnalysisResult.With(operationVisitor.GetGlobalValuesMap());
}
Expand Down
Expand Up @@ -2021,7 +2021,7 @@ static Versions NormalizeAttribute(Versions attributes)
attributes.SupportedFirst = null;
}
}
// For deny list UnsupportedSecond should only set if there is SupportedFirst verison between UnsupportedSecond and UnsupportedFirst
// For deny list UnsupportedSecond should only set if there is SupportedFirst version between UnsupportedSecond and UnsupportedFirst
else if (attributes.SupportedFirst == null ||
(attributes.UnsupportedSecond != null &&
attributes.SupportedFirst > attributes.UnsupportedSecond))
Expand Down
Expand Up @@ -46,7 +46,7 @@ internal class SetHttpOnlyForHttpCookie : DiagnosticAnalyzer
});

// If HttpOnly is set explicitly, the callbacks of OperationKind.SimpleAssignment can cover that case.
// Otherwise, using PropertySetAnalysis to cover the case where HttpCookie object is returned without initializing or assgining HttpOnly property.
// Otherwise, using PropertySetAnalysis to cover the case where HttpCookie object is returned without initializing or assigning HttpOnly property.
private static readonly PropertyMapperCollection PropertyMappers = new(
new PropertyMapper(
"HttpOnly",
Expand Down
Expand Up @@ -164,7 +164,7 @@ private class XmlReaderSettingsEnvironment
internal bool IsSecureResolver { get; set; }
internal bool IsConstructedInCodeBlock { get; set; }

// this constructor is used for keep track of XmlReaderSettings craeted in the code block
// this constructor is used for keep track of XmlReaderSettings created in the code block
internal XmlReaderSettingsEnvironment(bool isTargetFrameworkSecure)
{
IsConstructedInCodeBlock = true;
Expand Down
Expand Up @@ -7,7 +7,7 @@ Because we inject the source of `PerformanceSensitiveAttribute` into projects re

One way to resolve this issue is setting `GeneratePerformanceSensitiveAttribute` property to true in the project at the root of your IVT tree, and false otherwise.

For example, given the dependecy graph below, if project A has IVT for project B, and project C has IVT for project D and project E. You need to set `GeneratePerformanceSensitiveAttribute` to true in A and C, and false in B, D and E.
For example, given the dependency graph below, if project A has IVT for project B, and project C has IVT for project D and project E. You need to set `GeneratePerformanceSensitiveAttribute` to true in A and C, and false in B, D and E.

```text
A
Expand Down
Expand Up @@ -8,7 +8,7 @@ public partial class CopyAnalysis : ForwardDataFlowAnalysis<CopyAnalysisData, Co
{
/// <summary>
/// Predicate kind for <see cref="CopyDataFlowOperationVisitor.SetAbstractValue(CopyAnalysisData, AnalysisEntity, CopyAbstractValue, System.Func{AnalysisEntity, CopyAbstractValue}, SetCopyAbstractValuePredicateKind?, bool)"/>
/// to indicte if the copy equality check for the SetAbstractValue call is a reference compare or a value compare operation.
/// to indicate if the copy equality check for the SetAbstractValue call is a reference compare or a value compare operation.
/// </summary>
internal enum SetCopyAbstractValuePredicateKind
{
Expand Down
Expand Up @@ -312,7 +312,7 @@ private void ProcessRegularInvocationOrCreation(IMethodSymbol? targetMethod, Imm
!targetMethod.IsExternallyVisible() &&
TryGetInterproceduralAnalysisResult(operation, out var invokedMethodAnalysisResult))
{
// Check if this private/interal method that has hazardous usages of non-validated argument.
// Check if this private/internal method that has hazardous usages of non-validated argument.
Debug.Assert(!targetMethod.IsVirtual && !targetMethod.IsOverride);

var hazardousParameterUsagesInInvokedMethod = invokedMethodAnalysisResult.HazardousParameterUsages;
Expand Down
2 changes: 1 addition & 1 deletion src/Utilities/Refactoring/AbstractRefactoringHelpers`3.cs
Expand Up @@ -225,7 +225,7 @@ static bool IsAEqualOrSubclassOfB(Type a, Type b)
return locationLine.IsEmptyOrWhitespace();
}

// On hte same line. This position is acceptable.
// On the same line. This position is acceptable.
return true;
}
}
Expand Down

0 comments on commit a647f3a

Please sign in to comment.