rspec/rules/S101/vbnet/rule.adoc
Fred Tingaud 51369b610e
Make sure that includes are always surrounded by empty lines (#2270)
When an include is not surrounded by empty lines, its content is inlined
on the same line as the adjacent content. That can lead to broken tags
and other display issues.
This PR fixes all such includes and introduces a validation step that
forbids introducing the same problem again.
2023-06-22 10:38:01 +02:00

66 lines
1.3 KiB
Plaintext

== Why is this an issue?
include::../description.adoc[]
The default configuration is the one recommended by Microsoft:
* Pascal casing, starting with an upper case character, e.g., `BackColor`
* Short abbreviations of 2 letters can be capitalized, e.g., `GetID`
* Longer abbreviations need to be lowercased, e.g., `GetHtml`
For example, with the default regular expression ``++^([A-Z]{1,3}[a-z0-9]+)*([A-Z]{2})?$++``, the class:
[source,vbnet]
----
Class foo ' Noncompliant
End Class
----
should be renamed to
[source,vbnet]
----
Class Foo
End Class
----
== Resources
=== Documentation
* https://learn.microsoft.com/en-us/dotnet/visual-basic/programming-guide/program-structure/naming-conventions[Visual Basic Naming Conventions]
* https://learn.microsoft.com/en-us/dotnet/standard/design-guidelines/capitalization-conventions[Microsoft Capitalization Conventions]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Rename this class to match the regular expression: "xxx".
=== Parameters
.format
****
_STRING_
----
^([A-Z]{1,3}[a-z0-9]+)*([A-Z]{2})?$
----
Regular expression used to check the class names against.
****
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]