ArcanistLintSeverity::SEVERITY_WARNING, ); } public function getLintNameMap() { return array( self::BAD_NAME => pht('Incorrect project name. Notice the non-breaking space in 0 A.D.'), ); } public function lintPath($path) { $binaries_prefix = "binaries"; if (substr($path, 0, strlen($binaries_prefix)) != $binaries_prefix) { return; } $txt = $this->getData($path); $matches = null; $preg = preg_match_all( "/((?!0 A\\.D\\.|0ad)0\\s?(?:A|a)\\.?(?:D|d)\\.?)/", $txt, $matches, PREG_OFFSET_CAPTURE); if (!$preg) { return; } foreach ($matches[0] as $match) { list($string, $offset) = $match; $this->raiseLintAtOffset( $offset, self::BAD_NAME, pht('Incorrect project name. Notice the non-breaking space in 0 A.D.'), $string); } } }