FxCop: How to write own rules for bracket checks ?

  • Thread starter Thread starter heikekrieg
  • Start date Start date
H

heikekrieg

Hi all,

we use FxCop for coding rule testing.
We want to have brackets in one line if statements cause this is not so error- prone

Example:
if ( 1 == 1 )
doSomething;

<=>

if ( 1 == 1 )
{
doSomething;
}

Can we do such coding tests by FxCop? That is a inline code test.
There are many tests like this to do for example tab tests or bracket tests in ifs
if(..
if (...
if ( ...

Maybe we can do this by implementing our own IRule - but how to do?
Thank you :-)
Heike
 
Can we do such coding tests by FxCop? That is a inline code test.

As far as I know, FxCop is only for compiled assemblies, not source
code. You should probably look for a code formatting add-in instead.



Mattias
 
Back
Top