Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify rule S4663: Add support for C# and VB.NET #1513

Merged
merged 5 commits into from Jan 25, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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"
}
15 changes: 15 additions & 0 deletions rules/S4663/csharp/noncompliant.adoc
@@ -0,0 +1,15 @@
== Noncompliant Code Example

[source,text]
----
//

/*
*/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
*/
*/


///

/**
martin-strecker-sonarsource marked this conversation as resolved.
Show resolved Hide resolved
*/
martin-strecker-sonarsource marked this conversation as resolved.
Show resolved Hide resolved

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

----
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