Skip to content
This repository was archived by the owner on Jun 30, 2023. It is now read-only.
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix typos in comments
  • Loading branch information
stakx committed Jan 22, 2018
commit 2cd7e3cd5d1d4f042b97e323fe70e7225ea6a289
2 changes: 1 addition & 1 deletion src/Moq/Moq.Sdk/Behavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public Behavior(InvokeBehavior invoke, string displayName)
/// delegate and friendly display name.
/// </summary>
/// <remarks>
/// Use this constructor overload whenver constructing the display
/// Use this constructor overload whenever constructing the display
/// name is somewhat expensive.
/// </remarks>
public Behavior(InvokeBehavior invoke, Lazy<string> displayName)
Expand Down
2 changes: 1 addition & 1 deletion src/Moq/Moq.Sdk/IMockFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public interface IMockFactory
/// <param name="baseType">The base type (or main interface) of the mock.</param>
/// <param name="implementedInterfaces">Additional interfaces implemented by the mock, or an empty array.</param>
/// <param name="construtorArguments">
/// Contructor arguments if the <paramref name="baseType" /> is a class, rather than an interface, or an empty array.
/// Constructor arguments if the <paramref name="baseType" /> is a class, rather than an interface, or an empty array.
/// </param>
/// <returns>A mock that implements <see cref="IMocked"/> in addition to the specified interfaces (if any).</returns>
object CreateMock(Assembly mocksAssembly, Type baseType, Type[] implementedInterfaces, object[] construtorArguments);
Expand Down
2 changes: 1 addition & 1 deletion src/Moq/Moq.Sdk/MockContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static class MockContext
/// <summary>
/// The last invocation on the mock, turned into an <see cref="IMockSetup"/>
/// ready for use together with the <see cref="IMock.BehaviorFor(IMockSetup)"/>
/// method to locate the maching <see cref="IMockBehavior"/> to add new behaviors
/// method to locate the matching <see cref="IMockBehavior"/> to add new behaviors
/// when a matching invocation is performed.
/// </summary>
/// <remarks>
Expand Down
2 changes: 1 addition & 1 deletion src/Moq/Moq/CallbackExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ static TResult Callback<TResult>(this TResult target, Action<IArgumentCollection

// If there is already a behavior wrap it instead,
// so we can do a callback after even if it's a
// shortcircuiting one like Returns.
// short-circuiting one like Returns.
if (behavior.Behaviors.Count > 0)
{
var wrapped = behavior.Behaviors.Pop();
Expand Down
2 changes: 1 addition & 1 deletion src/Moq/Moq/ReturnsBehavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Moq
{
/// <summary>
/// A custom behavior for returning values, so that
/// the actual value to return can be replaced on succesive
/// the actual value to return can be replaced on successive
/// <see cref="ReturnsExtension"/> method calls.
/// </summary>
[DebuggerDisplay("{DebuggerValue}", Name = "Returns", Type = nameof(ReturnsBehavior))]
Expand Down
4 changes: 2 additions & 2 deletions src/Moq/Moq/ReturnsExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ static TResult Returns<TResult>(Delegate value, InvokeBehavior behavior)
var setup = MockContext.CurrentSetup;
if (setup != null)
{
// TODO: Is this even necessary given that intellisense gives us
// the rigth compiler safety already?
// TODO: Is this even necessary given that IntelliSense gives us
// the right compiler safety already?
setup.Invocation.EnsureCompatible(value);

var mock = ((IMocked)setup.Invocation.Target).Mock;
Expand Down
2 changes: 1 addition & 1 deletion src/Stunts/Stunts.Analyzer/DiagnosticsExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static class DiagnosticsExtensions
};

/// <summary>
/// Gets the diangostics that represent build errors that happen when generated
/// Gets the diagnostics that represent build errors that happen when generated
/// code is out of date.
/// </summary>
public static Diagnostic[] GetCompilationErrors(this Compilation compilation)
Expand Down
6 changes: 3 additions & 3 deletions src/Stunts/Stunts.Analyzer/StuntGeneratorAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ protected StuntGeneratorAnalyzer(NamingConvention naming, Type generatorAttribut
public virtual DiagnosticDescriptor OutdatedDiagnostic => StuntDiagnostics.OutdatedStunt;

/// <summary>
/// Returns the single <see cref="MissingDiagnostic"/> this analyer supports.
/// Returns the single <see cref="MissingDiagnostic"/> this analyzer supports.
/// </summary>
public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
{
// NOTE: this creates the return value at this point because both Missing and Outdated
// descriptors can be overriden as a customization point.
// descriptors can be overridden as a customization point.
get { return ImmutableArray.Create(MissingDiagnostic, OutdatedDiagnostic); }
}

Expand All @@ -74,7 +74,7 @@ void AnalyzeSyntaxNode(SyntaxNodeAnalysisContext context)
var generator = context.Compilation.GetTypeByMetadataName(generatorAttribute.FullName);
if (generator == null)
// This may be an extender authoring error, but another analyzer should ensure proper
// metadata references exist. Typically, the same nuget package that adds this analyzer
// metadata references exist. Typically, the same NuGet package that adds this analyzer
// also adds the required assembly references, so this should never happen anyway.
return;

Expand Down
6 changes: 3 additions & 3 deletions src/Stunts/Stunts.Analyzer/UnsupportedNestedTypeAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Stunts
/// the <see cref="StuntGeneratorAttribute"/> and reports unsupported nested types for
/// codegen.
/// </summary>
// TODO: this is a stop-gap meassure until we can figure out why the ImplementInterfaces codefix
// TODO: this is a stop-gap measure until we can figure out why the ImplementInterfaces codefix
// is not returning any code actions for the CSharpScaffold (maybe VB too?) when the type to
// be implemented is a nested interface :(. In the IDE, the code action is properly available after
// generating the (non-working, since the interface isn't implemented) mock class.
Expand Down Expand Up @@ -58,7 +58,7 @@ protected UnsupportedNestedTypeAnalyzer(NamingConvention naming, Type generatorA
}

/// <summary>
/// Returns the single descriptor this analyer supports.
/// Returns the single descriptor this analyzer supports.
/// </summary>
public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(descriptor);

Expand All @@ -77,7 +77,7 @@ void AnalyzeSyntaxNode(SyntaxNodeAnalysisContext context)
var generator = context.Compilation.GetTypeByMetadataName(generatorAttribute.FullName);
if (generator == null)
// This may be an extender authoring error, but another analyzer should ensure proper
// metadata references exist. Typically, the same nuget package that adds this analyzer
// metadata references exist. Typically, the same NuGet package that adds this analyzer
// also adds the required assembly references, so this should never happen anyway.
return;

Expand Down
2 changes: 1 addition & 1 deletion src/Stunts/Stunts.Analyzer/ValidateTypesAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ protected ValidateTypesAnalyzer(Type generatorAttribute)

/// <summary>
/// Returns the single <see cref="StuntDiagnostics.BaseTypeNotFirst"/>
/// diagnostic this analyer supports.
/// diagnostic this analyzer supports.
/// </summary>
public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; }
= ImmutableArray.Create(
Expand Down
2 changes: 1 addition & 1 deletion src/Stunts/Stunts.Sdk/ProcessorPhase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public enum ProcessorPhase

/// <summary>
/// Final phase that allows generators to perform additional generation beyond scaffold
/// and inital stunt rewriting. Members generated in this phase are not rewritten at all
/// and initial stunt rewriting. Members generated in this phase are not rewritten at all
/// to use the <see cref="BehaviorPipeline"/> and can consist of language-specific fixups
/// or cleanups to make the generated code more idiomatic than the default code fixes may
/// provide.
Expand Down
2 changes: 1 addition & 1 deletion src/Stunts/Stunts.Sdk/Processors/DefaultImports.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class DefaultImports : IDocumentProcessor
public DefaultImports() : this(DefaultNamespaces) { }

/// <summary>
/// Initializes the default imports a specific set of namespaces to add.
/// Initializes the default imports with a specific set of namespaces to add.
/// </summary>
public DefaultImports(params string[] namespaces) => this.namespaces = namespaces;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace Stunts.Processors
{
/// <summary>
/// Language angnosti helper methods for code generation.
/// Language agnostic helper methods for code generation.
/// </summary>
static class SyntaxGeneratorExtensions
{
Expand Down
4 changes: 2 additions & 2 deletions src/Stunts/Stunts.Sdk/StuntGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ public StuntGenerator(NamingConvention naming, IEnumerable<IDocumentProcessor> p
public async Task<Document> ApplyProcessors(Document document, CancellationToken cancellationToken)
{
#if DEBUG
// While debugging the geneneration itself, don't let the cancellation timeouts
// from tests to cause this to fail.
// While debugging the generation itself, don't let the cancellation timeouts
// from tests cause this to fail.
if (Debugger.IsAttached)
cancellationToken = CancellationToken.None;
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/Stunts/Stunts/BehaviorPipeline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public BehaviorPipeline()
/// <param name="invocation">Input to the method call.</param>
/// <param name="target">The ultimate target of the call.</param>
/// <param name="throwOnException">Whether to throw the <see cref="IMethodReturn.Exception"/> if it has a value after running
/// the beaviors.</param>
/// the behaviors.</param>
/// <returns>Return value from the pipeline.</returns>
public IMethodReturn Invoke(IMethodInvocation invocation, InvokeBehavior target, bool throwOnException = false)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Stunts/Stunts/IStuntFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public interface IStuntFactory
/// <param name="baseType">The base type (or main interface) of the stunt.</param>
/// <param name="implementedInterfaces">Additional interfaces implemented by the stunt, or an empty array.</param>
/// <param name="construtorArguments">
/// Contructor arguments if the <paramref name="baseType" /> is a class, rather than an interface, or an empty array.
/// Constructor arguments if the <paramref name="baseType" /> is a class, rather than an interface, or an empty array.
/// </param>
/// <returns>A stunt that implements <see cref="IStunt"/> in addition to the specified interfaces (if any).</returns>
object CreateStunt(Assembly stuntsAssembly, Type baseType, Type[] implementedInterfaces, object[] construtorArguments);
Expand Down
6 changes: 3 additions & 3 deletions src/Stunts/Stunts/StuntExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static IStunt AddBehavior(this IStunt stunt, IStuntBehavior behavior)
public static TStunt AddBehavior<TStunt>(this TStunt stunt, InvokeBehavior behavior, AppliesTo appliesTo = null, string name = null)
{
// We can't just add a constraint to the method signature, because
// proxies are typically geneated and don't expose the IProxy interface directly.
// proxies are typically generated and don't expose the IProxy interface directly.
if (stunt is IStunt target)
target.Behaviors.Add(StuntBehavior.Create(behavior, appliesTo, name));
else
Expand Down Expand Up @@ -74,7 +74,7 @@ public static IStunt InsertBehavior(this IStunt stunt, int index, IStuntBehavior
}

/// <summary>
/// Inserts a behavior into the stunt behasvior pipeline at the specified
/// Inserts a behavior into the stunt behavior pipeline at the specified
/// index.
/// </summary>
public static TStunt InsertBehavior<TStunt>(this TStunt stunt, int index, InvokeBehavior behavior, AppliesTo appliesTo = null, string name = null)
Expand All @@ -88,7 +88,7 @@ public static TStunt InsertBehavior<TStunt>(this TStunt stunt, int index, Invoke
}

/// <summary>
/// Inserts a behavior into the stunt behasvior pipeline at the specified
/// Inserts a behavior into the stunt behavior pipeline at the specified
/// index.
/// </summary>
public static TStunt InsertBehavior<TStunt>(this TStunt stunt, int index, IStuntBehavior behavior)
Expand Down
2 changes: 1 addition & 1 deletion src/build/Version.targets
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ AssemblyVersion=$(AssemblyVersion)" />
<!-- $(ExcludeRestorePackageImports)==true when invoking /t:Restore -->
<Target Name="SetVersion" BeforeTargets="Build;GetPackageVersion;_IntrospectProjectProperties" DependsOnTargets="GitVersion" Condition="'$(ExcludeRestorePackageImports)' != 'true'">
<PropertyGroup>
<!-- PR builds are *always* prerelease -->
<!-- PR builds are *always* pre-release -->
<!-- TFS case: BUILD_REASON=PullRequest and BUILD_SOURCEBRANCH=refs/pull/#/merge -->
<GitSemVerDashLabel Condition="'$(TF_BUILD)' == 'true' and '$(BUILD_REASON)' == 'PullRequest'">$(GitSemVerDashLabel)-pr$(BUILD_SOURCEBRANCH.Substring(10).TrimEnd('/merge'))</GitSemVerDashLabel>
<GitSemVerDashLabel Condition="'$(APPVEYOR_PULL_REQUEST_NUMBER)' != ''">$(GitSemVerDashLabel)-pr$(APPVEYOR_PULL_REQUEST_NUMBER)</GitSemVerDashLabel>
Expand Down