HomePhabricator

Clarify include guard naming convention

Description

Clarify include guard naming convention

Summary:

  • Documentation: Document include guard convention
  • Fix: Fix missing or inconsistent include guards
  • Regression test: Add an arcanist linter which checks include guard

consistency

Backport of core PR12757 (commits 8fd6af8 and 8af65d9)
https://github.com/bitcoin/bitcoin/pull/12757/commits/8fd6af89a0c061d79bb3fd2ba704b61dcc2e9211
https://github.com/bitcoin/bitcoin/pull/12757/commits/8af65d96f4166cb57ff567a4c937f81c8e5a8aeb

The third commit (linter) is adapted as an arcanist linter.

Test Plan:
Read the developer notes

make check

arc lint --everything

Should return no error.
Remove or modify the include guard of any header.

arc lint -- <header>

The linter should catch the error.

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

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

Details

Provenance
practicalswift <practicalswift@users.noreply.github.com>Authored on Mar 22 2018, 14:19
FabienCommitted on Jun 18 2019, 19:21
FabienPushed on Jun 18 2019, 19:22
Reviewer
Restricted Project
Differential Revision
D3354: Clarify include guard naming convention
Parents
rABC0d920cfa7d79: Improve comment in top-level CMakeLists
Branches
Unknown
Tags
Unknown

Event Timeline