We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ca0cfe6 commit 81dd8c2Copy full SHA for 81dd8c2
config/default.yml
@@ -296,6 +296,7 @@ PreCommit:
296
FileSize:
297
enabled: false
298
description: 'Check for oversized files'
299
+ size_limit_bytes: 1_000_000
300
301
Flay:
302
lib/overcommit/hook/pre_commit/file_size.rb
@@ -3,8 +3,6 @@
3
module Overcommit::Hook::PreCommit
4
# Checks for oversized files before committing.
5
class FileSize < Base
6
- DEFAULT_SIZE_LIMIT_BYTES = 1_000_000 # 1MB
7
-
8
def run
9
return :pass if oversized_files.empty?
10
@@ -26,7 +24,7 @@ def build_oversized_file_list
26
24
end
27
25
28
def size_limit_bytes
29
- config.fetch('size_limit_bytes', DEFAULT_SIZE_LIMIT_BYTES)
+ config.fetch('size_limit_bytes')
30
31
32
def error_message_for(file)
0 commit comments