-
Notifications
You must be signed in to change notification settings - Fork 499
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
Enable 'powershell.scriptAnalysis.settingsPath' to search project root in multi-root workspaces #4743
Comments
Agreed. It will bring great convenience if this can be implemented. |
Oh is that what's going on. To be honest I've been meaning to investigate this setting because it looked broken to me...I was in a multi-root repo! Yes, we'll get this fixed. Probably the most backwards compatible algorithm is to check each folder as if it were root, stopping with the first found file (and starting with the first listed folder). |
Ok so I started working on this but:
I'm not sure how viable this is. This specifically being per-workspace-folder PSSA settings. The extension is just one process for the whole workspace, which means one analysis service and therefore one PSSA being hosted. I think it's going to have to remain one PSSA settings file per workspace. What I can fix is the ability to find that file in any (the first where it exists) of the workspace folders. Would that help? I checked and it as of now, if it's in the first workspace folder of a multi-root workspace, it's found. That just doesn't work if it's instead in a second or beyond folder. I also tested just to be sure and unfortunately the syntax of |
@andyleejordan So, I guess the limitation is that |
@lewis-yeung that's correct.
Would this still be an improvement for you? If so I can get PowerShell/PowerShellEditorServices#2167 into the next release. |
Seems there is no perfect solution for the time being, but that would help somewhat, I think. |
Prerequisites
Summary
Hello,
as i can see, the option
powershell.scriptAnalysis.settingsPath
can only be set globally or per workspace.I'm actually using multi-root workspaces and so i should edit the setting every time i switch the folder.
Could be possible to implement a way to search for the
PSScriptAnalyzerSettings.psd1
file in the project root and so on, in order to have one different setting file per folder in a multi-root workspace?Default value set in #2190 does nothing. Setting file is not read from any of my directories in the workspace.
Thank you!
Proposed Design
No response
The text was updated successfully, but these errors were encountered: