diff options
author | Kurtis Rader <krader@skepticism.us> | 2016-05-03 21:31:32 -0700 |
---|---|---|
committer | Kurtis Rader <krader@skepticism.us> | 2016-05-03 21:31:32 -0700 |
commit | 42068931c734437d6da19037721b04cf0d125c1c (patch) | |
tree | 203e6974b5863b145fa600a62ecc93a0d8f7a7fc /.oclint | |
parent | e1a706bd7770e17e36de61eaf1597d39288e7f0d (diff) |
eliminate "useless parentheses" lint errors
Some `oclint` errors regarding "useless parentheses" are meaningfull. But
the vast majority are bogus in as much as removing the parentheses reduces
readability. So fix a few of the egregious uses and otherwise suppress
that error.
Diffstat (limited to '.oclint')
-rw-r--r-- | .oclint | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -2,7 +2,18 @@ rules: rule-configurations: # This is the default value (as of the time I wrote this) but I'm making # it explicit since it needs to agree with the value used by clang-format. - # Thus, if we ever change the fish style to allow longer lines this should - # be changed (as well as the corresponding clang-format config). + # Thus, if we ever change the fish style to allow longer or shorter lines + # this should be changed (as well as the corresponding .clang-format file). - key: LONG_LINE value: 100 + +disable-rules: + # A few instances of "useless parentheses" errors are meaningful. Mostly + # in the context of the `return` statement. Unfortunately the vast + # majority would result in removing parentheses that decreases + # readability. So we're going to ignore this warning and rely on humans to + # notice when the parentheses are truly not needed. + # + # Also, some macro expansions, such as FD_SET(), trigger this warning and + # we don't want to suppress each of those individually. + - UselessParentheses |