Changeset View
Changeset View
Standalone View
Standalone View
arcanist/linter/LocaleDependenceLinter.php
<?php | <?php | ||||
/** | /** | ||||
* Check for locale dependent functions. | * Check for locale dependent functions. | ||||
* Unnecessary locale dependence can cause bugs that are very tricky to isolate | * Unnecessary locale dependence can cause bugs that are very tricky to isolate | ||||
* and fix. | * and fix. | ||||
*/ | */ | ||||
final class LocaleDependenceLinter extends ArcanistLinter { | final class LocaleDependenceLinter extends ArcanistLinter { | ||||
const KNOWN_VIOLATIONS = array( | const KNOWN_VIOLATIONS = array( | ||||
"src/bitcoin-tx.cpp" => [ | "src/bitcoin-tx.cpp" => [ | ||||
"stoul", | "stoul", | ||||
"trim_right", | "trim_right", | ||||
"atoi", | "atoi", | ||||
], | ], | ||||
"src/core_read.cpp" => ["is_digit"], | "src/core_read.cpp" => ["is_digit"], | ||||
"src/dbwrapper.cpp" => ["vsnprintf"], | "src/dbwrapper.cpp" => [ | ||||
"stoul", | |||||
"vsnprintf" | |||||
], | |||||
"src/httprpc.cpp" => ["trim"], | "src/httprpc.cpp" => ["trim"], | ||||
"src/init.cpp" => ["atoi"], | "src/init.cpp" => ["atoi"], | ||||
"src/netbase.cpp" => ["to_lower"], | "src/netbase.cpp" => ["to_lower"], | ||||
"src/qt/rpcconsole.cpp" => [ | "src/qt/rpcconsole.cpp" => [ | ||||
"atoi", | "atoi", | ||||
"isdigit", | "isdigit", | ||||
], | ], | ||||
"src/rest.cpp" => ["strtol"], | "src/rest.cpp" => ["strtol"], | ||||
▲ Show 20 Lines • Show All 261 Lines • Show Last 20 Lines |