Closed Bilge closed 7 years ago
It depends on what you want to match the regexps against really. File names? File contents? Commit messages?
File contents.
On 9 Jan 2017 23:24, "Jonas Stendahl" notifications@github.com wrote:
It depends on what you want to match the regexps against really. File names? File contents? Commit messages?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/phpro/grumphp/issues/257#issuecomment-271440089, or mute the thread https://github.com/notifications/unsubscribe-auth/AAcuYgtaFChtepwREuZsw8H5fXX9iEApks5rQsGegaJpZM4Lexlb .
Hello @Bilge,
Currently there is no task for matching file contents against regexes. If you e.g. want to check class docblocks for copyright information, you could use the phpparser
task, but you would have to create your own visitor.
Another option is to create a task that matches file content against a regular expression.
Do I understand the correct way to implement this is to write a custom task?
Yes, you'll need to create your own task for that.
I just want to add a list of regular expressions that must pass for each commit. This should be a simple task but the documentation is not clear on how to do this at all. How do I do this?