1
0
mirror of https://github.com/sasjs/core.git synced 2025-12-11 06:24:35 +00:00

fix: adding mend to every macro statement using sasjs lint fix

This commit is contained in:
Allan Bowe
2021-06-21 17:25:01 +03:00
parent 32a6d15c2e
commit d7371a4505
123 changed files with 245 additions and 337 deletions

View File

@@ -2,7 +2,7 @@
"noTrailingSpaces": true, "noTrailingSpaces": true,
"noEncodedPasswords": true, "noEncodedPasswords": true,
"hasDoxygenHeader": true, "hasDoxygenHeader": true,
"hasMacroNameInMend": false, "hasMacroNameInMend": true,
"hasMacroParentheses": true, "hasMacroParentheses": true,
"noNestedMacros": false, "noNestedMacros": false,
"noSpacesInFileNames": true, "noSpacesInFileNames": true,

336
all.sas

File diff suppressed because it is too large Load Diff

View File

@@ -42,6 +42,6 @@
-1 -1
%put &sysmacroname: &feature not found; %put &sysmacroname: &feature not found;
%end; %end;
%mend; %mend mf_existfeature;
/** @endcond */ /** @endcond */

View File

@@ -24,4 +24,4 @@
0 0
%end; %end;
%mend; %mend mf_existfileref;

View File

@@ -30,6 +30,6 @@
%let rc=%sysfunc(close(&dsid)); %let rc=%sysfunc(close(&dsid));
%end; %end;
%mend; %mend mf_existvar;
/** @endcond */ /** @endcond */

View File

@@ -54,6 +54,6 @@
0 0
%put Vars not found: &found; %put Vars not found: &found;
%end; %end;
%mend; %mend mf_existvarlist;
/** @endcond */ /** @endcond */

View File

@@ -31,4 +31,4 @@
%sysfunc(attrc(&dsid,&attr)) %sysfunc(attrc(&dsid,&attr))
%let rc=%sysfunc(close(&dsid)); %let rc=%sysfunc(close(&dsid));
%end; %end;
%mend; %mend mf_getattrc;

View File

@@ -31,4 +31,4 @@
%sysfunc(attrn(&dsid,&attr)) %sysfunc(attrn(&dsid,&attr))
%let rc=%sysfunc(close(&dsid)); %let rc=%sysfunc(close(&dsid));
%end; %end;
%mend; %mend mf_getattrn;

View File

@@ -48,6 +48,6 @@
&engine &engine
%mend; %mend mf_getengine;
/** @endcond */ /** @endcond */

View File

@@ -44,4 +44,4 @@
%sysfunc(INPUTN(&bytes, best.),sizekmg.) %sysfunc(INPUTN(&bytes, best.),sizekmg.)
%end; %end;
%mend ; %mend mf_getfilesize ;

View File

@@ -29,4 +29,4 @@
&valc &valc
%end; %end;
%else %put %str(ERR)OR: Unable to find key &key in ds &libds; %else %put %str(ERR)OR: Unable to find key &key in ds &libds;
%mend; %mend mf_getkeyvalue;

View File

@@ -62,4 +62,4 @@
%else %if &switch=VIYARESTAPI %then %do; %else %if &switch=VIYARESTAPI %then %do;
%mf_trimstr(%sysfunc(getoption(servicesbaseurl)),/) %mf_trimstr(%sysfunc(getoption(servicesbaseurl)),/)
%end; %end;
%mend; %mend mf_getplatform;

View File

@@ -50,4 +50,4 @@
&buffer &buffer
%mend; %mend mf_getquotedstr;

View File

@@ -38,6 +38,6 @@
&schema &schema
%mend; %mend mf_getschema;
/** @endcond */ /** @endcond */

View File

@@ -34,4 +34,4 @@
%end; %end;
%end; %end;
%put unable to find available fileref in range &prefix.0-&maxtries; %put unable to find available fileref in range &prefix.0-&maxtries;
%mend; %mend mf_getuniquefileref;

View File

@@ -37,4 +37,4 @@
%end; %end;
%end; %end;
%put unable to find available libref in range &prefix.0-&maxtries; %put unable to find available libref in range &prefix.0-&maxtries;
%mend; %mend mf_getuniquelibref;

View File

@@ -39,4 +39,4 @@
%quote(&user) %quote(&user)
%mend; %mend mf_getuser;

View File

@@ -30,4 +30,4 @@
%trim(&&&variable) %trim(&&&variable)
%end; %end;
%mend; %mend mf_getvalue;

View File

@@ -29,4 +29,4 @@
%let rc=%sysfunc(close(&dsid)); %let rc=%sysfunc(close(&dsid));
%end; %end;
&nvars &nvars
%mend; %mend mf_getvarcount;

View File

@@ -49,4 +49,4 @@
%let rc = %sysfunc(close(&dsid)); %let rc = %sysfunc(close(&dsid));
/* Return variable format */ /* Return variable format */
&vlen &vlen
%mend; %mend mf_getVarLen;

View File

@@ -51,4 +51,4 @@ returns:
/* Return variable number */ /* Return variable number */
&vnum. &vnum.
%mend; %mend mf_getVarNum;

View File

@@ -40,4 +40,4 @@
&engine &engine
%mend; %mend mf_getxengine;

View File

@@ -24,4 +24,4 @@
%sysevalf(%superq(param)=,boolean) %sysevalf(%superq(param)=,boolean)
%mend; %mend mf_isblank;

View File

@@ -31,4 +31,4 @@
&is_directory &is_directory
%mend; %mend mf_isdir;

View File

@@ -26,4 +26,4 @@
&root &root
%end; %end;
%mend; %mend mf_loc;

View File

@@ -64,4 +64,4 @@ Usage:
%end; %end;
%end; %end;
/* exit quietly if directory did exist.*/ /* exit quietly if directory did exist.*/
%mend; %mend mf_mkdir;

View File

@@ -16,4 +16,4 @@
%if %symexist(&var) %then %do; %if %symexist(&var) %then %do;
%superq(&var) %superq(&var)
%end; %end;
%mend; %mend mf_mval;

View File

@@ -23,4 +23,4 @@
%macro mf_nobs(libds %macro mf_nobs(libds
)/*/STORE SOURCE*/; )/*/STORE SOURCE*/;
%mf_getattrn(&libds,NLOBS) %mf_getattrn(&libds,NLOBS)
%mend; %mend mf_nobs;

View File

@@ -47,4 +47,4 @@
&basestr &basestr
%end; %end;
%mend; %mend mf_trimstr;

View File

@@ -62,4 +62,4 @@
%else %mf_abort(mac=mf_verifymacvars,type=&mabort,msg=&abortmsg); %else %mf_abort(mac=mf_verifymacvars,type=&mabort,msg=&abortmsg);
%exit_success: %exit_success:
%mend; %mend mf_verifymacvars;

View File

@@ -50,5 +50,5 @@
&outvar &outvar
%mend; %mend mf_wordsInStr1ButNotStr2;

View File

@@ -142,4 +142,4 @@
proc sql; proc sql;
drop table &ds; drop table &ds;
%mend; %mend mp_assertcols;

View File

@@ -144,4 +144,4 @@
proc sql; proc sql;
drop table &ds; drop table &ds;
%mend; %mend mp_assertcolvals;

View File

@@ -53,4 +53,4 @@
%if &outref=____out %then %do; %if &outref=____out %then %do;
filename &outref clear; filename &outref clear;
%end; %end;
%mend; %mend mp_binarycopy;

View File

@@ -67,5 +67,5 @@
else put inchar $char1.; else put inchar $char1.;
end; end;
run; run;
%mend; %mend mp_cleancsv;
/** @endcond */ /** @endcond */

View File

@@ -64,4 +64,4 @@ data &outds;
output; output;
run; run;
%mend; %mend mp_createconstraints;

View File

@@ -80,4 +80,4 @@ Usage:
) )
%end; %end;
%mend; %mend mp_createwebservice;

View File

@@ -141,4 +141,4 @@ data &outds
%end; %end;
run; run;
%mend; %mend mp_csv2ds;

View File

@@ -49,4 +49,4 @@ data &outds;
end; end;
run; run;
%mend; %mend mp_deleteconstraints;

View File

@@ -167,4 +167,4 @@ run;
by filepath file_or_folder filename ext ; by filepath file_or_folder filename ext ;
run; run;
%end; %end;
%mend; %mend mp_dirlist;

View File

@@ -47,4 +47,4 @@
%end; %end;
as &outvar length=&varlen as &outvar length=&varlen
from &libds; from &libds;
%mend; %mend mp_distinctfmtvalues;

View File

@@ -251,4 +251,4 @@ quit;
%put NOTE-;%put NOTE-; %put NOTE-;%put NOTE-;
%put NOTE- %sysfunc(dequote(&cards_file.)); %put NOTE- %sysfunc(dequote(&cards_file.));
%put NOTE-;%put NOTE-; %put NOTE-;%put NOTE-;
%mend; %mend mp_ds2cards;

View File

@@ -55,4 +55,4 @@ data _null_;
run; run;
%mend; %mend mp_ds2csv;

View File

@@ -99,4 +99,4 @@ filename &outref temp;
run; run;
%end; %end;
%mend; %mend mp_filtergenerate;

View File

@@ -57,4 +57,4 @@ create table &outds as
%end; %end;
; ;
%mend; %mend mp_getconstraints;

View File

@@ -332,4 +332,4 @@ run;
run; run;
%end; %end;
%mend; %mend mp_getdbml;

View File

@@ -115,7 +115,7 @@ create table _data_ as
end; end;
run; run;
%put &=constraints_used; %put &=constraints_used;
%mend; %mend addConst;
data _null_; data _null_;
file &fref; file &fref;
@@ -378,4 +378,4 @@ run;
run; run;
%end; %end;
%mend; %mend mp_getddl;

View File

@@ -70,4 +70,4 @@ create table &outds (rename=(
out=&outds(rename=(_name_=NAME COL1=MAXLEN)); out=&outds(rename=(_name_=NAME COL1=MAXLEN));
run; run;
%mend; %mend mp_getmaxvarlengths;

View File

@@ -301,4 +301,4 @@
%return; %return;
%end; %end;
%mend; %mend mp_guesspk;

View File

@@ -72,4 +72,4 @@
if &lastvar then output; if &lastvar then output;
run; run;
%end; %end;
%mend; %mend mp_hashdataset;

View File

@@ -75,4 +75,4 @@ select distinct lowcase(memname)
) )
%end; %end;
%mend; %mend mp_lib2cards;

View File

@@ -39,4 +39,4 @@
,dttm=%sysfunc(datetime()); ,dttm=%sysfunc(datetime());
quit; quit;
%mend; %mend mp_perflog;

View File

@@ -85,4 +85,4 @@
"with record &record and " _n_=; "with record &record and " _n_=;
%end; %end;
%mend; %mend mp_prevobs;

View File

@@ -87,4 +87,4 @@ insert into &outds select distinct * from &append_ds;
) )
%end; %end;
%mend; %mend mp_recursivejoin;

View File

@@ -30,4 +30,4 @@ data _null_;
end; end;
run; run;
%mend; %mend mp_resetoption;

View File

@@ -46,4 +46,4 @@
%mend; %mend mp_runddl;

View File

@@ -117,4 +117,4 @@ proc sql
%put process finished at %sysfunc(datetime(),datetime19.); %put process finished at %sysfunc(datetime(),datetime19.);
%mend; %mend mp_searchdata;

View File

@@ -49,4 +49,4 @@
quit; quit;
%mend; %mend mp_setkeyvalue;

View File

@@ -71,4 +71,4 @@
proc append base=&libds data=&syslast nowarn;run; proc append base=&libds data=&syslast nowarn;run;
options &etls_syntaxcheck; options &etls_syntaxcheck;
%mend; %mend mp_stprequests;

View File

@@ -134,4 +134,4 @@ run;
%mp_binarycopy(inloc="&inloc",outref=_webout) %mp_binarycopy(inloc="&inloc",outref=_webout)
%end; %end;
%mend; %mend mp_streamfile;

View File

@@ -89,4 +89,4 @@ quit;
libname &lib clear; libname &lib clear;
%mend; %mend mp_testjob;

View File

@@ -56,4 +56,4 @@ data &outds;
duration_seconds=end_dttm-start_dttm; duration_seconds=end_dttm-start_dttm;
run; run;
%mend; %mend mp_testwritespeedlibrary;

View File

@@ -68,4 +68,4 @@ data &outds ;
rc=filename('tmp'); rc=filename('tmp');
run; run;
%mend; %mend mp_tree;

View File

@@ -63,4 +63,4 @@ data _null_;
!!'filename &fname2 clear; filename &fname3 clear;'); !!'filename &fname2 clear; filename &fname3 clear;');
run; run;
%mend; %mend mp_unzip;

View File

@@ -90,4 +90,4 @@ alter table &libds modify &var char(&len);
%mp_createconstraints(inds=&dsconst,outds=&dsconst._addd,execute=YES) %mp_createconstraints(inds=&dsconst,outds=&dsconst._addd,execute=YES)
%mend; %mend mp_updatevarlength;

View File

@@ -76,4 +76,4 @@ ods package publish archive properties
(archive_name="&outname..zip" archive_path="&outpath"); (archive_name="&outname..zip" archive_path="&outpath");
ods package close; ods package close;
%mend; %mend mp_zip;

View File

@@ -95,4 +95,4 @@ run;
filename __us2grp clear; filename __us2grp clear;
%mend; %mend mm_adduser2group;

View File

@@ -460,4 +460,4 @@ run;
%return; %return;
%end; %end;
%mend; %mend mm_assigndirectlib;

View File

@@ -75,4 +75,4 @@
%else %do; %else %do;
%put NOTE: Library &libref is already assigned; %put NOTE: Library &libref is already assigned;
%end; %end;
%mend; %mend mm_assignlib;

View File

@@ -152,4 +152,4 @@ run;
%else %put NOTE: Application (&name) successfully created in (&tree)!; %else %put NOTE: Application (&name) successfully created in (&tree)!;
%mend; %mend mm_createapplication;

View File

@@ -80,4 +80,4 @@ data _null_;
if last then call execute('call missing(of _all_);stop;run;'); if last then call execute('call missing(of _all_);stop;run;');
run; run;
%mend; %mend mm_createdataset;

View File

@@ -122,4 +122,4 @@ run;
run; run;
%end; %end;
%mend; %mend mm_createdocument;

View File

@@ -157,4 +157,4 @@ run;
%end; %end;
%put &sysmacroname: execution finished for &path; %put &sysmacroname: execution finished for &path;
%mend; %mend mm_createfolder;

View File

@@ -318,4 +318,4 @@ filename &frefout temp;
filename &frefout clear; filename &frefout clear;
%end; %end;
%mend; %mend mm_createlibrary;

View File

@@ -385,4 +385,4 @@ run;
%put %str(WARN)ING: STPTYPE=*&stptype* not recognised!; %put %str(WARN)ING: STPTYPE=*&stptype* not recognised!;
%end; %end;
%mend; %mend mm_createstp;

View File

@@ -415,7 +415,7 @@ data _null_;
put ' '; put ' ';
put ' %quote(&user) '; put ' %quote(&user) ';
put ' '; put ' ';
put '%mend; '; put '%mend mf_getuser; ';
/* WEBOUT END */ /* WEBOUT END */
put '%macro webout(action,ds,dslabel=,fmt=);'; put '%macro webout(action,ds,dslabel=,fmt=);';
put ' %mm_webout(&action,ds=&ds,dslabel=&dslabel,fmt=&fmt)'; put ' %mm_webout(&action,ds=&ds,dslabel=&dslabel,fmt=&fmt)';

View File

@@ -68,4 +68,4 @@ run;
%return; %return;
%end; %end;
%mend; %mend mm_deletedocument;

View File

@@ -89,4 +89,4 @@ run;
%put &sysmacroname: Library &name (&liburi) was successfully deleted; %put &sysmacroname: Library &name (&liburi) was successfully deleted;
%mend; %mend mm_deletelibrary;

View File

@@ -67,4 +67,4 @@ run;
%return; %return;
%end; %end;
%mend; %mend mm_deletestp;

View File

@@ -113,4 +113,4 @@ run;
filename &fileref clear; filename &fileref clear;
%mend; %mend mm_getauthinfo;

View File

@@ -50,4 +50,4 @@ proc sort;
by colname; by colname;
run; run;
%mend; %mend mm_getcols;

View File

@@ -62,4 +62,4 @@ proc sort;
by type name; by type name;
run; run;
%mend; %mend mm_getdetails;

View File

@@ -54,4 +54,4 @@ data &outds (keep=directoryuri name directoryname directorydesc );
end; end;
run; run;
%mend; %mend mm_getDirectories;

View File

@@ -143,4 +143,4 @@ run;
filename __getdoc clear; filename __getdoc clear;
filename __outdoc clear; filename __outdoc clear;
%mend; %mend mm_getdocument;

View File

@@ -93,4 +93,4 @@
run; run;
%end; %end;
%mend; %mend mm_getfoldermembers;

View File

@@ -88,4 +88,4 @@ data _null_;
!!",level=%eval(&level+1),append=YES)"); !!",level=%eval(&level+1),append=YES)");
run; run;
%mend; %mend mm_getfoldertree;

View File

@@ -69,4 +69,4 @@
end; end;
run; run;
%mend; %mend mm_getgroupmembers;

View File

@@ -92,4 +92,4 @@
options metarepository=&oldrepo; options metarepository=&oldrepo;
%end; %end;
%mend; %mend mm_getGroups;

View File

@@ -94,4 +94,4 @@ filename sxlemap clear;
filename response clear; filename response clear;
libname _XML_ clear; libname _XML_ clear;
%mend; %mend mm_getlibs;

View File

@@ -67,4 +67,4 @@ filename sxlemap clear;
filename response clear; filename response clear;
libname _XML_ clear; libname _XML_ clear;
%mend; %mend mm_getobjects;

View File

@@ -83,4 +83,4 @@ insert into &outds values ('User');
insert into &outds values ('UserGroup'); insert into &outds values ('UserGroup');
quit; quit;
%mend; %mend mm_getpublictypes;

View File

@@ -129,4 +129,4 @@ filename sxlemap clear;
filename response clear; filename response clear;
libname _XML_ clear; libname _XML_ clear;
%mend; %mend mm_getrepos;

View File

@@ -70,4 +70,4 @@ filename sxlemap clear;
filename response clear; filename response clear;
libname _XML_ clear; libname _XML_ clear;
%mend; %mend mm_getroles;

View File

@@ -81,4 +81,4 @@ options metarepository=&repo;
filename __mc1 clear; filename __mc1 clear;
filename __mc2 clear; filename __mc2 clear;
%mend; %mend mm_getservercontexts;

View File

@@ -107,4 +107,4 @@ data &outds ;
keep stpuri stpname treeuri; keep stpuri stpname treeuri;
run; run;
%mend; %mend mm_getstps;

View File

@@ -64,4 +64,4 @@ data &outds;
end; end;
run; run;
%mend; %mend mm_gettableid;

View File

@@ -115,4 +115,4 @@ proc sort;
by tablename tableuri; by tablename tableuri;
run; run;
%mend; %mend mm_gettables;

View File

@@ -65,4 +65,4 @@ data &outds;
if treeuri ne "" and treepath ne "" then output; if treeuri ne "" and treepath ne "" then output;
stop; stop;
run; run;
%mend; %mend mm_getTree;

View File

@@ -72,4 +72,4 @@ filename sxlemap clear;
filename response clear; filename response clear;
libname _XML_ clear; libname _XML_ clear;
%mend; %mend mm_gettypes;

View File

@@ -132,4 +132,4 @@ filename __in clear;
filename __out clear; filename __out clear;
filename __shake clear; filename __shake clear;
%mend; %mend mm_getwebappsrvprops;

Some files were not shown because too many files have changed in this diff Show More