Skip to content
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

vint 0.3.21 (new formula) #63333

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions Formula/vint.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
class Vint < Formula
include Language::Python::Virtualenv

desc "Vim script Language Lint"
homepage "https://github.com/Vimjas/vint"
url "https://github.com/Vimjas/vint/archive/v0.3.21.tar.gz"
sha256 "ebbb4ffd790324331aabf82d0b8777db8ce41d72d7c4c1c328bc099359ae06d6"
license "MIT"

depends_on "[email protected]"

resource "PyYAML" do
url "https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz"
sha256 "b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d"
end

resource "ansicolor" do
url "https://files.pythonhosted.org/packages/e0/00/90593d0c3078760bc3ed530f3be381c16329e80a2b47b8e6230c1288ff77/ansicolor-0.2.6.tar.gz"
sha256 "d17e1b07b9dd7ded31699fbca53ae6cd373584f9b6dcbc124d1f321ebad31f1d"
end

resource "chardet" do
url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz"
sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae"
end

def install
virtualenv_install_with_resources
end

test do
system bin/"vint", "--help"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add a more substantial test? For instance, you could create a one-line vim file with an error and check to make sure that running vint on it returns the expected warning/error.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(testpath/"bad.vim").write <<~EOS
not vimscript
EOS
assert_match "E492", shell_output("#{bin}/vint bad.vim", 1)

(testpath/"good.vim").write <<~EOS
" minimal vimrc
syntax on
set backspace=indent,eol,start
filetype plugin indent on
EOS
assert_equal "", shell_output("#{bin}/vint good.vim")
end
end