From a2241c39a3e45dbd6636cc41af04cc4f45fd4f4a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 12 Mar 2024 14:53:36 +0100 Subject: [PATCH] Modify rule S100: add language JCL (#3723) * Add jcl to rule S100 * Provide JCL details * Address review comment --------- Co-authored-by: rudy-regazzoni-sonarsource Co-authored-by: Rudy Regazzoni <110470341+rudy-regazzoni-sonarsource@users.noreply.github.com> --- rules/S100/jcl/metadata.json | 3 +++ rules/S100/jcl/rule.adoc | 36 ++++++++++++++++++++++++++++++++++++ rules/S100/message.adoc | 2 +- 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 rules/S100/jcl/metadata.json create mode 100644 rules/S100/jcl/rule.adoc diff --git a/rules/S100/jcl/metadata.json b/rules/S100/jcl/metadata.json new file mode 100644 index 0000000000..76bc286efd --- /dev/null +++ b/rules/S100/jcl/metadata.json @@ -0,0 +1,3 @@ +{ + "title": "Procedure names should comply with a naming convention" +} \ No newline at end of file diff --git a/rules/S100/jcl/rule.adoc b/rules/S100/jcl/rule.adoc new file mode 100644 index 0000000000..c81f51b090 --- /dev/null +++ b/rules/S100/jcl/rule.adoc @@ -0,0 +1,36 @@ +== Why is this an issue? + +Shared naming conventions allow teams to collaborate efficiently. + +This rule raises an issue when a procedure name does not match a provided regular expression. + +For example, with the default provided regular expression ``++^[A-Z][A-Z0-9]*$++``, the procedure: + +[source,jcl] +---- +//* Noncompliant +//$PROC1 PROC +---- + +should be renamed to + +[source,jcl] +---- +//PROC1 PROC +---- + +ifdef::env-github,rspecator-view[] + +''' +== Implementation Specification +(visible only on this page) + +include::../message.adoc[] + +''' +== Comments And Links +(visible only on this page) + +include::../comments-and-links.adoc[] + +endif::env-github,rspecator-view[] diff --git a/rules/S100/message.adoc b/rules/S100/message.adoc index c1006b34f3..2f3efe0a4b 100644 --- a/rules/S100/message.adoc +++ b/rules/S100/message.adoc @@ -1,4 +1,4 @@ === Message -Rename [method|function|subroutine] "XXXX" to match the regular expression ${format}. +Rename [method|function|subroutine|procedure] "XXXX" to match the regular expression ${format}.