Code Analysis in F #

As a C # developer, I took advantage of Microsoft code analysis. However, in F # Code Analysis, it does not seem to be an integral part of the development cycle. It took me a while to incorporate CA into the F # project, but this blog helped . Now that I have enabled CA, it seems to be generating โ€œwrongโ€ warnings. For example, I have a declared record type as

type Account = {Number : string} 

for which I expect structural equality by default. This blog shows that two instances of type Acccount, for which the number is the same, should be equal. Why does code analysis then tell me that: โ€œThe accountโ€ must define the โ€œ! =โ€ Operator, since it implements IComparable? Of course, if it were a C # class, then I would have to jump over all these hoops, but in F # this should happen automatically.

I apply the "All Microsoft Rules" rule set. Do they apply to F #, and if so, is there any rule set that I should use?

+6
source share
1 answer

You can also use FSharpLint in Visual F # Power Tools :

enter image description here

+2
source

All Articles