summary refs log tree commit diff stats
path: root/compiler/pretty.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/pretty.nim')
-rw-r--r--compiler/pretty.nim28
1 files changed, 14 insertions, 14 deletions
diff --git a/compiler/pretty.nim b/compiler/pretty.nim
index b7265b946..436181bbc 100644
--- a/compiler/pretty.nim
+++ b/compiler/pretty.nim
@@ -31,20 +31,20 @@ type
 proc overwriteFiles*() =
   let doStrip = options.getConfigVar("pretty.strip").normalize == "on"
   for i in 0 .. high(gSourceFiles):
-    if not gSourceFiles[i].dirty: continue
-    let newFile = if gOverWrite: gSourceFiles[i].fullpath
-                  else: gSourceFiles[i].fullpath.changeFileExt(".pretty.nim")
-    try:
-      var f = open(newFile, fmWrite)
-      for line in gSourceFiles[i].lines:
-        if doStrip:
-          f.write line.strip(leading = false, trailing = true)
-        else:
-          f.write line
-        f.write("\L")
-      f.close
-    except IOError:
-      rawMessage(errCannotOpenFile, newFile)
+    if gSourceFiles[i].dirty and not gSourceFiles[i].isNimfixFile:
+      let newFile = if gOverWrite: gSourceFiles[i].fullpath
+                    else: gSourceFiles[i].fullpath.changeFileExt(".pretty.nim")
+      try:
+        var f = open(newFile, fmWrite)
+        for line in gSourceFiles[i].lines:
+          if doStrip:
+            f.write line.strip(leading = false, trailing = true)
+          else:
+            f.write line
+          f.write("\L")
+        f.close
+      except IOError:
+        rawMessage(errCannotOpenFile, newFile)
 
 proc `=~`(s: string, a: openArray[string]): bool =
   for x in a:
eas Rumpf <rumpf_a@web.de> 2019-04-25 07:59:34 +0200 committer GitHub <noreply@github.com> 2019-04-25 07:59:34 +0200 fixes #11095 (#11104)' href='/ahoang/Nim/commit/tests/destructor/tobjfield_analysis.nim?h=devel&id=eb9043c0e9f835cb42b83d3a954058cdde01a72b'>eb9043c0e ^
045e026d0 ^



eb9043c0e ^
045e026d0 ^
eb9043c0e ^

045e026d0 ^

eb9043c0e ^



045e026d0 ^

eb9043c0e ^

045e026d0 ^
eb9043c0e ^









045e026d0 ^






1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51