Skip to content
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

CLI should have smart defaults #110

Open
jish opened this issue Jan 6, 2014 · 3 comments
Open

CLI should have smart defaults #110

jish opened this issue Jan 6, 2014 · 3 comments
Labels

Comments

@jish
Copy link
Owner

jish commented Jan 6, 2014

The current CLI usage is:

pre-commit disbale yaml checks   jshint
pre-commit enable  yaml warnings jshint

We should use "smart" defaults so yaml and checks arguments are unnecessary:

pre-commit enable jshint

But still available as options:

pre-commit disbale --yaml --warnings jshint
@jish
Copy link
Owner Author

jish commented Jan 6, 2014

Not sure if this belongs in a separate issue or not but there is also the question of the terms git and yaml. They may be implementation details. We could consider different terms that specify on this machine, or repo-wide:

pre-commit enable --machine whitespace
pre-commit enable --repo whitespace
pre-commit enable --personal whitespace
pre-commit enable --shared whitespace

I shy away from the terms local and global as they are used in the git vernacular to mean "just this repo", or "all repos on this machine". The connotation we want to convey is "my machine" vs. "all developers of this repo".

@mpapis
Copy link
Collaborator

mpapis commented Jan 6, 2014

it's good here, we can ad the mapping in plugins to answer to flags when given

@deepthawtz
Copy link

What's up Josh?

  1. I love how you opened an issue on your own repo, that's just great. 😄

  2. I'm trying to use pre-commit again across my team and found myself having to read the source code because the README is a bit limited and expects some background knowledge of git precommit hook terminology (e.g., "check" vs. "warning"). I thought it would be nice if a fuller YAML config could be supplied to show the various options for configuration. Personally, I think the YAML config (where you can see everything at once) beats any CLI config. The current CLI usage examples seem clunky IMO. This is super useful project, I'm very glad you're still working on this and I wanted to share my thoughts from a new user perspective. If it were me I might ditch the CLI config stuff and and just go with YAML config only (machine-wide in ~/.pre-commit.yml and per-repo within the repo itself config/pre-commit.yml). Just thoughts, you've obviously put a lot of time into thinking through the CLI enable and disable stuff so maybe there is a good reason why they're in there.

@mpapis mpapis added the feature label Oct 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants