我正在使用checkstyle来验证代码的PHP项目.我有一部分代码用simplexml读取XML的问题,XML全部是大写的,例如:
$response = simplexml_load_string($xml);
$code = $response->CODE; // checkstyle won't validate this because it is in uppercase
Run Code Online (Sandbox Code Playgroud)
这段代码给了我警告,因为变量名是大写的(变量需要在camelcase中).由于这个原因,代码中有很多警告.
问题是:我可以禁用检查特定变量或整个代码区域吗?怎么样?
非常感谢你.