diff --git a/StyleChecker/StyleChecker.Test/Framework/Belief.cs b/StyleChecker/StyleChecker.Test/Framework/Belief.cs index e87d9dcf..30b3c22d 100644 --- a/StyleChecker/StyleChecker.Test/Framework/Belief.cs +++ b/StyleChecker/StyleChecker.Test/Framework/Belief.cs @@ -111,8 +111,8 @@ public Result ToResult( /// The new result. /// public Result ToResult( - string id, - string message, + string id, + string message, DiagnosticSeverity serverity = DiagnosticSeverity.Warning) => new Result(SingleLocation(), id, message, serverity); diff --git a/StyleChecker/StyleChecker.Test/Framework/BeliefExtractor.cs b/StyleChecker/StyleChecker.Test/Framework/BeliefExtractor.cs index ca62a730..42cc3a6c 100644 --- a/StyleChecker/StyleChecker.Test/Framework/BeliefExtractor.cs +++ b/StyleChecker/StyleChecker.Test/Framework/BeliefExtractor.cs @@ -9,6 +9,9 @@ namespace StyleChecker.Test.Framework using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.CodeAnalysis.Text; + /// + /// Extracts s embedded in a C# source code. + /// [DiagnosticAnalyzer(LanguageNames.CSharp)] public sealed class BeliefExtractor : DiagnosticAnalyzer { diff --git a/StyleChecker/StyleChecker.Test/Framework/CompilationException.cs b/StyleChecker/StyleChecker.Test/Framework/CompilationException.cs index bd12d0c3..c6bf6e41 100644 --- a/StyleChecker/StyleChecker.Test/Framework/CompilationException.cs +++ b/StyleChecker/StyleChecker.Test/Framework/CompilationException.cs @@ -18,7 +18,7 @@ public class CompilationException : Exception /// The error message. /// /// - /// The diagnostics of the compiler. + /// The raw diagnostics of the compiler. /// public CompilationException( string message, @@ -26,20 +26,45 @@ public CompilationException( : base(message) => RawDiagnostics = rawDiagnostics; + /// + /// Initializes a new instance of the class. + /// public CompilationException() { } + /// + /// Initializes a new instance of the class. + /// + /// + /// The message that describes the error. + /// public CompilationException(string message) : base(message) { } + /// + /// Initializes a new instance of the class. + /// + /// + /// The error message that explains the reason for the exception. + /// + /// + /// The exception that is the cause of the current exception, or a null + /// reference if no inner exception is specified. + /// public CompilationException(string message, Exception innerException) : base(message, innerException) { } + /// + /// Gets the raw diagnostics of the compiler. + /// public ImmutableArray RawDiagnostics { get; } } } diff --git a/StyleChecker/StyleChecker.Test/Framework/DiagnosticVerifier.cs b/StyleChecker/StyleChecker.Test/Framework/DiagnosticVerifier.cs index 51bebfc1..9dc04329 100644 --- a/StyleChecker/StyleChecker.Test/Framework/DiagnosticVerifier.cs +++ b/StyleChecker/StyleChecker.Test/Framework/DiagnosticVerifier.cs @@ -255,6 +255,9 @@ protected void VerifyDiagnostic( /// /// The analyzer that was being run on the sources. /// + /// + /// The compilation environment. + /// /// /// Diagnostic Results that should have appeared in the code. /// @@ -361,6 +364,9 @@ void AssertOne( /// /// The analyzer that was being run on the sources. /// + /// + /// The compilation environment. + /// /// /// The diagnostic that was found in the code. /// @@ -426,6 +432,9 @@ string Message() => FormatDiagnostics( /// /// The analyzer that this verifier tests. /// + /// + /// The compilation environment. + /// /// /// The Diagnostics to be formatted. /// diff --git a/StyleChecker/StyleChecker.Test/Refactoring/TypeClassParameter/Code.cs b/StyleChecker/StyleChecker.Test/Refactoring/TypeClassParameter/Code.cs index 3d340ef9..9317c9de 100644 --- a/StyleChecker/StyleChecker.Test/Refactoring/TypeClassParameter/Code.cs +++ b/StyleChecker/StyleChecker.Test/Refactoring/TypeClassParameter/Code.cs @@ -71,5 +71,13 @@ public void CallWithIntType() PrintMethodExpression(typeof(int)); PrintGenericsMethod(typeof(int)); } + + public void CallWithTypeParameter() + { + PrintMethod(typeof(T)); + PrintMethodExpression(typeof(T)); + PrintGenericsMethod(typeof(T)); + PrintGenericsMethod(typeof(T)); + } } } diff --git a/StyleChecker/StyleChecker.Test/Refactoring/TypeClassParameter/CodeFix.cs b/StyleChecker/StyleChecker.Test/Refactoring/TypeClassParameter/CodeFix.cs index 65d100eb..cddc2aca 100644 --- a/StyleChecker/StyleChecker.Test/Refactoring/TypeClassParameter/CodeFix.cs +++ b/StyleChecker/StyleChecker.Test/Refactoring/TypeClassParameter/CodeFix.cs @@ -77,5 +77,13 @@ public void CallWithIntType() PrintMethodExpression(); PrintGenericsMethod(); } + + public void CallWithTypeParameter() + { + PrintMethod(); + PrintMethodExpression(); + PrintGenericsMethod(); + PrintGenericsMethod(); + } } } diff --git a/doc/rules/IsNull.md b/doc/rules/IsNull.md index 0230b810..d7b05ada 100644 --- a/doc/rules/IsNull.md +++ b/doc/rules/IsNull.md @@ -22,7 +22,7 @@ The code fix provides an option replacing expression `... is null` and Replacing the expression `... is null` with `... == null`, as well as replacing `!(... is null)` with `... != null`, can be a breaking change. For more information, refer to -[the description of EqualsNull code fix](../EqualsNull.md#Remarks). +[the description of EqualsNull code fix](EqualsNull.md#Remarks). ## Example