NoSingleSpaceAfterTripleSlash
@@ -61,6 +62,43 @@Description
This analyzer does not report diagnostics to the code, which includes
a line break inside the start/end tags of an XML element,
as long as a single space follows ///
.
Remarks
+It is not sufficient to write a ///
followed by a single whitespace character.
+More precisely, ///
must be followed by a single whitespace character followed
+by an XML Element (<element>…</element>
or <element … />
). If the XML
+element is long, it can be wrapped, but each wrapped line must begin with ///
+followed by one or more whitespace characters. The following is a conformance
+example:
/// <summary>Hello.</summary>
+/// <seealso cref="Good"/>
+public static void Good()
+{
+}
+
+/// <summary>Hello
+/// World.</summary>
+public static void GoodWithWrapping()
+{
+}
+
+The following is a nonconformance example:
+/// Hello <summary>World.</summary>
+/// See <seealso cref="Bad"/>
+public static void Bad()
+{
+}
+
+/// Hello.
+public static void BadWithNoElements()
+{
+}
+
+Before version 2.0.1, this analyzer issued diagnostics for Hello
and See
in
+Bad()
. The warning was “A single white space is needed after
+'///',” but a more appropriate warning should have been “Only one
+whitespace character should be placed between /// and the XML element.”
Even after version 2.0.1, StrayText analyzer reports Bad()
and
+BadWithNoElements()
instead of this analyzer.
Code fix
The code fix provides an option inserting a single space after ///
,
or replacing two or more spaces after ///
with a single space.
@@ -150,10 +188,10 @@
Code fix
Code fix
Code fix
Code fix
NoReferences
NoReferences
NoCode fix
NoReferences
NoReferences
NoCode fix
NoCode fix
NoCode fix
NoReferences
NoReferences
NoRemarks
NoReferences
NoDiagnostic
NoReferences
NoDiagnostic
NoDiagnostic
NoRelease Notes
@@ -42,11 +43,11 @@Release Notes
### Requirements to run -- Visual Studio 2022 (17.9.6) or .NET 8 (SDK 8.0.204) +- Visual Studio 2022 (17.10.5) or .NET 8 (SDK 8.0.303) ### Requirements to build -- Visual Studio 2022 (17.9.6) or .NET 8 (SDK 8.0.204) +- Visual Studio 2022 (17.10.5) or .NET 8 (SDK 8.0.303) ### New ### Removed @@ -56,6 +57,34 @@Release Notes
--- --> +2.0.1 (2024-08-14)
+Fix NoSingleSpaceAfterTripleSlash analyzer
+Requirements to run
+-
+
- Visual Studio 2022 (17.10.5) or .NET 8 (SDK 8.0.303) +
Requirements to build
+-
+
- Visual Studio 2022 (17.10.5) or .NET 8 (SDK 8.0.303) +
Changed
+-
+
-
+
Fix NoSingleSpaceAfterTripleSlash analyzer not to issue diagnostics when +there are characters that start with a whitespace character and contain a +non-whitespace character between
+///
and an XML element, as in the following +code:
+/// Hello <summary>World.</summary> +/// See <seealso cref="Bad"/> +public static void Bad() +{ +} +
Note that StrayText analyzer still issues diagnostics against the
+Hello
+andSee
in the example.
+
2.0.0 (2024-05-17)
C# 12 Support and New Enhancements
Requirements to run
@@ -69,17 +98,17 @@Requirements to build
New
- Handle C# 12 source codes -
- Add NoSpaceAfterBrace and -NoSpaceBeforeBrace analyzers -
- EqualsNull analyzers provides a new option of Code Fix to -replace: +
- Add NoSpaceAfterBrace and NoSpaceBeforeBrace analyzers +
- EqualsNull analyzers provides a new option of Code Fix to replace:
-
-
… != null
or… != null
with the property pattern… is {}
or!(… is {})
+… != null
or… != null
with the property pattern… is {}
or +!(… is {})
- - IsNull analyzers provides a new option of Code Fix to replace: +
- IsNull analyzers provides a new option of Code Fix to replace:
-
-
!(… is null)
or… is null
with the property pattern… is {}
or!(… is {})
+!(… is null)
or… is null
with the property pattern… is {}
or +!(… is {})
Changed
Fixed
- Fix warnings -
- Fix SingleTypeParameter analyzer to ignore the -following cases: +
- Fix SingleTypeParameter analyzer to ignore the following cases:
-
-
- The type name is
T
and it has one type parameter (e.g.,public class T<U> …
)
+ - The type name is
T
and it has one type parameter (e.g., +public class T<U> …
) - The type
T
is already contained in the type or member
@@ -126,11 +155,9 @@ - The type name is
- Add UninitializedLocalVariable analyzer. See -the description -for details. +the description for details.
- Add NotOneShotInitialization analyzer. See -the description -for details. +the description for details.
Requirements to build
New
1.0.26 (2020-06-16)
@@ -145,8 +172,9 @@Requirements to build
New
-
-
- Add StrayText analyzer. See the description for details. -
- Add StinkyBooleanExpression analyzer. See the description for details. +
- Add StrayText analyzer. See the description for details. +
- Add StinkyBooleanExpression analyzer. See +the description for details.
Fixed
-
@@ -168,8 +196,8 @@
Fixed
Changed
-
-
- Fix NoSingleSpaceAfterTripleSlash analyzer to emit the diagnostics whose location
-is just after '
///
'.
+ - Fix NoSingleSpaceAfterTripleSlash analyzer to emit the diagnostics whose
+location is just after '
///
'.
1.0.25 (2020-03-28)
@@ -246,8 +274,10 @@Requirements to build
New
-
-
- Add NoSingleSpaceAfterTripleSlash analyzer and code fix provider. See the description for details. -
- Add NoDocumentation analyzer. See the description for details. +
- Add NoSingleSpaceAfterTripleSlash analyzer and code fix provider. See +the description for details. +
- Add NoDocumentation analyzer. See the description for +details.
Changed
-
@@ -255,8 +285,10 @@
Changed
Fixed
-
-
- Fix DiscardingReturnValue analyzer and IneffectiveReadByte code fix provider to be built on the Linux platform. -
- Fix EmptyArrayCreation, EqualsNull and IsNull analyzers to be in the Refactoring category. +
- Fix DiscardingReturnValue analyzer and IneffectiveReadByte code fix provider +to be built on the Linux platform. +
- Fix EmptyArrayCreation, EqualsNull and IsNull analyzers to be in the +Refactoring category.
1.0.22 (2019-04-07)
@@ -271,11 +303,12 @@Requirements to build
New
-
-
- Add ByteOrderMark analyzer. See the description for details. +
- Add ByteOrderMark analyzer. See the description for details.
Changed
-
-
- Remove StyleChecker.Annotations and Maroontress.Oxbind from the source tree. Instead, integrate them with NuGet. +
- Remove StyleChecker.Annotations and Maroontress.Oxbind from the source tree. +Instead, integrate them with NuGet.
Fixed
-
@@ -296,17 +329,23 @@
Requirements to build
New
-
-
- Add EqualsNull analyzer. See the description for details. -
- Add IsNull analyzer. See the description for details. +
- Add EqualsNull analyzer. See the description for details. +
- Add IsNull analyzer. See the description for details.
Changed
-
-
- Fix UnnecessaryUsing analyzer to count more classes:
System.IO.StringReader
,System.IO.StringWriter
andSystem.IO.UnmanagedMemoryAccessor
.
+ - Fix UnnecessaryUsing analyzer to count more classes:
System.IO.StringReader
, +System.IO.StringWriter
andSystem.IO.UnmanagedMemoryAccessor
.
Fixed
-
-
- Fix bugs of RedundantTypedArrayCreation, PostIncrement, EmptyArrayCreation, IneffectiveReadByte, StaticGenericClass, TypeClassParameter and UnnecessaryUsing code fix providers to work in some cases. For example, the EmptyArrayCreation code fix provider is fixed to work if there is an empty array creation as an argument. -
- Fix bugs of TypeClassParameter analyzer to count the
typeof
operator with the operand that isstatic
class.
+ - Fix bugs of RedundantTypedArrayCreation, PostIncrement, EmptyArrayCreation, +IneffectiveReadByte, StaticGenericClass, TypeClassParameter and +UnnecessaryUsing code fix providers to work in some cases. For example, the +EmptyArrayCreation code fix provider is fixed to work if there is an empty +array creation as an argument. +
- Fix bugs of TypeClassParameter analyzer to count the
typeof
operator with +the operand that isstatic
class.
1.0.20 (2019-02-19)
@@ -321,8 +360,8 @@Requirements to build
New
-
-
- Add RedundantTypedArrayCreation analyzer. See the description for details. -
- Add EmptyArrayCreation analyzer. See the description for details. +
- Add RedundantTypedArrayCreation analyzer. See the description for details. +
- Add EmptyArrayCreation analyzer. See the description for details.
1.0.19 (2019-02-03)
@@ -337,7 +376,8 @@Requirements to build
New
-
-
- Add TypeClassParameter analyzer. See the description for details. +
- Add TypeClassParameter analyzer. See the description for +details.
1.0.18 (2019-01-18)
@@ -353,20 +393,25 @@Requirements to build
New
-
-
- Fix ThoughtlessName analyzer to report identifiers not allowed to use which are specified with the configuration file. -
- Fix DiscardingReturnValue analyzer to report the methods discarding the return value which are specified with the configuration file. +
- Fix ThoughtlessName analyzer to report identifiers not allowed to use which +are specified with the configuration file. +
- Fix DiscardingReturnValue analyzer to report the methods discarding the return +value which are specified with the configuration file.
- Add the help link URI to each analyzer.
- Fix the NuGet package to contain
readme.txt
and some documents. - Merge Oxbind.CSharp 1.0.0.
Changed
-
-
- Rename NoSpaceBeforeSemicolon and SpaceAfterSemicolon analyzer to SpaceBeforeSemicolon and NoSpaceAfterSemicolon, respectively. -
- Change the schema of the configuration file
StyleChecker.xml
. See README.md for details.
+ - Rename NoSpaceBeforeSemicolon and SpaceAfterSemicolon analyzer to +SpaceBeforeSemicolon and NoSpaceAfterSemicolon, respectively. +
- Change the schema of the configuration file
StyleChecker.xml
. See +README.md for details.
Fixed
-
-
- Fix UnusedVariable and ThoughtlessName analyzers throwing
InvalidOperationException
with message 'Sequence contains no elements'.
+ - Fix UnusedVariable and ThoughtlessName analyzers throwing
+
InvalidOperationException
with message 'Sequence contains no elements'.
1.0.17 (2018-12-09)
@@ -381,7 +426,8 @@Requirements to build
Fixed
-
-
- Fix the bugs of UnusedVariable and ThoughtlessName analyzer throwing an exception when they handle
catch
clauses without an exception variable.
+ - Fix the bugs of UnusedVariable and ThoughtlessName analyzer throwing an
+exception when they handle
catch
clauses without an exception variable.
1.0.16 (2018-11-30)
@@ -396,8 +442,10 @@Requirements to build
Fixed
-
-
- Fix the bugs of UnnecessaryUsing and ThoughtlessName analyzer throwing an exception when used with verbatim identifiers. -
- Fix ThoughtlessName analyzer to count parameters, out-var, pattern matching,
catch
andforeach
.
+ - Fix the bugs of UnnecessaryUsing and ThoughtlessName analyzer throwing an +exception when used with verbatim identifiers. +
- Fix ThoughtlessName analyzer to count parameters, out-var, pattern matching,
+
catch
andforeach
. - Fix UnusedVariable analyzer to handle
catch
andforeach
.
@@ -414,8 +462,13 @@
Requirements to build
New
- Add NotDesignedForExtension analyzer. -
- Fix DiscardingReturnValue analyzer to count more methods. The added methods are of immutable types (e.g.
string
,Type
,ImmutableArray
and so on). See the description for details.
- - Fix DiscardingReturnValue analyzer to count the methods whose return value is annotated with the
DoNotIgnoreAttribute
. Note that the attribute is provided with the NuGet package StyleChecker.Annotations .
+ - Fix DiscardingReturnValue analyzer to count more methods. The added methods
+are of immutable types (e.g.
string
,Type
,ImmutableArray
and so on). +See the description for details.
+ - Fix DiscardingReturnValue analyzer to count the methods whose return value is
+annotated with the
DoNotIgnoreAttribute
. Note that the attribute is provided +with the NuGet package +StyleChecker.Annotations .
Changed
-
@@ -428,15 +481,20 @@
Changed
Fixed
-
-
- Fix AssignmentToParameter analyzer to report that a local variable passed by value if it is as follows: +
- Fix AssignmentToParameter analyzer to report that a local variable passed by
+value if it is as follows:
- incremented or decremented with the unary operator (i.e.
++
or--
) - passed to a method as a
ref
orout
parameter.
- - incremented or decremented with the unary operator (i.e.
- Fix UnusedVariable analyzer to handle a verbatim identifier, that is a variable name starting with the special character '
@
'.
- - Fix IneffectiveReadByte analyzer throwing exceptions if the integer constant uses binary literals or digit separators, or if it cannot be represented with
int
.
- - Fix Underscore CodeFix provider to handle the identifier that contains only an underscore character. +
- Fix UnusedVariable analyzer to handle a verbatim identifier, that is a
+variable name starting with the special character '
@
'.
+ - Fix IneffectiveReadByte analyzer throwing exceptions if the integer constant
+uses binary literals or digit separators, or if it cannot be represented with
+
int
.
+ - Fix Underscore CodeFix provider to handle the identifier that contains only an +underscore character.
1.0.14 (2018-11-03)
@@ -463,9 +521,13 @@Fixed
virtual
empty methodsUnusedAttribute
. Note that the attribute is provided with the NuGet package StyleChecker.UnusedAttribute
if the annotation is not necessary.catch
or foreach
.UnusedAttribute
. Note that the attribute is provided with the NuGet package
+StyleChecker.UnusedAttribute
if the annotation is not necessary.catch
or foreach
.1.0.13 (2018-10-31)
@@ -510,13 +572,18 @@Requirements to build
Changed
-
-
- Fix UnnecessaryUsing CodeFix provider to keep
SyntaxTrivia
s around theusing
statement to be removed.
- - Fix IneffectiveReadByte CodeFix provider to enclose the CodeFix with a block statement. +
- Fix UnnecessaryUsing CodeFix provider to keep
SyntaxTrivia
s around the +using
statement to be removed.
+ - Fix IneffectiveReadByte CodeFix provider to enclose the CodeFix with a block +statement.
Fixed
-
-
- Fix IneffectiveReadByte analyzer to count parameters as well as local variables. -
- Fix bugs that IneffectiveReadByte analyzer throws NPE when the variable declaration of the
for
statement has no initializer, when thefor
statement has no declaration, or when thefor
statement has no condition.
+ - Fix IneffectiveReadByte analyzer to count parameters as well as local +variables. +
- Fix bugs that IneffectiveReadByte analyzer throws NPE when the variable
+declaration of the
for
statement has no initializer, when thefor
+statement has no declaration, or when thefor
statement has no condition.
1.0.10 (2018-10-21)
@@ -591,7 +658,8 @@Requirements to build
New
- Add SingleTypeParameter analyzer. -
- Add StaticGenericClass analyzer. Note that this analyzer is under development so that the CodeFix provider doesn't fix referencing codes. +
- Add StaticGenericClass analyzer. Note that this analyzer is under development +so that the CodeFix provider doesn't fix referencing codes.
- Add the document of the InvalidConfig analyzer.
@@ -608,7 +676,8 @@
Requirements to build
New
- Add UnusedUsing analyzer again. -
- Add InvalidConfig analyzer. It reports errors of the configuration file
StyleChecker.xml
.
+ - Add InvalidConfig analyzer. It reports errors of the configuration file
+
StyleChecker.xml
.
Changed
-
@@ -616,11 +685,17 @@
Changed
Fixed
-
-
- Fix the following warning, with changing the target framework to
netstandard1.3
.
-
Fix the following warning, with changing the target framework to
+netstandard1.3
.
-+... depends on 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' but it was not found. Analyzers may not run correctly unless the missing assembly is added as an analyzer reference as well.
+... depends on 'netstandard, Version=2.0.0.0, Culture=neutral, +PublicKeyToken=cc7b13ffcd2ddd51' but it was not found. Analyzers may not run +correctly unless the missing assembly is added as an analyzer reference as +well.
1.0.5 (2018-09-02)
Remove UnusedUsing analyzer.
@@ -659,7 +734,8 @@New
Changed
-
-
- Fix Underscore analyzer to count Out Variable Declarations, local functions, and parameters. +
- Fix Underscore analyzer to count Out Variable Declarations, local functions, +and parameters.
Fixed
-
@@ -678,13 +754,18 @@
Requirements to build
New
-
-
- Add NoSpaceBeforeSemicolon and SpaceAfterSemicolon analyzers. They point out spacing around a semicolon, especially in
for
statements. The stylefor (;;)
of an infinitefor
loop is allowed. Note that this rule is intended to replace SA1002.
+ - Add NoSpaceBeforeSemicolon and SpaceAfterSemicolon analyzers. They point out
+spacing around a semicolon, especially in
for
statements. The style +for (;;)
of an infinitefor
loop is allowed. Note that this rule is +intended to replace SA1002. - Add documents like README, COPYRIGHT, and so on. -
- Add a way to configure analyzers with the file
StyleChecker.xml
in the project root.
+ - Add a way to configure analyzers with the file
StyleChecker.xml
in the +project root.
Changed
-
-
- Fix the LongLine analyzer to read the maximum line length from the file
StyleChecker.xml
.
+ - Fix the LongLine analyzer to read the maximum line length from the file
+
StyleChecker.xml
.
Changed
-
@@ -704,7 +785,9 @@
Requirements to build
New
-
-
- Add the PostIncrement analyzer (with code fix provider). It points out post-increment/decrement operators (e.g.
i++
) if they can be replaced with pre-increment/decrement ones.
+ - Add the PostIncrement analyzer (with code fix provider). It points out
+post-increment/decrement operators (e.g.
i++
) if they can be replaced with +pre-increment/decrement ones.
1.0.1 (2018-07-24)
@@ -734,8 +817,10 @@Requirements to build
New
-
-
- Add the LongLine analyzer. It points out the line equal or over 80 columns. Note that it ignores multi-line comments and XML documentation comments. -
- Add the Underscore analyzer (with code fix provider). It points out an underscore character included in the identifier of local variables. +
- Add the LongLine analyzer. It points out the line equal or over 80 columns. +Note that it ignores multi-line comments and XML documentation comments. +
- Add the Underscore analyzer (with code fix provider). It points out an +underscore character included in the identifier of local variables.