473,587 Members | 2,463 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Treat warnings as errors and code analysis

Recently we've been on a code quality drive and have eliminated all
compilation warnings from our code. To preserve this state, we've turned
'Treat warnings as errors' to 'All' in all our projects (and if only
this could be a solution level setting!).

However, we've now found that warnings produced by Code Analysis DO NOT
get treated as errors even with this flag set - it looks like this is
because the Code Analysis happens after the compilation, and it's
*compiler* warnings that this setting refers to.

It looks like what we need to do is set the Status to Error for all the
Code Analysis rules - is this right, or is there a setting somewhere
that will cause the *build process* to treat code analysis warnings as
errors?

(VS2005 if is relevant)

--
Larry Lard
la*******@googl email.com
The address is real, but unread - please reply to the group
For VB and C# questions - tell us which version
Jun 12 '07 #1
0 2327

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
10988
by: Gary | last post by:
Hi! guys, I have a SQL agent job fails because it gets 10 warnings when it runs a stored procedure. These warnings are trivial and can be ignored. Can I make it ignore these warnings and proceed? I think there is some setting I can do to change the default behavour of an agent job regarding warnings but I just don't know how to do it. Any idea?
3
1284
by: Pete | last post by:
I'd like to have warnings for code like this: void blah(char c) {} int main() {   int a = 500;   blah(a); // want a warning here   char b = a; // warning here would be nice too }
30
2155
by: prasanna | last post by:
i will be very thankful if you sent all the errors and warnings regarding to the language C thank you
22
8293
by: John Fisher | last post by:
void f(int p) { } Many (most?) compilers will report that p is unreferenced here. This may not be a problem as f may have to match some common prototype. Typically pointers to functions are involved. For a long time I have used
5
1782
by: rawCoder | last post by:
Hi All, In Visual Basic .NET , your function definition might requirre you to return a value but (accidently/intentionally) you dont put any 'return value' in the function. In this case VB Compiler does not generate any warning. Is there any way to make the compiler generate this and other obvious warnings, is there any switch, or still VB.NET development team assumes that
2
2099
by: dbuchanan | last post by:
I built a simple Data Access Layer with the Visual Studio 2005 DataSet Designer using the wizard. All who I have talked to who use it, articles I haver read by those who use it speak very highly about the quality of code that vs2005 creates. before adding any code of my own I ran "Code Analysis" (from debug menu) against the code and got (no errors but) 90 warnings! I know nothing about the "Code Analysis" and can find nothing in the...
2
1970
by: miaohua1982 | last post by:
under the same warning level, the code is: class X{ public: X(){} virtual void g(){} }; void f(int i){ if(i<10) goto jump1;
6
1896
by: pete142 | last post by:
When I compile this code: typedef unsigned char BYTE; BYTE * IpString(unsigned int ip) { static BYTE ipString; ipString = (BYTE) 0xff & (ip >24); ipString = (BYTE) 0xff & (ip >16);
1
2926
by: JayFleming | last post by:
Hi all, I'm currently working on a build system, and require the build process to continue in the event of an error..so I've been looking at the ContinueOnError flag. The problem (as I see it) is that this actually converts any errors to warnings...so the error actually disappears and becomes a warning...is there no way to continue but to keep the error as an error so it can be correctly tracked in the build report etc...???
0
8219
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
7978
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8221
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5395
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3845
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1455
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1192
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.