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

Lightbulb for Edit rule in configuration file #5318

Closed
ucheNkadiCode opened this issue Dec 3, 2021 · 3 comments · Fixed by #6187
Closed

Lightbulb for Edit rule in configuration file #5318

ucheNkadiCode opened this issue Dec 3, 2021 · 3 comments · Fixed by #6187
Assignees
Labels
devdiv Related to Bicep tooling efforts in DevDiv enhancement New feature or request P2 This is important to be completed, but you may not get to it
Milestone

Comments

@ucheNkadiCode
Copy link
Contributor

ucheNkadiCode commented Dec 3, 2021

Via #5314, we will be removing the lightbulb that automatically turns off a rule in the bicep config file.

From @StephenWeatherford's idea, we should look to add a lightbulb that allows the user to edit the rule in the configuration file by opening it and (hopefully) taking them to that rule in question. This does a few things

  • Reduces confusion of "which lightbulb does what" and disallows the user from mistakenly clicking a lightbulb that turns off the rule for good when that is a behavior we would like to avoid
  • Gives the user an easy way to turn off, OR, increase the level from warning to error
  • Allows the user to gain observability of the available rules they can change

Note: This option would be shown BELOW the disable next line issue

@ucheNkadiCode ucheNkadiCode added enhancement New feature or request devdiv Related to Bicep tooling efforts in DevDiv labels Dec 3, 2021
@ghost ghost added the Needs: Triage 🔍 label Dec 3, 2021
@ucheNkadiCode ucheNkadiCode added the P2 This is important to be completed, but you may not get to it label Jan 12, 2022
@ucheNkadiCode
Copy link
Contributor Author

In a lightbulb the user will see "Edit in configuration file" -> if they do not have one we will create a config file, then hopefully we can create the rule in the file if it does not already exist and highlight the word "warning"

This allows the user to now turn it off or set it to "error" level

@ucheNkadiCode
Copy link
Contributor Author

ucheNkadiCode commented Feb 4, 2022

Updates to this flow:

Change "Configure" to -> "Edit rule in config file" -> if the user cares about the specific name of the rule, we'll ultimately take them to see it in the config file, plus I may be wrong but I think hovering over it/disable next line also shows them the rule? I think some of the rule names are very long so it's cleaner to just say "edit rule".

If there is no Bicep config file found, we should popup an intermediate step of a notification:

"No Bicep config file found, would you like to add a Bicep config file to the workspace root?" [Add File] [Cancel]

Added related information to #5866

@StephenWeatherford
Copy link
Contributor

StephenWeatherford commented Mar 11, 2022

  • telemetry
  • What if multiple violations of same rule in range?
  • More manual testing

@stephaniezyen stephaniezyen moved this from In Progress to In Review in Bicep Mar 24, 2022
Repository owner moved this from In Review to Done in Bicep Mar 29, 2022
@ghost ghost locked as resolved and limited conversation to collaborators May 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
devdiv Related to Bicep tooling efforts in DevDiv enhancement New feature or request P2 This is important to be completed, but you may not get to it
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants