Could we have a rule that does the opposite of java:S6212, Local-Variable Type Inference should be used; a rule that instead of supporting the use of var, forbids its use?
Thank you for your suggestion, but we don’t feel that
var is unpopular enough that there would be enough demand for such a rule. You are, of course, free to define your own custom rule to do this if you feel strongly about this.
Even though you have a rule that forbids the use of the ternary operator that most of the industry came to accept the use of in Java over 20 years ago?
for what it is worth: being part of a large corporation with a central team managing our SonarQube server, we are not ‘free’ to define our own custom rules because of the logistics of installing, managing and maintaining such things in such a large organisation. That is why the template rules and parametrised rules are so useful for us.