Skip to content

Commit

Permalink
rubocop-emacs (new formula; HEAD-only)
Browse files Browse the repository at this point in the history
  • Loading branch information
dunn committed Nov 20, 2015
1 parent 304ab65 commit d0b8cd5
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Formula/rubocop-emacs.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
require File.expand_path("../../Homebrew/emacs_formula", __FILE__)

class RubocopEmacs < EmacsFormula
desc "Emacs interface for RuboCop"
homepage "https://github.com/bbatsov/rubocop-emacs"
head "https://github.com/bbatsov/rubocop-emacs.git"

depends_on :emacs => "24.1"
depends_on "homebrew/emacs/dash-emacs"

def install
byte_compile "rubocop.el"
elisp.install "rubocop.el", "rubocop.elc"
end

test do
(testpath/"test.el").write <<-EOS.undent
(add-to-list 'load-path "#{elisp}")
(load "rubocop")
(print (minibuffer-prompt-width))
EOS
assert_equal "0", shell_output("emacs -Q --batch -l #{testpath}/test.el").strip
end
end

0 comments on commit d0b8cd5

Please sign in to comment.