Changeset View
Changeset View
Standalone View
Standalone View
arcanist/linter/IncludeGuardLinter.php
<?php | <?php | ||||
/** | /** | ||||
* Check the include guard matches the rules from the developer notes. | * Check the include guard matches the rules from the developer notes. | ||||
*/ | */ | ||||
final class IncludeGuardLinter extends ArcanistLinter { | final class IncludeGuardLinter extends ArcanistLinter { | ||||
const GUARD_PREFIX = 'BITCOIN_'; | const GUARD_PREFIX = 'BITCOIN_'; | ||||
const GUARD_SUFFIX = '_H'; | const GUARD_SUFFIX = '_H'; | ||||
const INCLUDE_GUARD_INVALID = 1; | const INCLUDE_GUARD_INVALID = 1; | ||||
const EXCEPTIONS = array( | const EXCEPTIONS = array( | ||||
// none yet | "src/test/fuzz/FuzzedDataProvider.h" | ||||
); | ); | ||||
public function getInfoName() { | public function getInfoName() { | ||||
return 'lint-include-guard'; | return 'lint-include-guard'; | ||||
} | } | ||||
public function getInfoDescription() { | public function getInfoDescription() { | ||||
return pht('Check the include guard matches the rules from the developer '. | return pht('Check the include guard matches the rules from the developer '. | ||||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |