bazelruby / rules_ruby

Formerly canonical rules for ruby, that are about 2-3 years behind current Bazel. If they work for you great, but if not — please try the new rules ruby by Alex Radionov: https://github.com/bazel-contrib/rules_ruby
Apache License 2.0
99 stars 37 forks source link

Adding auto-fix buildifier and auto-fix rubocop #50

Closed kigster closed 4 years ago

kigster commented 4 years ago

Installing a pre-commit git hook with bin/setup as a symlink to bin/pre-commit file.

If, after running the formatters it's determined that some files have changed (using git status -s), it shows the diff between the two states and aborts the commit so that you have a chance to add fixed files.

It does not automatically add anything to git because it would be a very large and often invalid

Also, adding bin/setup help + updating README.