protected function checkIgnored($filename, $suggestion = null)
{
if (!($repositoryDir = $this->gitHelper->getRoot($this->appRoot))) {
return;
}
$relative = $this->fsHelper->makePathRelative($this->appRoot . '/' . $filename, $repositoryDir);
if (!$this->gitHelper->execute(['check-ignore', $relative], $repositoryDir)) {
$suggestion = $suggestion ?: $relative;
$this->output->writeln("<comment>You should exclude this file using .gitignore:</comment> {$suggestion}");
}
}