Explorar o código

fix formatting with make format_fix

Brian Gough %!s(int64=6) %!d(string=hai) anos
pai
achega
a3d27b63f1

+ 1 - 1
services/clsi/app/js/DockerRunner.js

@@ -412,7 +412,7 @@ module.exports = DockerRunner = {
           })
         }
       )
-    var inspectContainer = (isRetry) =>
+    var inspectContainer = isRetry =>
       container.inspect(function(error, stats) {
         if ((error != null ? error.statusCode : undefined) === 404) {
           return createAndStartContainer()

+ 6 - 5
services/clsi/app/js/LatexRunner.js

@@ -132,7 +132,8 @@ module.exports = LatexRunner = {
         LatexRunner.writeLogOutput(project_id, directory, output, () => {
           return callback(error, output, stats, timings)
         })
-      }))
+      }
+    ))
   },
 
   writeLogOutput(project_id, directory, output, callback) {
@@ -142,9 +143,9 @@ module.exports = LatexRunner = {
     // internal method for writing non-empty log files
     function _writeFile(file, content, cb) {
       if (content && content.length > 0) {
-        fs.writeFile(file, content, (err) => {
+        fs.writeFile(file, content, err => {
           if (err) {
-            logger.error({ project_id, file }, "error writing log file") // don't fail on error
+            logger.error({ project_id, file }, 'error writing log file') // don't fail on error
           }
           cb()
         })
@@ -153,8 +154,8 @@ module.exports = LatexRunner = {
       }
     }
     // write stdout and stderr, ignoring errors
-    _writeFile(Path.join(directory, "output.stdout"), output.stdout, () => {
-      _writeFile(Path.join(directory, "output.stderr"), output.stderr, () => {
+    _writeFile(Path.join(directory, 'output.stdout'), output.stdout, () => {
+      _writeFile(Path.join(directory, 'output.stderr'), output.stderr, () => {
         callback()
       })
     })

+ 4 - 10
services/clsi/test/unit/js/LatexRunnerTests.js

@@ -38,7 +38,7 @@ describe('LatexRunner', function() {
           })
         },
         './CommandRunner': (this.CommandRunner = {}),
-        'fs': (this.fs = {
+        fs: (this.fs = {
           writeFile: sinon.stub().callsArg(2)
         })
       }
@@ -87,18 +87,12 @@ describe('LatexRunner', function() {
           .should.equal(true)
       })
 
-      it('should record the stdout and stderr', function () {
+      it('should record the stdout and stderr', function() {
         this.fs.writeFile
-          .calledWith(
-            this.directory + '/' + 'output.stdout',
-            "this is stdout"
-          )
+          .calledWith(this.directory + '/' + 'output.stdout', 'this is stdout')
           .should.equal(true)
         this.fs.writeFile
-          .calledWith(
-            this.directory + '/' + 'output.stderr',
-            "this is stderr"
-          )
+          .calledWith(this.directory + '/' + 'output.stderr', 'this is stderr')
           .should.equal(true)
       })
     })

+ 3 - 3
services/clsi/test/unit/js/ResourceWriterTests.js

@@ -262,19 +262,19 @@ describe('ResourceWriter', function() {
         .should.equal(true)
     })
 
-    it('should delete the stdout log file', function () {
+    it('should delete the stdout log file', function() {
       return this.ResourceWriter._deleteFileIfNotDirectory
         .calledWith(path.join(this.basePath, 'output.stdout'))
         .should.equal(true)
     })
 
-    it('should delete the stderr log file', function () {
+    it('should delete the stderr log file', function() {
       return this.ResourceWriter._deleteFileIfNotDirectory
         .calledWith(path.join(this.basePath, 'output.stderr'))
         .should.equal(true)
     })
 
-    it('should delete the extra files', function () {
+    it('should delete the extra files', function() {
       return this.ResourceWriter._deleteFileIfNotDirectory
         .calledWith(path.join(this.basePath, 'extra/file.tex'))
         .should.equal(true)