protected function checkFileInternal(CheckContext $checkContext, Config $config)
{
$file = $checkContext->getFile();
$tokens = $checkContext->getTokenList();
try {
do {
// Jump us to the next token we want to check.
$token = $tokens->seekToType(T_COMMENT)->current();
if (strpos($token->getContent(), '#') === 0) {
$this->addViolation($file, $token->getLine(), $token->getColumn(), 'Avoid using bash style comments.', Violation::SEVERITY_ERROR);
}
} while ($tokens->valid());
} catch (\HippoPHP\Tokenizer\Exception\OutOfBoundsException $e) {
// Ignore the exception, we're at the end of the file.
}
}