-
Notifications
You must be signed in to change notification settings - Fork 435
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
[ci] Rake task to run git-cop locally #3693
Conversation
Create a rake task to run git-cop and document it.
task :git_cop do | ||
puts "\nCopying configuration file into ~/.config/git-cop/configuration.yml" | ||
sh "mkdir -p ~/.config/git-cop" | ||
sh "cp ../../dist/git-cop_configuration.yml ~/.config/git-cop/configuration.yml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if I already have this file and why is this user specific? Isn't it rather project specific?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if I already have this file?
This will overwrite it. It is the only way to ensure that you are using the last version of the configuration file.
why is this user specific? Isn't it rather project specific?
This comes from the gem, I asked the same: https://github.com/bkuhlmann/git-cop/issues/3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: I would prefer to use ruby here (in a rake task), instead of bash.
Regarding the overwrite, how about a confirmation dialogue? We could check if the files differ and if so ask for confirmation before overwriting the old conf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to use ruby here (in a rake task), instead of bash.
And how do you want to do this?
Regarding the overwrite, how about a confirmation dialogue? We could check if the files differ and if so ask for confirmation before overwriting the old conf
But I would say that we want that the run configuration is always the one we have inside our project, so I really think all this is not needed and would be annoying.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I dont see any problem with using bash to copy the files and such.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I can live with it I guess...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Nitpick] I agree with Henne that it would be nicer not to have to overwrite the config file every time but if its not easy to change that then I dont think its worth spending a lot of time on that since this is just a tool for development.
LGTM
Create a rake task to run git-cop and document it.![:bowtie: :bowtie:](https://github.githubassets.com/images/icons/emoji/bowtie.png)