On 8/27/2018 7:00 AM, Henri Sivonen wrote:
I think it's worthwhile to have a lint, but regexps are likely to have
false positives, so using clang-tidy is probably better.

A bug is on file:https://bugzilla.mozilla.org/show_bug.cgi?id=1485588

On Mon, Aug 27, 2018 at 4:06 PM, Tom Ritter<t...@mozilla.com>  wrote:
Is this something worth making a lint over?  It's pretty easy to make
regex-based lints, e.g.

yml-only based lint:
https://searchfox.org/mozilla-central/source/tools/lint/cpp-virtual-final.yml

yml+python for slightly more complicated regexing:
https://searchfox.org/mozilla-central/source/tools/lint/mingw-capitalization.yml
https://searchfox.org/mozilla-central/source/tools/lint/cpp/mingw-capitalization.py


Bug 1642825 recently added a "rejected words" lint. It was intended to warn about words like "blacklist" and "whitelist", but dangerous C function names could easily be added to the list:

https://searchfox.org/mozilla-central/source/tools/lint/rejected-words.yml

A "good enough" solution that can find real bugs now is preferable to a cleaner clang-tidy solution someday, maybe. (The clang-tidy lint bug 1485588 was filed two years ago.)
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to