fortranoper

Rule fortranoper searches for the use of Fortran-style operators like:
EQ, GT, LT, GE, LE, NE (for =, >, <, >=, <=, <>).

I know some people may like this or are used to this, but others don't.


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tamhas's picture

Why not make the rule have a

Why not make the rule have a switch so that one can go either way?


jurjen's picture

Because switches are no fun!

Trust me, if you want to go the other way you'd prefer to have a rule that goes only the other way instead of a bi-directional rule with switches. It is easier to download your choice from a list of simple rules than to download a complicated rule and figure out how to configure its switches. I see switches as workarounds, they are running extra code in order to disable unwanted code. It is better to simply not load the unwanted code in the first place. It is also easier for the programmer(s) to write a couple of simple rules than to write a complicated one.

I am thrilled that the new "contributed rules" feature is already used by Niek who uploaded his "fortranoper" rule and I hope that more will follow. Asking for rules that test for multiple things is wrong in the vision of Prolint (a single rule checks for a single thing) and is also raising the bar for people who might like to upload their stuff.

Uploading source can be scary. Some people are shy to upload their rules because they feel their code is of poor quality or think their rule is a stupid idea altogether. But that is not bad... you are in an open source environment, so your "poor" code might trigger someone else to make improvements. What I want to say is: all rules are welcome!