tarantool / checkpatch

Checkpatch for Tarantool
GNU General Public License v2.0
2 stars 2 forks source link

False positive in the comparison check #28

Closed Totktonada closed 2 years ago

Totktonada commented 2 years ago
ERROR: Comparisons should place the constant on the right side of the test
#178: FILE: src/lib/core/decimal.h:105:
+static_assert(DECIMAL_MAX_STR_LEN == DECIMAL_MAX_DIGITS + 14,

Got on PR https://github.com/tarantool/tarantool/pull/7428.

Totktonada commented 2 years ago

OTOH, the following snippet works:

static_assert(DECIMAL_MAX_STR_LEN - DECIMAL_MAX_DIGITS == 14,
              "DECIMAL_MAX_STR_LEN - DECIMAL_MAX_DIGITS == 14");

It is okay for me. Disregard, please.