Enables noMacroIfInOpenCode and promotes it to "error". Open-code %if is a SAS 9.4M5 feature, so the 19 sites it found in nine files were hiding a version requirement the codebase does not document (the requirements page says 9.4M3). Each is rewritten so the construct no longer appears in open code: - Six blocks become a small macro called unconditionally, which is where the conditional then lives: drop_cas_tables (demodata), add_derived_cols (getdata), build_sasdata4 (getdata test 4), drop_derived (stagedata), build_staged (getrawdata), and one per option in the 20261003 migration. - Four blocks in the two makedata STPs get the same treatment: check_outfmt, check_keepme, emit_response and self_destruct. Their `call symputx` writes are now explicit about the global symbol table, because a %let or a plain symput inside a wrapper would be local to it. - Two guards in stagedata and getrawdata are removed rather than wrapped: the SQL only selects into a list that is already %let blank, and with no derived variables it returns no rows, so the guard was doing nothing. The trailing drop keeps a conditional, now in a macro and tested with %trim, since a zero-row select can leave a single blank in the variable. - validatefilter's two %let branches become one data step with call symputx, which writes to the global table the later %mp_filterstore reads. Verified: `npm run lint:sas` clean with the rule as an error; `sasjs compile` succeeds; on sas.4gl.io the full suite passes 64/64, including the derived variable tests in getdata test 4, stagedata tests 3 and 4 and validatefilter, which are the paths these wrappers touch.
51 lines
1.3 KiB
Plaintext
51 lines
1.3 KiB
Plaintext
{
|
|
"noTrailingSpaces": true,
|
|
"noEncodedPasswords": true,
|
|
"hasDoxygenHeader": true,
|
|
"noSpacesInFileNames": true,
|
|
"lowerCaseFileNames": true,
|
|
"maxLineLength": 80,
|
|
"noTabIndentation": true,
|
|
"indentationMultiple": 2,
|
|
"hasMacroNameInMend": true,
|
|
"noNestedMacros": true,
|
|
"hasMacroParentheses": true,
|
|
"strictMacroDefinition": true,
|
|
"noSingleAsteriskComments": true,
|
|
"noUnusedLibnames": true,
|
|
"lineEndings": "lf",
|
|
"ignoredMacros": [
|
|
"webout",
|
|
"mpeinit",
|
|
"mpeterm"
|
|
],
|
|
"ignoreList": [
|
|
"sasjs/scratch"
|
|
],
|
|
"severityLevel": {
|
|
"hasDoxygenHeader": "error",
|
|
"hasMacroNameInMend": "error",
|
|
"hasMacroParentheses": "error",
|
|
"indentationMultiple": "error",
|
|
"lineEndings": "error",
|
|
"lowerCaseFileNames": "error",
|
|
"lowerCaseMacroNames": "error",
|
|
"maxLineLength": "error",
|
|
"minMacroNameLength": "error",
|
|
"noBannedStrings": "error",
|
|
"noGremlins": "error",
|
|
"noNestedCommentsInHeader": "error",
|
|
"noNestedMacros": "error",
|
|
"noSingleAsteriskComments": "error",
|
|
"noSpacesInFileNames": "error",
|
|
"noTabIndentation": "error",
|
|
"noTrailingSpaces": "error",
|
|
"noUndeclaredMacros": "error",
|
|
"noUnusedLibnames": "error",
|
|
"noUnusedMacros": "error",
|
|
"strictMacroDefinition": "error",
|
|
"noMacroIfInOpenCode": "error"
|
|
},
|
|
"noMacroIfInOpenCode": true
|
|
}
|