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