Sha256: f79aaf8d94e131b19acb3873281e051ce83c0d7f0f549ab8ef585b751e28e74e

Contents?: true

Size: 317 Bytes

Versions: 5

Compression:

Stored size: 317 Bytes

Contents

module Overcommit::Hook::PreCommit
  # Runs `golint` against any modified Golang files.
  class GoLint < Base
    def run
      result = execute([executable] + applicable_files)
      # Unfortunately the exit code is always 0
      return :pass if result.stdout.empty?

      [:fail, result.stdout]
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
jawshooah-overcommit-0.22.0 lib/overcommit/hook/pre_commit/go_lint.rb
overcommit-0.21.0 lib/overcommit/hook/pre_commit/go_lint.rb
overcommit-0.20.0 lib/overcommit/hook/pre_commit/go_lint.rb
overcommit-0.19.0 lib/overcommit/hook/pre_commit/go_lint.rb
overcommit-0.18.0 lib/overcommit/hook/pre_commit/go_lint.rb