tarantool / checkpatch

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

False positive when comparing two constants. #65

Closed gmoshkin closed 1 year ago

gmoshkin commented 1 year ago

checkpatch will report comparing two constants as an error with this message:

ERROR: Comparisons should place the constant on the right side of the test

Comparing 2 constants can be useful for example in a static_assert statement:

static_assert(BOX_SPACE_ID < BOX_INDEX_ID, "some of our code assumes that");
locker commented 1 year ago

Can't reproduce. Could you please attach the patch that fails to pass the check?

gmoshkin commented 1 year ago

Can't reproduce. Could you please attach the patch that fails to pass the check?

https://github.com/tarantool/tarantool/pull/8322/commits/527ffe0bc30872c8e2c05b94b4800b57e2aca6cb

A link to the checkpatch report: https://github.com/tarantool/tarantool/actions/runs/5818637346/job/15775459675#step:4:122