Implementing Case Sensitive Rules with CodeChecker
In a recent post I mentioned that CodeChecker can now be run in a CI environment. There's another addition that I'm happy to have and that is the ability to write case-sensitive code rules.
The syntax of writing case-sensitive rules is straight-forward. Here's an example:
"name": "Use correct BIF case for arrayLen",
This is a pretty trivial example, but you get the idea. This would flag up an instance
arraylen which you may want to have written as
arrayLen. This feature won't come
in handy a lot, but there are times when it is useful (e.g. "Coldfusion" instead of the proper "ColdFusion").
Under the hood, the matcher uses
reFindNoCase to search depending on
your preferred case sensitivity.