SQL Prompt 9 suggestions
chrisleonard
Posts: 10 Bronze 3
in SQL Prompt
Hey folks,
I have a couple of observations about SQL Prompt 9. First, and I'm sure you are working on this already, we need to be able to control whether the "bad smells"/linting feature is on or off, and we need to be able to pick individual rules to be shut down. The reason for this is that if you have a very sizable body of code that makes the linter light up, you may know that code is OK "given the circumstances." However, this means that the linter is underlining tons of stuff it should not, and it hurts the signal-to-noise ratio. I think it would be good to allow us to make this feedback less noisy so that we can pay attention to the recommendations that actually matter to us in our particular jobs.
Second, In the SQL Prompt Options, under Format > Styles, there is an option to "Apply column alias style." The choices that have quotation marks appear to only use apostrophes (inverted commas). I believe that the ANSI standard states that object names can be delimited by double-quotes - and an alias is parsed as an object name, so those options should show double-quotes. The only standard use of apostrophes is to delimit literal strings. I think that we should align with ANSI standards where we can, even though SQL Server allow variants like 'identifier' and [identifier].
Just food for thought - thanks!
Cheers,
Chris Leonard
GoDaddy, FoRG
I have a couple of observations about SQL Prompt 9. First, and I'm sure you are working on this already, we need to be able to control whether the "bad smells"/linting feature is on or off, and we need to be able to pick individual rules to be shut down. The reason for this is that if you have a very sizable body of code that makes the linter light up, you may know that code is OK "given the circumstances." However, this means that the linter is underlining tons of stuff it should not, and it hurts the signal-to-noise ratio. I think it would be good to allow us to make this feedback less noisy so that we can pay attention to the recommendations that actually matter to us in our particular jobs.
Second, In the SQL Prompt Options, under Format > Styles, there is an option to "Apply column alias style." The choices that have quotation marks appear to only use apostrophes (inverted commas). I believe that the ANSI standard states that object names can be delimited by double-quotes - and an alias is parsed as an object name, so those options should show double-quotes. The only standard use of apostrophes is to delimit literal strings. I think that we should align with ANSI standards where we can, even though SQL Server allow variants like 'identifier' and [identifier].
Just food for thought - thanks!
Cheers,
Chris Leonard
GoDaddy, FoRG
Best Answer
-
Michael Clark Posts: 123 Silver 4Hi @chrisleonard,
Thanks for getting in touch and for the detailed feedback, much appreciated.
It is currently possible to enable/disable code analysis via the top level menu "Enable Code Analysis" in SSMS. You can also enable/disable individual rules via the "Manage Code Analysis Rules..." or inspection sidebar. Does that solve your issue or is there some additional you would like to configure the signal to noise ratio?
With your second idea around having ANSI standard column alias styles, would it be possible to submit it to our UserVoice forum? Then we can gauge the level of interest from the community and collect additional information.
Best,
MichaelMichael Clark
Technical Lead, SQL Monitor
Answers
Cheers,
Chris Leonard
FoRG, GoDaddy
Peryourhealth is a user-friendly platform that allows you to pay your medical bills conveniently online, anytime, and anywhere.
Suppose you face technical difficulties or encounter issues with the MyLowesLife portal. In that case, you can clear your browser cache and cookies using a different browser or device or contact the MyLowesLife support team for assistance.