{"action":"opened","issue":{"url":"https://api.github.com/repos/brigade/overcommit/issues/173","labels_url":"https://api.github.com/repos/brigade/overcommit/issues/173/labels{/name}","comments_url":"https://api.github.com/repos/brigade/overcommit/issues/173/comments","events_url":"https://api.github.com/repos/brigade/overcommit/issues/173/events","html_url":"https://github.com/brigade/overcommit/issues/173","id":67716861,"number":173,"title":"Display warning about hook in .overcommit.yml without explicit `enabled: true`","user":{"login":"sds","id":677877,"avatar_url":"https://avatars.githubusercontent.com/u/677877?v=3","gravatar_id":"","url":"https://api.github.com/users/sds","html_url":"https://github.com/sds","followers_url":"https://api.github.com/users/sds/followers","following_url":"https://api.github.com/users/sds/following{/other_user}","gists_url":"https://api.github.com/users/sds/gists{/gist_id}","starred_url":"https://api.github.com/users/sds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sds/subscriptions","organizations_url":"https://api.github.com/users/sds/orgs","repos_url":"https://api.github.com/users/sds/repos","events_url":"https://api.github.com/users/sds/events{/privacy}","received_events_url":"https://api.github.com/users/sds/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/brigade/overcommit/labels/enhancement","name":"enhancement","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/brigade/overcommit/milestones/1","html_url":"https://github.com/brigade/overcommit/milestones/0.24.0","labels_url":"https://api.github.com/repos/brigade/overcommit/milestones/1/labels","id":1059392,"number":1,"title":"0.24.0","description":null,"creator":{"login":"lencioni","id":195534,"avatar_url":"https://avatars.githubusercontent.com/u/195534?v=3","gravatar_id":"","url":"https://api.github.com/users/lencioni","html_url":"https://github.com/lencioni","followers_url":"https://api.github.com/users/lencioni/followers","following_url":"https://api.github.com/users/lencioni/following{/other_user}","gists_url":"https://api.github.com/users/lencioni/gists{/gist_id}","starred_url":"https://api.github.com/users/lencioni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lencioni/subscriptions","organizations_url":"https://api.github.com/users/lencioni/orgs","repos_url":"https://api.github.com/users/lencioni/repos","events_url":"https://api.github.com/users/lencioni/events{/privacy}","received_events_url":"https://api.github.com/users/lencioni/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":2,"state":"open","created_at":"2015-04-08T22:56:37Z","updated_at":"2015-04-11T01:29:38Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-04-11T01:29:38Z","updated_at":"2015-04-11T01:29:38Z","closed_at":null,"body":"While converting our existing configurations to include all the hooks that are now disabled by default, it was noticed that having to explicitly include `enabled: true` was a bit of a nuisance, considering it was not previously necessary for most hooks (but now that https://github.com/brigade/overcommit/issues/122#issuecomment-87114806 is implemented, an explicit `enabled: true` is necessary for all hooks included in `.overcommit.yml`).\r\n\r\nOne suggestion was that we could just default to `enabled: true` for hooks that appear in `.overcommit.yml`, as this is a strong-enough signal that the user wants to enable the hook. However, since most hooks will probably not require any custom configuration, this would result in configurations looking like:\r\n\r\n```yaml\r\nPreCommit:\r\n  HookOne: {}\r\n\r\n  HookTwo: {}\r\n```\r\n\r\n...which is a bit odd to read, and the requirement of an explicit `{}` is a quirk of YAML that most would not realize. Thus it seems like consistently requiring `enabled: true` would read better and serve as a reminder that each hook can be configured, and also result in cleaner diffs when adding/removing options (since you don't need to touch the `HookOne:` line).\r\n\r\n```yaml\r\nPreCommit:\r\n  HookOne:\r\n    enabled: true\r\n\r\n  HookTwo:\r\n    enabled: true\r\n```\r\n\r\nSince we're pushing for `enabled` to be explicitly required, we should display a warning (or just error) if a hook that is present in `.overcommit.yml` does not have an explicit `enabled` option listed, in order to help new users get started with the tool. If they do not intend for the hook to be enabled, they can always set it to `enabled: false`.\r\n\r\nBlocker for 0.24.0 release. Comments welcome."}}