{"action":"reopened","issue":{"url":"https://api.github.com/repos/pre-commit/pre-commit/issues/220","labels_url":"https://api.github.com/repos/pre-commit/pre-commit/issues/220/labels{/name}","comments_url":"https://api.github.com/repos/pre-commit/pre-commit/issues/220/comments","events_url":"https://api.github.com/repos/pre-commit/pre-commit/issues/220/events","html_url":"https://github.com/pre-commit/pre-commit/issues/220","id":72485978,"number":220,"title":"Feature request: a special \"<text>\" value for the hooks.yaml \"files\" field","user":{"login":"Lucas-C","id":925560,"avatar_url":"https://avatars.githubusercontent.com/u/925560?v=3","gravatar_id":"","url":"https://api.github.com/users/Lucas-C","html_url":"https://github.com/Lucas-C","followers_url":"https://api.github.com/users/Lucas-C/followers","following_url":"https://api.github.com/users/Lucas-C/following{/other_user}","gists_url":"https://api.github.com/users/Lucas-C/gists{/gist_id}","starred_url":"https://api.github.com/users/Lucas-C/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lucas-C/subscriptions","organizations_url":"https://api.github.com/users/Lucas-C/orgs","repos_url":"https://api.github.com/users/Lucas-C/repos","events_url":"https://api.github.com/users/Lucas-C/events{/privacy}","received_events_url":"https://api.github.com/users/Lucas-C/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pre-commit/pre-commit/labels/feature","name":"feature","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-01T18:06:22Z","updated_at":"2015-05-01T18:26:14Z","closed_at":null,"body":"Hi,\r\n\r\nI had to implement this kind of \"binary-files-filtering-out\" today:\r\nhttps://github.com/Lucas-C/pre-commit-hooks/blob/master/pre_commit_hooks/utils.py#L10\r\n\r\nSo I made a quick overview of the existing checkers, and I found only 2 that are targeting **any** text file: [end-of-file-fixer](https://github.com/pre-commit/pre-commit-hooks/blob/master/hooks.yaml#L76) and [trailing-whitespaces](https://github.com/pre-commit/pre-commit-hooks/blob/master/hooks.yaml#L106). Both use a long list of known text files suffixes.\r\n\r\nIf ever you think this use case could come in handy, I'd suggest to provide a magic value like `<any text file>` to the `files` parameter in _hooks.yaml_, so that hooks developers don't have to re-implement this filtering each time.\r\n\r\nYou can freely re-use the code I mentioned above if it comes handy to you.\r\n\r\nAlso, sorry for the 3-issues-opened-in-a-row :) I got really excited by this tool and ideas for improvements just flowed in ! But they are really just humble features suggestions.\r\n\r\nCheers"}}