Skip to content

Remove broken 'Select PSScriptAnalyzer Rules' command #2659

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

Merged
merged 2 commits into from
Apr 27, 2020

Conversation

bergmeister
Copy link
Contributor

PR Summary

Related (but not fixing the issue itself): #2422

PR Checklist

Note: Tick the boxes below that apply to this pull request by putting an x between the square brackets.
Please mark anything not applicable to this PR NA.

  • PR has a meaningful title
  • Summarized changes
  • PR has tests
  • This PR is ready to merge and is not work in progress
    • If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready

Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TylerLeonhardt
Copy link
Member

@bergmeister can you also delete this file and all references?

https://www.github.com/PowerShell/vscode-powershell/tree/master/src%2Ffeatures%2FSelectPSSARules.ts

(It'd be good to do a quick scan of the repo for other references)

The reason I ask is cause I think once PSSA vNext is out, we can totally redesign this feature and if we need to reference it in the future, we have it in the git history.

@bergmeister
Copy link
Contributor Author

@TylerLeonhardt Good point. Will do.

Just FYI this came up again in the PowerShell #vscode Slack channel by @wsmelton who wanted to use that feature but found it was broken. His words were:

Pretty sad because I used it heavily for one off projects that are not on GitHub

I know the feature was polarizing before anyway due to it's lack of persistence but what was the reason for abandoning it completely? As far as I see it broke because the GetPSSARulesRequest\GetPSSARulesRequest classes in PSES were removed. Would it be easy to re-add them or would it be much more difficult due to re-architecture?

@TylerLeonhardt
Copy link
Member

what was the reason for abandoning it completely?

Like I said in #2422 ...

My reasoning was:

  • It felt like an incomplete feature - it's only active during your current session which is a silly limitation and should be backed by a PSScriptAnalyzer settings file somewhere
  • I doubted it was being used...

I still doubt that many users actually use it and it even promotes a less than ideal practice:

set this every time you start VS Code rather than using a PSScriptAnalyzerSettings file

I want to bring back the feature because the UX is not terrible (selecting the rules you care about) but considering PSSA v2 is going to change the rules a bunch, it just doesn't seem like it's worth the time at the moment.

If you want to bring it back, I won't say no to it, but I don't have the bandwidth, unfortunately.

@bergmeister
Copy link
Contributor Author

OK, I've removed the code for now, which will at least resolve the user confusion of people who try to use the command. I might try to see if it is easy to re-add at a later point in time, so maybe one step at a time.

Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for doing this Chris!

@TylerLeonhardt TylerLeonhardt merged commit 5cb23fa into PowerShell:master Apr 27, 2020
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

Successfully merging this pull request may close these issues.

3 participants