-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Code::TidyAll support #39
Comments
There are two potential parts to your request: 1) Checking that files don't report any issues with Code::TidyAll and preventing the user from committing when they do. Conceptually, this is very similar to App::GitHooks::Plugin::PerlCritic, and the behavior would be the same as Code::TidyAll::Git::Precommit. The only potential problem here is the level of detail bubbled up by Code::TidyAll::Result for the line number of issues detected. Several App::GitHooks plugins (for example: App::GitHooks::Plugin::PerlCritic) review the line number(s) of issues, to detect if the issues are in changes you're committing or in changes that predated your current edit. This avoids forcing the user to clean up / fix an entire file if they're just trying to make a one line fix, but it looks like implementing line-level matching would be difficult for Code::TidyAll. The plugin could try to parse the output, but as the output may change over time, the maintenance cost would likely be high. This doesn't prevent a Code::TidyAll plugin, but it's a trade-off vs implementing specific App::GitHooks plugins for each tool that Code::TidyAll supports. 2) Automatically running Code::TidyAll to clean up the files before they're committed. This is a difficult problem, in particular because:
TidyAll::Git::Precommit does not offer this either, possibly for similar reasons. |
Hei!
Would it be possible to add support for Code::TidyAll to App::GitHooks? (e.g. as a plugin?)
The text was updated successfully, but these errors were encountered: