Custom rules limitations

We are beginning to implement FXCop, and are looking to use several custom rules. I've noticed limitations on certain rule testing. Are the following possible to implement as custom rules?

Use brackets after if statements
object assignments should occur in Try blocks

[275 byte] By [JeremyMaddrey] at [2008-2-18]
# 1
Use brackets after if statements: No, FxCop looks at the MSIL, not the source code.
Object assignments should occue in Try blocks: Yes, but torturous.
JamesJackson at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...
# 2

James' answer is on the mark.

What are you trying to enforce w/your object assignment rule? We should probably try to get a rule sample out there that shows how to work w/the current exception handling representation.

Michael Fanning

MichaelFanning-MS at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...
# 3
We're looking for verification that some exception handling is present should object assignment fail.
JeremyMaddrey at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...

Visual Studio Team System

Site Classified