Closed rudvfaden closed 2 years ago
Hi @rudvfaden - after some testing, I am able to reproduce this - it happens when .sasjslint
is not in the root of the project:
https://user-images.githubusercontent.com/4420615/173771765-6b5f010f-c575-4d51-8c95-b89da76cabd3.mp4
The VS Code extension works 'project wide' hence it takes one sasjslint
file and applies it everywhere, and the place we pick it up from is the project root. The documentation (README) does mention this: https://github.com/sasjs/vscode-extension#sas-lint-and-format
That said, I also tested the CLI and found that this does not recognise a root level .sasjslint
file:
https://user-images.githubusercontent.com/4420615/173774420-880295d8-2206-4416-9842-e296ed188dc7.mp4
I'll raise an issue for this on the CLI repo
Hi Allan. What defines the 'root' I would believe that ~/ was a root folder. s it the workspace root? What if you have several folders in your workspaces?
Hi Rud,
Yes - it's the workspace root. I haven't tested this on multi-root workspaces but it should work the same..
The number of folders in a workspace is not relevant from a VS Code linting perspective, the .sasjslint
file must be in the workspace root.
So if you want to apply a different lint to a subfolder (using VS Code) then you should open an instance in that folder. More info here: https://code.visualstudio.com/docs/editor/workspaces
It seems like code that existed before the creation of the .sasjslint file still confoms to the old rule. line 14-20 existed before and line 22-28 i just typed.
Hi @rudvfaden - the linter is applied when saving the file - if you can include the VS Code title bar in future screenshots, it will show us the save state (filled in circle by the filename if not saved)
EDIT - I'm wrong about that. I can't reproduce your behaviour. Can you highlight the code and demonstrate that the blank spaces definitely don't have tabs?
Hi @allanbowe . The error seems to be gone know. Maybe it just took some time to take effekt
Great stuff!
I have ~/.sasjslint and a sas program in the same folder. But I still get 'Line is indented with a tab'. Any ideas?
I still get this error
Running on a remote host!