From 0809098971080674f723cb219722487e42011fd1 Mon Sep 17 00:00:00 2001 From: Juan Carlos Date: Wed, 4 Mar 2020 06:27:52 -0300 Subject: [PATCH] Nimpretty Fix negative indent breaks code (#13580) --- changelog.md | 1 + nimpretty/nimpretty.nim | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index e0fd649428..87bf8bd08e 100644 --- a/changelog.md +++ b/changelog.md @@ -126,6 +126,7 @@ ### Tool changes +- Fix Nimpretty must not accept negative indentation argument because breaks file. ### Compiler changes diff --git a/nimpretty/nimpretty.nim b/nimpretty/nimpretty.nim index 95f4285984..50d0d725f8 100644 --- a/nimpretty/nimpretty.nim +++ b/nimpretty/nimpretty.nim @@ -44,8 +44,8 @@ proc writeVersion() = type PrettyOptions = object - indWidth: int - maxLineLen: int + indWidth: Natural + maxLineLen: Positive proc prettyPrint(infile, outfile: string, opt: PrettyOptions) = var conf = newConfigRef()