sasjs / lint

Linting and formatting for SAS® code

Home Page:https://sasjs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

formatting has no effect

BetweenTwoTests opened this issue · comments

Hello. I am trying out this sasjs linter. Because my SAS environment is in a secured environment, I am temporarily testing out how this linter works. On my local VS that does not have any access to SAS server, I installed the extension and copied a snippet of SAS code to a local file.

The extension correctly identifies and warns of bad syntax. Formatting the document has no effect at all.

I tried the CLI approach. sasjs lint fix simply prints out warnings with "Resolved 0 violations", "Updated files: " (nothing listed after this), and WARN Unresolved violations.

Does this software actually not modify the sas script and only warns of the bad syntax? From the documentation, this does not seem to be the case, but I cannot seem to get it to work at all. Does this require setting up integration with the SAS server?

Hi @BetweenTwoTests - thanks for trying out SASjs lint. The linter is available in two products:

  • VS Code extension
  • SASjs CLI

Neither is dependent on the other, and there is no requirement for SASjs Server (although we do plan to integrate it at a later date). In fact there are NO external requirements at all (no SAS instance needed), so it's perfect for a secured environment.

About the sasjs lint fix - yes this DOES fix linting issues 'in place' (modifies SAS code) however there are currently only a limited number of problems that it will fix automatically, which are listed here: https://cli.sasjs.io/lint/#usage_1

There is much we would like to do to extend and improve SASjs lint, however we are a small team and the software is all self funded. If you are able to involve us in your SAS project, or arrange some sponsorship, we'd be very glad to work on any specific requirements you may have.

About your specific issue - it would be very helpful if you can give us a reproduceable example so we can ascertain if it is a bug or a missing feature / documentation entry at play.

Ah I see. I assumed that modifications are made for whatever warnings that were triggered. Now that I look at the documentation in that lens, I can see that the SASjs lint is working exactly as it is currently implemented (only auto-formatting certain features). I'll take a deeper dive into the codebase when I have the change and learn more. Thanks!

You're welcome! I'll close this issue, but feel free to raise another if needed.

for info, there's a short video on the linting capability here: https://www.youtube.com/watch?v=x_5A8FJIwww