mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-07 22:54:11 -05:00
Run rubocop 1.79.2 on tree (#12436)
This commit is contained in:
committed by
GitHub
parent
682abc28b7
commit
2e15479d51
@@ -3,7 +3,7 @@
|
|||||||
# These pre-commit hooks mirror the Github CI, so running them locally will catch errors earlier.
|
# These pre-commit hooks mirror the Github CI, so running them locally will catch errors earlier.
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/rubocop/rubocop
|
- repo: https://github.com/rubocop/rubocop
|
||||||
rev: v1.77.0
|
rev: v1.79.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: rubocop
|
- id: rubocop
|
||||||
- repo: https://github.com/syntaqx/git-hooks
|
- repo: https://github.com/syntaqx/git-hooks
|
||||||
|
|||||||
@@ -416,13 +416,13 @@ unless defined?($__crew_lockfile__) || defined?(CrewLockfile)
|
|||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
begin
|
begin
|
||||||
return((Time.now - File.stat(@path).mtime) < @max_age)
|
return ((Time.now - File.stat(@path).mtime) < @max_age)
|
||||||
rescue Errno::ENOENT
|
rescue Errno::ENOENT
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
exist = File.exist?(@path)
|
exist = File.exist?(@path)
|
||||||
return(exist ? true : nil)
|
return (exist ? true : nil)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -518,7 +518,7 @@ unless defined?($__crew_lockfile__) || defined?(CrewLockfile)
|
|||||||
ensure
|
ensure
|
||||||
File.umask umask if umask
|
File.umask umask if umask
|
||||||
end
|
end
|
||||||
return(block_given? ? begin; yield f; ensure; f.close; end : f)
|
return (block_given? ? begin; yield f; ensure; f.close; end : f)
|
||||||
end
|
end
|
||||||
|
|
||||||
def touch(path)
|
def touch(path)
|
||||||
|
|||||||
Reference in New Issue
Block a user