Browse Source

feat: use run-clang-format in cc --fix mode

Charles Kerr 6 years ago
parent
commit
03553abc11
1 changed files with 4 additions and 1 deletions
  1. 4 1
      script/lint.js

+ 4 - 1
script/lint.js

@@ -59,7 +59,10 @@ const LINTERS = [ {
         }
       }
     }
-    if (result.status) process.exit(result.status)
+    if (result.status) {
+      if (opts.fix) spawnAndCheckExitCode('python', ['script/run-clang-format.py', ...filenames])
+      process.exit(result.status)
+    }
   }
 }, {
   key: 'python',