Red Gate forums :: View topic - feature suggestion: Code sniffing
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Prompt 5
SQL Prompt 5 forum

feature suggestion: Code sniffing

Search in SQL Prompt 5 forum
Post new topic   Reply to topic
Jump to:  
Author Message
WeeeBob



Joined: 14 Jun 2007
Posts: 12

PostPosted: Thu Mar 14, 2013 1:24 pm    Post subject: feature suggestion: Code sniffing Reply with quote

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.
Back to top
View user's profile Send private message
Anu Deshpande



Joined: 20 Apr 2009
Posts: 688
Location: Cambridge

PostPosted: Fri Mar 15, 2013 3:20 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
datacentricity



Joined: 18 Jul 2012
Posts: 18
Location: London

PostPosted: Fri Mar 15, 2013 5:27 pm    Post subject: You might want to look at SqlCop Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group