feature suggestion: Code sniffing

Provides intelligent code completion for SQL Server editors.

feature suggestion: Code sniffing

Postby WeeeBob » Thu Mar 14, 2013 12:24 pm

Just a wee suggestion that I think would fit into SQL prompt quite well.

Hows about Code sniffing? For checking code compliance with user defined standards. Like checking column names conform to a defined standard, warnings on bad practices etc. You know all those little annoying things like no clustered index, use of cursors instead of set based ops, use of Select * or of Insert into tableA values (a,b,c).

All driven by user defined rules? With larger dev teams the standards docs always left to the side. If it could work on input and in some sort of batch mode (on sql source control check in?) it would be nice.

I've been looking around but unable to find any products like this for SQL server, there looks to be a good one for PHP though.
Posts: 12
Joined: Thu Jun 14, 2007 3:16 pm

Postby Anu Deshpande » Fri Mar 15, 2013 2:20 pm

Many thanks for your post!

We appreciate the requirement specified by you.

Please feel free to add your vote or if there is one already kindly vote for it here.

And then the project manager can directly decide what category this requirement comes under?
Anuradha Deshpande
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Anu Deshpande
Posts: 839
Joined: Mon Apr 20, 2009 2:53 pm
Location: Cambridge

You might want to look at SqlCop

Postby datacentricity » Fri Mar 15, 2013 4:27 pm

SQLCop has a number of standard checks - things like SELECT * out of the box and I believe is open source.

IIRC, RedGate's SQL Test can incorporate the standard SQL Cop validations in their own unit test class which can then be run within the tSQLt/SQL Test framework. As these tests are all written in SQL - it would be easy to extend.

Another option might be to look at the work Dave Ballantyne has done one a powershell based code parser to look for the same dort of code smells
\"Your mind is like a parachute, it works best when open\" Frank Zappa
\"Be wary of strong drink. It can make you shoot at tax collectors…and miss\" Robert Heinlein
blog: http://datacentricity.net
twitter: @datacentricity
Posts: 28
Joined: Wed Jul 18, 2012 11:22 am
Location: London

Return to SQL Prompt Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests