Skip to content

Commit

Permalink
scc 2.7.0 (new formula)
Browse files Browse the repository at this point in the history
  • Loading branch information
elindsey committed Sep 14, 2019
1 parent 30f84ab commit 993ebd1
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Formula/scc.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
class Scc < Formula
desc "Fast and accurate code counter with complexity and COCOMO estimates"
homepage "https://github.com/boyter/scc/"
url "https://github.com/boyter/scc/archive/v2.7.0.tar.gz"
sha256 "16238df60bef3f2a758e0516c9bec3ed24e2dcb29386ad2c183eef44d7f1db67"

depends_on "go" => :build

def install
ENV["GOPATH"] = buildpath
(buildpath/"src/github.com/boyter/scc/").install Dir["*"]
system "go", "build", "-o", "#{bin}/scc", "-v", "github.com/boyter/scc/"
end

test do
(testpath/"test.c").write <<~EOS
#include <stdio.h>
int main(void) {
return 0;
}
EOS

assert_match "C,test.c,test.c,4,4,0,0,0\n", shell_output("#{bin}/scc -fcsv test.c")
end
end

0 comments on commit 993ebd1

Please sign in to comment.