From 22d5a77f4fde0d33fe40f57e73ef1e479b8fed30 Mon Sep 17 00:00:00 2001 From: Gregory Paidis Date: Tue, 24 Jan 2023 13:08:26 +0100 Subject: [PATCH 1/5] Modify metadata for csharp --- rules/S4663/csharp/description.adoc | 1 + rules/S4663/csharp/metadata.json | 2 +- rules/S4663/csharp/noncompliant.adoc | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 rules/S4663/csharp/description.adoc create mode 100644 rules/S4663/csharp/noncompliant.adoc diff --git a/rules/S4663/csharp/description.adoc b/rules/S4663/csharp/description.adoc new file mode 100644 index 00000000000..5306cf4c6dc --- /dev/null +++ b/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. diff --git a/rules/S4663/csharp/metadata.json b/rules/S4663/csharp/metadata.json index 17971333806..568184229d1 100644 --- a/rules/S4663/csharp/metadata.json +++ b/rules/S4663/csharp/metadata.json @@ -1,3 +1,3 @@ { - + "title": "Comments should not be empty" } diff --git a/rules/S4663/csharp/noncompliant.adoc b/rules/S4663/csharp/noncompliant.adoc new file mode 100644 index 00000000000..f099d78001e --- /dev/null +++ b/rules/S4663/csharp/noncompliant.adoc @@ -0,0 +1,16 @@ +== Noncompliant Code Example + +[source,text] +---- +// + +/// + +/** + + */ + +/* + + */ +---- From 088c2e85bf36e95f0725f6e716037742b873cfa6 Mon Sep 17 00:00:00 2001 From: Gregory Paidis Date: Tue, 24 Jan 2023 13:11:40 +0100 Subject: [PATCH 2/5] Modify metadata for vbnet --- rules/S4663/vbnet/description.adoc | 1 + rules/S4663/vbnet/metadata.json | 2 +- rules/S4663/vbnet/noncompliant.adoc | 8 ++++++++ 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 rules/S4663/vbnet/description.adoc create mode 100644 rules/S4663/vbnet/noncompliant.adoc diff --git a/rules/S4663/vbnet/description.adoc b/rules/S4663/vbnet/description.adoc new file mode 100644 index 00000000000..5306cf4c6dc --- /dev/null +++ b/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. diff --git a/rules/S4663/vbnet/metadata.json b/rules/S4663/vbnet/metadata.json index 17971333806..568184229d1 100644 --- a/rules/S4663/vbnet/metadata.json +++ b/rules/S4663/vbnet/metadata.json @@ -1,3 +1,3 @@ { - + "title": "Comments should not be empty" } diff --git a/rules/S4663/vbnet/noncompliant.adoc b/rules/S4663/vbnet/noncompliant.adoc new file mode 100644 index 00000000000..092053e3bcb --- /dev/null +++ b/rules/S4663/vbnet/noncompliant.adoc @@ -0,0 +1,8 @@ +== Noncompliant Code Example + +[source,text] +---- +' + +''' +---- From bd6922dc919eaaf3db527c261b1146ced4cf95b5 Mon Sep 17 00:00:00 2001 From: Gregory Paidis Date: Tue, 24 Jan 2023 13:30:54 +0100 Subject: [PATCH 3/5] Fix some references --- rules/S4663/csharp/rule.adoc | 5 ++++- rules/S4663/vbnet/rule.adoc | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/rules/S4663/csharp/rule.adoc b/rules/S4663/csharp/rule.adoc index 79d6542388c..32b432746fd 100644 --- a/rules/S4663/csharp/rule.adoc +++ b/rules/S4663/csharp/rule.adoc @@ -1,4 +1,7 @@ -include::../rule.adoc[] +include::description.adoc[] + +include::noncompliant.adoc[] + ifdef::env-github,rspecator-view[] ''' diff --git a/rules/S4663/vbnet/rule.adoc b/rules/S4663/vbnet/rule.adoc index 79d6542388c..32b432746fd 100644 --- a/rules/S4663/vbnet/rule.adoc +++ b/rules/S4663/vbnet/rule.adoc @@ -1,4 +1,7 @@ -include::../rule.adoc[] +include::description.adoc[] + +include::noncompliant.adoc[] + ifdef::env-github,rspecator-view[] ''' From 40e58e26f88b08f459fbac1da7fbe3bf0e73af3b Mon Sep 17 00:00:00 2001 From: Gregory Paidis Date: Tue, 24 Jan 2023 17:26:11 +0100 Subject: [PATCH 4/5] Apply PR Review fixes --- rules/S4663/csharp/noncompliant.adoc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/rules/S4663/csharp/noncompliant.adoc b/rules/S4663/csharp/noncompliant.adoc index f099d78001e..87e1486fbd1 100644 --- a/rules/S4663/csharp/noncompliant.adoc +++ b/rules/S4663/csharp/noncompliant.adoc @@ -4,13 +4,12 @@ ---- // +/* + */ + /// /** - */ -/* - - */ ---- From cfea2183a1603e388e9e691da7454d30f1cefde4 Mon Sep 17 00:00:00 2001 From: Gregory Paidis Date: Wed, 25 Jan 2023 15:24:20 +0100 Subject: [PATCH 5/5] Apply PR Review changes --- rules/S4663/csharp/noncompliant.adoc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rules/S4663/csharp/noncompliant.adoc b/rules/S4663/csharp/noncompliant.adoc index 87e1486fbd1..e2a6740e594 100644 --- a/rules/S4663/csharp/noncompliant.adoc +++ b/rules/S4663/csharp/noncompliant.adoc @@ -5,11 +5,10 @@ // /* - */ +*/ /// /** - */ - +*/ ----