jish / pre-commit

A slightly improved pre-commit hook for git
https://jish.github.io/pre-commit/
Other
796 stars 96 forks source link

local check file 'config/pre-commit.rb' should obey the 'Use snake_case for source file names' rule #182

Closed zhenyuchen closed 10 years ago

zhenyuchen commented 10 years ago

If I use the local check and put a file in config folder and named pre-commit.rb then it will give me a Use snake_case for source file names warn message.

I think we should rename this file, like pre_commit.rb? Thanks.

zhenyuchen commented 10 years ago

Sorry I am confusing rubocop with pre-commit... This warn message was given by rubocop. (:

mpapis commented 10 years ago

@jish we already use lib/plugins/pre_commit/checks with the underscore, we could as much rename the main file lib/pre-commit.rb and test/files/pre-commit.rb - what do you think?

jish commented 10 years ago

Yea, I'm ok with renaming the files in this gem to use underscores e.g. lib/pre-commit.rb.

However, if we rename the config file for the local check lib/pre-commit.rb, we'll need a deprecation strategy. We can just check both for a while, and the consumer can use whichever one they like.

mpapis commented 10 years ago

I would leave the - version till we get to 1.0.0, and make the _ the only one starting from 1.0.0

zhenyuchen commented 10 years ago

Great! :+1:

mpapis commented 10 years ago

fixed with #184 - closing, please let me know if you still need help