-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create rule S6940: Positional parameters must precede keyword paramet…
…ers (#3738) * Create rule S6940 * Put jcl spec * Address review comment --------- Co-authored-by: rudy-regazzoni-sonarsource <[email protected]> Co-authored-by: Rudy Regazzoni <[email protected]>
- Loading branch information
1 parent
c8fc3ff
commit a1eebc5
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"title": "Positional parameters must precede keyword parameters", | ||
"type": "BUG", | ||
"status": "ready", | ||
"remediation": { | ||
"func": "Constant\/Issue", | ||
"constantCost": "5min" | ||
}, | ||
"tags": [ | ||
], | ||
"defaultSeverity": "Critical", | ||
"ruleSpecification": "RSPEC-6940", | ||
"sqKey": "S6940", | ||
"scope": "All", | ||
"defaultQualityProfiles": ["Sonar way"], | ||
"quickfix": "unknown", | ||
"code": { | ||
"impacts": { | ||
"RELIABILITY": "HIGH" | ||
}, | ||
"attribute": "LOGICAL" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Positional parameters must be specified before any keyword parameters. | ||
|
||
== Why is this an issue? | ||
|
||
JCL requires positional parameters to be specified before any keyword parameters. Having keyword parameters defined before a positional parameter will trigger a JCL error. | ||
|
||
== How to fix it | ||
|
||
=== Code examples | ||
|
||
==== Noncompliant code example | ||
|
||
[source,jcl,diff-id=1,diff-type=noncompliant] | ||
---- | ||
//MYJOB JOB CLASS=X,'TRIGGER' | ||
---- | ||
|
||
==== Compliant solution | ||
|
||
[source,text,diff-id=1,diff-type=compliant] | ||
---- | ||
//MYJOB JOB 'TRIGGER',CLASS=X | ||
---- | ||
|
||
== Resources | ||
|
||
=== Documentation | ||
|
||
* https://www.ibm.com/docs/en/zos/3.1.0?topic=messages-iefc006i[IBM Reference - IEFC006I] | ||
* https://www.ibm.com/docs/en/zos/3.1.0?topic=fields-parameter-field[IBM Reference - Parameter field] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
} |