Page MenuHomePhabricator

Clarify include guard naming convention
ClosedPublic

Authored by Fabien on Jun 17 2019, 14:23.

Details

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.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable