sasjs / lint

Linting and formatting for SAS® code

Home Page:https://sasjs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Provide a warning when detecting the use of an undeclared macro.

tmoody opened this issue · comments

Please can the linter report if an undeclared macro had been used?

Declared macros are considered to be:

  • built-in SAS macros such as %scan, %index, %trim, etc
  • macros that are already named under the <h4> SAS Macros </h4> section of a job's header
  • declared within the job itself (including via <h4> SAS Includes </h4>)

SAS Macro keywords (such as %if,%then, and %do) should not trigger the rule.

It is accepted that macros made available to a job through the SASAUTOS system option will trigger false positives.