48 results found
-
Allow Copy/Paste contents of 'List of Code Analysis Issues' window.
Sometimes I would like to just copy/paste the issues discovered and include in an email. Currently, I cannot copy the Issues list. It takes too much time/effort to export to a file and then attach that file to an email. Copy/paste would be so much easier.
2 votes -
Include auto fix for single quote string literals as aliases warning, Issue code: DEP01.
Create auto fix for Issue code: DEP01 non-standard column aliases because of single quote delimiter. Also need to update SQL Format tool, it is currently using single quote and there is no way I could find to switch it to double quote.
2 votes -
Make the Issues List more useful - Rule Disable, Specific Help, Hide Issue in List
The list is useful to drive code positioning, but that's all it does. Rules like ST011 that go against authoritative SQLPass presentations are noise. Yes, we can click the SQP Menu, nav to manage, scroll down, and finally disable, save, then refresh... (out of breath!). Just right-click and Disable rule, which also refreshes the list. That kind of useful RC-Menu. And instead of having to go to the Rule Maint to see exactly what the rule is enforcing, RC-menu has "Show Issue Help" in a bubble, built in. And for those cases where a rule isn't to be shut down,…
4 votes -
compare datatypes in stored procedure calls with defined variables
When I call a stored procedure, I want SQL Prompt's code analysis rules to be able to tell me if the variables I am passing to the stored procedure are OK.
For example, if I pass a bigint variable to a SP that has a tinyint input parameter, I want SQL prompt to flag that as a potential issue.
Similarly, if I am passing a string variable defined locally as nvarchar(150) to a SP that takes only nvarchar(100), it should be flagged as an issue (because I am passing a string that may not "fit" into the input parameter).
3 votes -
Is there a way to run your code analysis rules against an existing database?
To help our developers we - as dba's - perform validation against their procedures and database code. The library of rules that is incorporated in SQLPrompt could be a good rule of thumb for the basic stuff of reviewing, so that we can focus on other stuff when validating.
Is it possible to run the rules "engine" of SQLPrompt against an existing database without having to open the code manually?3 votes -
Implement all of the Find Unused Variables and Parameters functionality in Code Analysis
Currently Code Analysis does not implement all of the items that Find Unused Variables and Parameters does.
Specifically I know it's missing:
- Declared variables that are used before a value is assigned
- Assigned values that are never usedEx.
With this code:DECLARE @Test NVARCHAR(1)
DECLARE @Test2 INT
DECLARE @Test3 DATESET @Test = 1
SET @Test = N'Test' + @Test2
Code Analysis will flag the DECLARE for @Test for having a NVARCHAR of size 1 and @Test3 for not being used, but it will not flag @Test2 for being used before a value is assigned to it…
6 votes -
2 votes
-
Menu option: 'Normalize Line Endings'
Sometimes line-endings get messed up by source-control (looking at you Git) and "intellisense" will give you lots of green squigglies that you'd rather not commit to the branch.
A good menu option for SQL Prompt would be 'Normalize Line Endings' with a sub-menu selection of 'Windows' or 'Unix'. Then fire off a regex expression powered search and replace on the file. It's fairly easy to do manually with a Ctrl+Shift+F in Visual Studio, but in SSMS, it's more complicated to do so manually, I think.
Git does this to me once in a while, and I have to open the…
9 votes -
"drop user"
Highlight of today was when I ran
DROP USER MyUser
In the wrong (production) database.
Please add a warning to SQL Prompt, like your
"You're about to execute a DELETE statement without a WHERE clause"When you run a DROP USER or a DROP LOGIN statement on a production server. Not only does the user or login disappear, but also all rights granted to the user.
Maybe add the question “are you in the correct database?”
3 votes -
Autofix for existing functionality
There are cases where the code analysis detects errors and where the tool already have functionality to correct the issue. For instance with unqualified column names
2 votes -
Mark same columns in JOIN conditions
It helps avoiding join on the same column (especially at inner join).
Example:
UPDATE A SET Column1 = B.Column2 FROM TableA AS A INNER JOIN Table B ON A.Column3 = A.Column3.
It happens usually by accident. The statement should be:
UPDATE A SET Column1 = B.Column2 FROM TableA AS A INNER JOIN Table B ON A.Column3 = B.Column3.14 votes -
DEP026, updated to work with spatial code
w.sysLocationXY.STX, should not generate an code analysis error.
2 votes -
Implement all SQL Code Guard Rules in SQL Prompt Code Analysis
There are several rules that are only available in SQL Code Guard. And with SQL Code Guard no longer being maintained they should be implemented in SQL Prompt Code Analysis so that we can avoid having to use two products.
By our count here are the rules currently not implemented in Code Analysis:
DEP004 COMPUTE and COMPUTE BY clauses are deprecated
DEP005 FASTFIRSTROW table hint is deprecated
DEP008 PASSWORD/MEDIAPASSWORD options in BACKUP/RESTORE statement are deprecated
DEP010 DBCC CONCURRENCYVIOLATION is deprecated
DEP017 NON-ANSI join (= or =) is used
EI001 Incompatible variable type for procedure call
EI002 Incompatible literal…5 votes -
Ability to run Code Analysis against whole DB
With the deprecation of SQL Code Guard and it's replacement by Code Analysis there is one feature that we heavily used that is now no longer there, and that is the ability to run SQL Code Guard against the whole DB not just the query on the screen.
This allowed us to investigate new DBs that we'd inherited to see what sort of cleanup we might be looking at as well as giving us the ability to see if anything had snuck in to our existing DBs without going file by file.
I know there are other tools (like SQL…
16 votes -
PE019
I'd like to vote for adding PE019 (Consider using EXISTS instead of IN) to the issues which can be auto-fixed.
It feels like the kind of re-write that would probably be simpler for a computer to do than a person.
5 votes -
SQL Prompt Code Visualization (Like Flow Chart)
SQL Prompt should be able to Visualize the Code and represent the code like Flow Chart.
This Feature will be very useful while working with heavy Stored Procedures.The Sample Code Visualization image is shared below:
https://drive.google.com/file/d/1dE0H7UP1MOuOZ4A3e4urUkDlR0FD4474/view?usp=sharing
21 votes -
Issue code SC003 when USE is first line
Issue code SC003 shouldn't happen if the USE statement is at the top of a SQL script.
3 votes -
Make SQL Prompt & SCG Command line ignore code where scgignore is set
We have adopted SCG and have commented out areas of code we do not want checking with scgignore. The new version of SCG command prompt and SQL Prompt do not recognise these comments, and report the area of code with warnings.
Please amend so they are not reported, or at least reported differently so we can ignore.13 votes -
sonarqube
Have SonarQube plugin that will do code analysis using your rules rather than TSQL or PLSQL plugins
4 votes -
Allow custom rules for code analysis
SQL Prompt has the ability to catch and warn about Update statements without Where clauses.
How about something similar that catches and warns about security commands like Grant or Deny.
8 votes
- Don't see your idea?