Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Lint - unused libnames #212

Open
Carus11 opened this issue Feb 20, 2024 · 1 comment
Open

Feature Request: Lint - unused libnames #212

Carus11 opened this issue Feb 20, 2024 · 1 comment

Comments

@Carus11
Copy link

Carus11 commented Feb 20, 2024

Assigning a Libname adds time to a job, especially when connecting to certain data sources such as Hadoop, snowflake, or other traditionally non-transactional DBMS's.
It would be nice to have a lint feature to detect unused libnames, so that connections are not needlessly opened potentially adding latency to a job.

@allanbowe
Copy link
Member

allanbowe commented Jan 23, 2025

This feature would have a default assumption that a particular .sas program file is a single / complete job

Whereas there are many, many cases where this is not true, eg:

  • autoexec.sas might pre-assign librefs
  • libraries might only be used in macros, functions, or %included code
  • in the case of the SASjs framework (compiled jobs, services & tests) the invocation could be in one of the Secondary Artefacts

A reasonable workaround could be that we could include an 'ignore list' on a per file, or per project basis.

If there is funding, we'd be happy to build the feature - we'd just default it to OFF due to the likely (initial) false positives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants