Created
November 15, 2018 05:01
-
-
Save tkfm-yamaguchi/04272db5888dd9e7bc2cbdbe5383e64e to your computer and use it in GitHub Desktop.
formatter for rubocop: output relative path with emacs style
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module RuboCop | |
module Formatter | |
class EmacsStyleFormatter < BaseFormatter | |
def file_finished_with_relative_path(file, offenses) | |
path = Pathname(file).relative_path_from(Pathname.pwd).to_s | |
file_finished_without_relative_path(path, offenses) | |
end | |
alias file_finished_without_relative_path file_finished | |
alias file_finished file_finished_with_relative_path | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment