Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some typos #7298

Merged
merged 1 commit into from Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
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