autogenerated_exclude: increase scanner max buffer size

Ref: #954
This commit is contained in:
Aleksandr Razumov 2020-02-28 14:09:42 +03:00
parent 938e1dde94
commit 8100507682

View File

@ -124,8 +124,8 @@ func getDoc(filePath string) (string, error) {
// Issue 954: Some lines can be very long, e.g. auto-generated // Issue 954: Some lines can be very long, e.g. auto-generated
// embedded resources. Reported on file of 86.2KB. // embedded resources. Reported on file of 86.2KB.
const ( const (
maxSize = 512 * 1024 // 512KB should be enough maxSize = 10 * 1024 * 1024 // 10MB should be enough
initialSize = 4096 // same as startBufSize in bufio initialSize = 4096 // same as startBufSize in bufio
) )
scanner.Buffer(make([]byte, initialSize), maxSize) scanner.Buffer(make([]byte, initialSize), maxSize)