Page MenuHomePhabricator

[LINTER] Add a linter to replace `unsigned char` with `uint8_t`
ClosedPublic

Authored by Fabien on Mon, Jul 8, 12:08.

Details

Summary

This is a recurrent issue in reviews, this diffs provides an autofix
linter for this.
It is named afted stdint so that other conversion can be lated added if
needed.

Test Plan
arc lint --everything # No warning

Edit src/init.cpp to add the line:

unsigned char foo;

anywhere in the file, then run:

arc lint -- src/init.cpp

The linter should catch the line and suggest a fix.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Mon, Jul 8, 12:08
Herald added a reviewer: Restricted Project. · View Herald TranscriptMon, Jul 8, 12:08
deadalnix accepted this revision.Mon, Jul 8, 12:22
This revision is now accepted and ready to land.Mon, Jul 8, 12:22
Fabien retitled this revision from Add a linter to replace `unsigned char` with `uint8_t` to [LINTER] Add a linter to replace `unsigned char` with `uint8_t`.Mon, Jul 8, 12:30