HomePhabricator

[Chronik] Add lint macro to prevent having to repeat common lints in every crate

Description

[Chronik] Add lint macro to prevent having to repeat common lints in every crate

Summary:
Manually checking that all lints are the same for all the crates in the repo is an unnecessary burden on developers and reviewers.

With this macro, common lints are applied to all the items contained in it. This way lints can be defined in one place.

Naturally, it doesn't cover anything outside the macro (e.g. the docs for the crate itself are not enforced anymore), however this is
something that is reasonable to be checked manually by a reviewer.

Test Plan:

  1. ninja check-bitcoinsuite
  2. Add pub struct S; into hash.rs
  3. Make sure ninja check-bitcoinsuite gives a bunch of lints (missing docs, missing Debug)
  4. Revert

Reviewers: Fabien, #bitcoin_abc

Reviewed By: Fabien, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D11787

Details

Provenance
tobias_ruckAuthored on Jul 21 2022, 21:26
tobias_ruckPushed on Jul 22 2022, 08:42
Reviewer
Restricted Project
Differential Revision
D11787: [Chronik] Add lint macro to prevent having to repeat common lints in every crate
Parents
rABCfc122b744644: [refactor] improve style for touched code
Branches
Unknown
Tags
Unknown