Skip to content

Commit

Permalink
Modify rule S4663: Add support for C# and VB.NET (#1513)
Browse files Browse the repository at this point in the history
* Modify metadata for csharp

* Modify metadata for vbnet

* Fix some references

* Apply PR Review fixes

* Apply PR Review changes
  • Loading branch information
gregory-paidis-sonarsource committed Jan 25, 2023
1 parent 2097c8e commit 349708e
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 4 deletions.
1 change: 1 addition & 0 deletions rules/S4663/csharp/description.adoc
@@ -0,0 +1 @@
An empty comment is likely to be a mistake and doesn't help to improve the readability of the code. For these reasons, it should be removed.
2 changes: 1 addition & 1 deletion rules/S4663/csharp/metadata.json
@@ -1,3 +1,3 @@
{

"title": "Comments should not be empty"
}
14 changes: 14 additions & 0 deletions rules/S4663/csharp/noncompliant.adoc
@@ -0,0 +1,14 @@
== Noncompliant Code Example

[source,text]
----
//
/*
*/
///
/**
*/
----
5 changes: 4 additions & 1 deletion rules/S4663/csharp/rule.adoc
@@ -1,4 +1,7 @@
include::../rule.adoc[]
include::description.adoc[]

include::noncompliant.adoc[]

ifdef::env-github,rspecator-view[]

'''
Expand Down
1 change: 1 addition & 0 deletions rules/S4663/vbnet/description.adoc
@@ -0,0 +1 @@
An empty comment is likely to be a mistake and doesn't help to improve the readability of the code. For these reasons, it should be removed.
2 changes: 1 addition & 1 deletion rules/S4663/vbnet/metadata.json
@@ -1,3 +1,3 @@
{

"title": "Comments should not be empty"
}
8 changes: 8 additions & 0 deletions rules/S4663/vbnet/noncompliant.adoc
@@ -0,0 +1,8 @@
== Noncompliant Code Example

[source,text]
----
'
'''
----
5 changes: 4 additions & 1 deletion rules/S4663/vbnet/rule.adoc
@@ -1,4 +1,7 @@
include::../rule.adoc[]
include::description.adoc[]

include::noncompliant.adoc[]

ifdef::env-github,rspecator-view[]

'''
Expand Down

0 comments on commit 349708e

Please sign in to comment.