Sha256: 337d02abecb1d19d569908152aa984b18ab479075bb27193210d3a3d83d6e11c
Contents?: true
Size: 388 Bytes
Versions: 8
Compression:
Stored size: 388 Bytes
Contents
module Overcommit::Hook::PreCommit # Checks for local paths in files and issues a warning class LocalPathsInGemfile < Base def run result = execute(%w[grep -IHnE (\s*path:\s*)|(\s*:path\s*=>)] + applicable_files) unless result.stdout.empty? return :warn, "Avoid pointing to local paths in Gemfiles:\n#{result.stdout}" end :pass end end end
Version data entries
8 entries across 8 versions & 2 rubygems