I've recently been enforcing coding standards in my project using FxCop.
I've noticed that some of the standard rules are not applied to non-public
members (i.e. internal classes and private methods). Am I the only person
that thinks it's a good idea to enforce standards on all classes and
methods, whether they are public or not?
Paul. 6 2025
Hi Paul,
No need to enforce on internals and privates since they won't be used by
external assemblies - this is the point of FxCop.
--
Miha Markic - RightHand .NET consulting & development
miha at rthand com
"Paul Buckley" <pa**********@rebusis.com> wrote in message
news:OZ**************@TK2MSFTNGP11.phx.gbl... I've recently been enforcing coding standards in my project using FxCop. I've noticed that some of the standard rules are not applied to non-public members (i.e. internal classes and private methods). Am I the only person that thinks it's a good idea to enforce standards on all classes and methods, whether they are public or not?
Paul.
Paul,
I would agree with you. I've been thinking about using FxCop, but I will not
do so if it doesn't allow me to enforce coding standards on all code. Anyone
know of another tool that would not have this "feature"?
Regards,
Mountain
"Paul Buckley" <pa**********@rebusis.com> wrote in message
news:OZ**************@TK2MSFTNGP11.phx.gbl... I've recently been enforcing coding standards in my project using FxCop. I've noticed that some of the standard rules are not applied to non-public members (i.e. internal classes and private methods). Am I the only person that thinks it's a good idea to enforce standards on all classes and methods, whether they are public or not?
Paul.
I think enforcing these rules on public members is very important if you
want to share your compiled component with other people. On the other hand,
applying the rules also on the internal members (e.g. private) can be very
important if you share to code with for example other colleagues. So my
opinion: yes these rules should apply on all members, also the internal
ones. Although I can understand the goals of FXCop.
--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"Miha Markic" <miha at rthand com> schreef in bericht
news:O5**************@TK2MSFTNGP10.phx.gbl... Hi Paul,
No need to enforce on internals and privates since they won't be used by external assemblies - this is the point of FxCop.
-- Miha Markic - RightHand .NET consulting & development miha at rthand com
"Paul Buckley" <pa**********@rebusis.com> wrote in message news:OZ**************@TK2MSFTNGP11.phx.gbl... I've recently been enforcing coding standards in my project using FxCop. I've noticed that some of the standard rules are not applied to
non-public members (i.e. internal classes and private methods). Am I the only
person that thinks it's a good idea to enforce standards on all classes and methods, whether they are public or not?
Paul.
Since you did not say "another FREE tool", check out Parasoft's .test tool
( http://www.parasoft.com/jsp/products...est&itemId=41).
One of it's features (although, not the primary) is coding rules check. It
can be expensive though (since it's primary purpose is unit testing, which
is much more complex than coding standards analysis).
Alek
"Mountain Bikn' Guy" <vc@attbi.com> wrote in message
news:wuKzb.419716$HS4.3342695@attbi_s01... Paul, I would agree with you. I've been thinking about using FxCop, but I will
not do so if it doesn't allow me to enforce coding standards on all code.
Anyone know of another tool that would not have this "feature"? Regards, Mountain
"Paul Buckley" <pa**********@rebusis.com> wrote in message news:OZ**************@TK2MSFTNGP11.phx.gbl... I've recently been enforcing coding standards in my project using FxCop. I've noticed that some of the standard rules are not applied to
non-public members (i.e. internal classes and private methods). Am I the only
person that thinks it's a good idea to enforce standards on all classes and methods, whether they are public or not?
Paul.
Thanks, but it's too expensive for me, and it doesn't mention C# (only C++)
for unit testing, I'm looking into HarnessIT
"Alek Davis" <alekDOTdavisATintelDOTcom> wrote in message
news:uf**************@TK2MSFTNGP12.phx.gbl... Since you did not say "another FREE tool", check out Parasoft's .test tool (http://www.parasoft.com/jsp/products...est&itemId=41). One of it's features (although, not the primary) is coding rules check. It can be expensive though (since it's primary purpose is unit testing, which is much more complex than coding standards analysis).
Alek
"Mountain Bikn' Guy" <vc@attbi.com> wrote in message news:wuKzb.419716$HS4.3342695@attbi_s01... Paul, I would agree with you. I've been thinking about using FxCop, but I will not do so if it doesn't allow me to enforce coding standards on all code. Anyone know of another tool that would not have this "feature"? Regards, Mountain
"Paul Buckley" <pa**********@rebusis.com> wrote in message news:OZ**************@TK2MSFTNGP11.phx.gbl... I've recently been enforcing coding standards in my project using
FxCop. I've noticed that some of the standard rules are not applied to non-public members (i.e. internal classes and private methods). Am I the only person that thinks it's a good idea to enforce standards on all classes and methods, whether they are public or not?
Paul.
Yes, it must be expensive, but I think it works with C# (I doubt that it
works with C++, though; I think that C++ Test does, not .Test). Anyway, it
(I mean, the pricing) seems to be more for corporate customers with deeper
pockets. A nice tool, though. I should check out HarnessIT, haven't tried
this one.
Alek
"Mountain Bikn' Guy" <vc@attbi.com> wrote in message
news:4QNzb.421719$HS4.3348321@attbi_s01... Thanks, but it's too expensive for me, and it doesn't mention C# (only
C++) for unit testing, I'm looking into HarnessIT
"Alek Davis" <alekDOTdavisATintelDOTcom> wrote in message news:uf**************@TK2MSFTNGP12.phx.gbl... Since you did not say "another FREE tool", check out Parasoft's .test
tool
(http://www.parasoft.com/jsp/products...est&itemId=41). One of it's features (although, not the primary) is coding rules check.
It can be expensive though (since it's primary purpose is unit testing,
which is much more complex than coding standards analysis).
Alek
"Mountain Bikn' Guy" <vc@attbi.com> wrote in message news:wuKzb.419716$HS4.3342695@attbi_s01... Paul, I would agree with you. I've been thinking about using FxCop, but I
will not do so if it doesn't allow me to enforce coding standards on all code. Anyone know of another tool that would not have this "feature"? Regards, Mountain
"Paul Buckley" <pa**********@rebusis.com> wrote in message news:OZ**************@TK2MSFTNGP11.phx.gbl... > I've recently been enforcing coding standards in my project using FxCop. > I've noticed that some of the standard rules are not applied to
non-public > members (i.e. internal classes and private methods). Am I the only person > that thinks it's a good idea to enforce standards on all classes and > methods, whether they are public or not? > > Paul. > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Crocker Data Processing |
last post by:
Hi.
I've written a bunch of custom rules for FxCop version 1.23, and today
happened to download and install (separately) the new FxCop 1.321.
Arrgghh !
The new introspection stuff is a lot...
|
by: Chua Wen Ching |
last post by:
I had use fxcop to check my code. I had 1 confusion here.
I would normally call a method by this way in my IAnimal:
Example:
public void CallFuncA(ushort port);
But fxcop says i need to...
|
by: Chua Wen Ching |
last post by:
Hi there,
I am super confuse on this recommendation by FxCop.
1)
http://www.gotdotnet.com/team/fxcop/docs/rules/UsageRules/OperatorEqualsOverridesRequireEqualsOverridel.html
First of all,...
|
by: Rasmus |
last post by:
I VS 2005 beta 2 i have a solution with
- a number of classes
- a website
- a httphandler
- a http module
I want to run fxcop on my class files - but cant find out how to enable it.
I've...
|
by: hansiman |
last post by:
Just beginning using FxCop in my asp.net projects...
I get a lot of error messages under the header: AvoidUnusedParameters
for funtions and routines lik:
Sub isUserAuthenticated(ByVal...
|
by: Velvet |
last post by:
I ran FxCop on one of the components for my web site and the security rules
what me to add " tags like the ones listed
below:
This breaks my ASP.NET application. So my question is,...
|
by: Bruce One |
last post by:
Given a project with some .cs files, Is there a way to block some of these
files to be read by FxCop ?
|
by: Karsten Schramm |
last post by:
I would write
BaseClass var;
.....
if(var is DerivedClass)
{
DerivedClass derivedVar = (DerivedClass)var;
DoSomething(derivedVar);
}
|
by: Peter Ritchie [C# MVP] |
last post by:
I've purposely been ignoring a CA2122 warning in some C++ interop code I've
been working on for quite some time. I've just recently had the cycles to
investigate the warning. The warning message...
|
by: AlexS |
last post by:
When I implement Dispose pattern in object implementing IDisposable, current
fxcop recommends:
Ensure that Wrapper.Dispose():Void is declared as public and sealed.
However, if I do as it asks,...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |