From 992952d86844805231bcc8a92063c122f721658d Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Sat, 10 Oct 2020 17:46:22 +0200 Subject: [PATCH] nimpretty: do not produce 'line too long' messages (#15541) --- compiler/lexer.nim | 5 +++-- nimpretty/tester.nim | 3 --- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/compiler/lexer.nim b/compiler/lexer.nim index 0cf00e612..9b1dc642d 100644 --- a/compiler/lexer.nim +++ b/compiler/lexer.nim @@ -758,8 +758,9 @@ proc handleCRLF(L: var Lexer, pos: int): int = template registerLine = let col = L.getColNumber(pos) - if col > MaxLineLength: - lexMessagePos(L, hintLineTooLong, pos) + when not defined(nimpretty): + if col > MaxLineLength: + lexMessagePos(L, hintLineTooLong, pos) case L.buf[pos] of CR: diff --git a/nimpretty/tester.nim b/nimpretty/tester.nim index 6124eb66a..d646b25ce 100644 --- a/nimpretty/tester.nim +++ b/nimpretty/tester.nim @@ -60,7 +60,4 @@ for t in allFiles: testTogether(allFiles) removeDir(outputdir) - - - if failures > 0: quit($failures & " failures occurred.")