homebrew-core/Formula/doc8.rb

58 lines
2.5 KiB
Ruby

class Doc8 < Formula
include Language::Python::Virtualenv
desc "Style checker for Sphinx documentation"
homepage "https://github.com/PyCQA/doc8"
url "https://files.pythonhosted.org/packages/f6/6d/d5f29393a900a4f8d0dec089fe3fb287434943ee7e4bbd803ec26c61c4c0/doc8-0.9.0.tar.gz"
sha256 "380b660474be40ce88b5f04fa93470449124dbc850a0318f2ef186162bc1360b"
license "Apache-2.0"
head "https://github.com/PyCQA/doc8.git", branch: "main"
bottle do
sha256 cellar: :any_skip_relocation, arm64_big_sur: "0cfc81cb18f6a918b73f3a45860295ecf9dd8117202b0d73737d530906287d4f"
sha256 cellar: :any_skip_relocation, big_sur: "d66cdc77b805d511adc0c78ca69589e956c187d3382acb21ef2bfcab92e7f9fb"
sha256 cellar: :any_skip_relocation, catalina: "d66cdc77b805d511adc0c78ca69589e956c187d3382acb21ef2bfcab92e7f9fb"
sha256 cellar: :any_skip_relocation, mojave: "d66cdc77b805d511adc0c78ca69589e956c187d3382acb21ef2bfcab92e7f9fb"
end
depends_on "python@3.9"
resource "docutils" do
url "https://files.pythonhosted.org/packages/4c/17/559b4d020f4b46e0287a2eddf2d8ebf76318fd3bd495f1625414b052fdc9/docutils-0.17.1.tar.gz"
sha256 "686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125"
end
resource "pbr" do
url "https://files.pythonhosted.org/packages/35/8c/69ed04ae31ad498c9bdea55766ed4c0c72de596e75ac0d70b58aa25e0acf/pbr-5.6.0.tar.gz"
sha256 "42df03e7797b796625b1029c0400279c7c34fd7df24a7d7818a1abb5b38710dd"
end
resource "restructuredtext-lint" do
url "https://files.pythonhosted.org/packages/45/69/5e43d0e8c2ca903aaa2def7f755b97a3aedc5793630abbd004f2afc3b295/restructuredtext_lint-1.3.2.tar.gz"
sha256 "d3b10a1fe2ecac537e51ae6d151b223b78de9fafdd50e5eb6b08c243df173c80"
end
resource "stevedore" do
url "https://files.pythonhosted.org/packages/95/bc/dc386a920942dbdfe480c8a4d953ff77ed3dec99ce736634b6ec4f2d97c1/stevedore-3.3.0.tar.gz"
sha256 "3a5bbd0652bf552748871eaa73a4a8dc2899786bc497a2aa1fcb4dcdb0debeee"
end
resource "Pygments" do
url "https://files.pythonhosted.org/packages/ba/6e/7a7c13c21d8a4a7f82ccbfe257a045890d4dbf18c023f985f565f97393e3/Pygments-2.9.0.tar.gz"
sha256 "a18f47b506a429f6f4b9df81bb02beab9ca21d0a5fee38ed15aef65f0545519f"
end
def install
virtualenv_install_with_resources
end
test do
(testpath/"broken.rst").write <<~EOS
Heading
------
EOS
output = pipe_output("#{bin}/doc8 broken.rst 2>&1")
assert_match "D000 Title underline too short.", output
end
end