WiseTechGlobal / WTG.Analyzers

Analyzers from WiseTech Global to enforce our styles, behaviours, and prevent common mistakes.
Other
16 stars 3 forks source link

Added Emit overload usage analyzer. #95

Closed brian-reichle closed 4 years ago

brian-reichle commented 4 years ago

Adds a rule to validate that the ILGenerator.Emit overload used is valid for specified OpCode. This is because the overload determines what bytes are emitted for the argument, but the opcode determines how those bytes will be interpreted ... and the emit method generally doesn't verify that they are the same.

brian-reichle commented 4 years ago

I actually wrote this ages ago, figured I should probably clean it up and get it in.