From 8100507682af6249dd5cd7fde440a2b1f1b082b7 Mon Sep 17 00:00:00 2001 From: Aleksandr Razumov <ar@gortc.io> Date: Fri, 28 Feb 2020 14:09:42 +0300 Subject: [PATCH] autogenerated_exclude: increase scanner max buffer size Ref: #954 --- pkg/result/processors/autogenerated_exclude.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/result/processors/autogenerated_exclude.go b/pkg/result/processors/autogenerated_exclude.go index d804351b..8bdaae66 100644 --- a/pkg/result/processors/autogenerated_exclude.go +++ b/pkg/result/processors/autogenerated_exclude.go @@ -124,8 +124,8 @@ func getDoc(filePath string) (string, error) { // Issue 954: Some lines can be very long, e.g. auto-generated // embedded resources. Reported on file of 86.2KB. const ( - maxSize = 512 * 1024 // 512KB should be enough - initialSize = 4096 // same as startBufSize in bufio + maxSize = 10 * 1024 * 1024 // 10MB should be enough + initialSize = 4096 // same as startBufSize in bufio ) scanner.Buffer(make([]byte, initialSize), maxSize)