aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/wine-vc.js
diff options
context:
space:
mode:
authorRubén Rincón Blanco <ruben@rinconblanco.es>2020-08-04 22:39:02 +0200
committerGitHub <noreply@github.com>2020-08-04 16:39:02 -0400
commitccff4b9ee5a37c13f0973b52e8f90a8be8359fea (patch)
tree0022c9364824c5b4e4f5818c4abbf654aa99f2e8 /lib/compilers/wine-vc.js
parent7126b39a6bdeabffc312c8a117ec7af072ef6a1c (diff)
downloadcompiler-explorer-ccff4b9ee5a37c13f0973b52e8f90a8be8359fea.tar.gz
compiler-explorer-ccff4b9ee5a37c13f0973b52e8f90a8be8359fea.zip
Add new eslint rules (#2121)
The largest changes here are: - enforcing single quotes for strings - enforcing trailing commas where possible In addition to those we have enabled several eslint plugins: - plugin:requirejs/recommended, to enforce some conventions in require statements - plugin:node/recommended, to enforce correct usage of various node.js APIs - plugin:unicorn/recommended, which contains a pretty mixed bag of useful rules This PR attempts to not change code behavior when possible. In cases where fixing existing code would change semantics, a linting exclusion has been placed in the code base to silence the error. You can find these by searching for `eslint-disable-next-line`. Co-authored-by: Austin Morton <austinpmorton@gmail.com>
Diffstat (limited to 'lib/compilers/wine-vc.js')
-rw-r--r--lib/compilers/wine-vc.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/compilers/wine-vc.js b/lib/compilers/wine-vc.js
index c8a50bf03..cd862ee2e 100644
--- a/lib/compilers/wine-vc.js
+++ b/lib/compilers/wine-vc.js
@@ -24,9 +24,9 @@
const BaseCompiler = require('../base-compiler'),
AsmParser = require('../asm-parser-vc'),
- argumentParsers = require("./argument-parsers"),
+ argumentParsers = require('./argument-parsers'),
path = require('path'),
- PELabelReconstructor = require("../pe32-support").labelReconstructor;
+ PELabelReconstructor = require('../pe32-support').labelReconstructor;
class WineVcCompiler extends BaseCompiler {
constructor(info, env) {
@@ -54,18 +54,18 @@ class WineVcCompiler extends BaseCompiler {
}
getExecutableFilename(dirPath, outputFilebase) {
- return this.getOutputFilename(dirPath, outputFilebase) + ".exe";
+ return this.getOutputFilename(dirPath, outputFilebase) + '.exe';
}
async objdump(outputFilename, result, maxSize, intelAsm) {
const dirPath = path.dirname(outputFilename);
- outputFilename = this.getExecutableFilename(dirPath, "output");
+ outputFilename = this.getExecutableFilename(dirPath, 'output');
- let args = ["-d", outputFilename];
- if (intelAsm) args = args.concat(["-M", "intel"]);
+ let args = ['-d', outputFilename];
+ if (intelAsm) args = args.concat(['-M', 'intel']);
const objResult = await this.exec(this.compiler.objdumper, args, {maxOutput: 0, customCwd: dirPath});
if (objResult.code !== 0) {
- result.asm = "<No output: objdump returned " + objResult.code + ">";
+ result.asm = '<No output: objdump returned ' + objResult.code + '>';
} else {
result.asm = objResult.stdout;
}
@@ -78,8 +78,8 @@ class WineVcCompiler extends BaseCompiler {
const mapFilename = outputFilename + '.map';
filters.preProcessBinaryAsmLines = (asmLines) => {
- const reconstructor = new PELabelReconstructor(asmLines, mapFilename, false, "vs");
- reconstructor.run("output.s.obj");
+ const reconstructor = new PELabelReconstructor(asmLines, mapFilename, false, 'vs');
+ reconstructor.run('output.s.obj');
return reconstructor.asmLines;
};
@@ -90,7 +90,7 @@ class WineVcCompiler extends BaseCompiler {
'/Fa' + this.filename(outputFilename),
'/Fo' + this.filename(outputFilename + '.obj'),
'/Fm' + this.filename(mapFilename),
- '/Fe' + this.filename(this.getExecutableFilename(path.dirname(outputFilename), "output"))
+ '/Fe' + this.filename(this.getExecutableFilename(path.dirname(outputFilename), 'output')),
];
} else {
return [
@@ -98,7 +98,7 @@ class WineVcCompiler extends BaseCompiler {
'/FA',
'/c',
'/Fa' + this.filename(outputFilename),
- '/Fo' + this.filename(outputFilename + '.obj')
+ '/Fo' + this.filename(outputFilename + '.obj'),
];
}
}