开发者

Gendarme unsafe code detection

Anyone familiar with Gendarme kn开发者_如何学JAVAow if it's possible to create a rule that detects C# unsafe code?


Yes, this would be possible and fairly easy to do so.

Unsafe code is not directly marked on the metadata. However you can look at the IL instructions and types (local, parameters and return values) to find construct that requires the 'unsafe' C# keyword (when compiling code).

A good reference book on ILasm would help a lot. So would testing your rule against huge projects (with source available) to ensure you're not missing any case.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜