sasjs / lint

Linting and formatting for SAS® code

Home Page:https://sasjs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hasMacroNameInMend -> The %mend statement should contain the macro name

allanbowe opened this issue · comments

A macro in SAS language is defined like so:

%macro somemacro();
  %put &sysmacroname;
%mend;

There are many who advocate putting the macro name in the %mend; statement, like so:

%macro somemacro();
  %put &sysmacroname;
%mend somemacro;

This has the benefit that it is easy to see which macro is being 'ended' in a large program. There are also many who would advocate the opposite (that this is unnecessary)..

Given that this should be a very easy rule to write, let's add it but default to false, eg:

hasMacroNameInMend:false

Lets make the default (true or false) dependent on the result of this poll: https://www.linkedin.com/posts/allanbowe_sas-sasapps-sasjs-activity-6783413360781266945-1-7m

🎉 This issue has been resolved in version 1.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀