summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Abrahams <jonathan@mongodb.com>2016-02-17 09:24:23 -0500
committerJonathan Abrahams <jonathan@mongodb.com>2016-02-17 09:24:37 -0500
commitff8ca92aafd08c17f93bf00bf7aeaac79643ad02 (patch)
tree9d4b7fd9f83b9fead03ed8ded5090194d7d9bf90
parent3125749c23f8cf341768ecc37c86e64a2c30a356 (diff)
downloadmongo-ff8ca92aafd08c17f93bf00bf7aeaac79643ad02.tar.gz
SERVER-22641 Disable clang-format for template strings in JS code
-rw-r--r--jstests/libs/override_methods/set_majority_read_and_write_concerns.js4
-rwxr-xr-xsrc/mongo/shell/servers.js2
2 files changed, 6 insertions, 0 deletions
diff --git a/jstests/libs/override_methods/set_majority_read_and_write_concerns.js b/jstests/libs/override_methods/set_majority_read_and_write_concerns.js
index 2e11323a9a9..96cdef93ef1 100644
--- a/jstests/libs/override_methods/set_majority_read_and_write_concerns.js
+++ b/jstests/libs/override_methods/set_majority_read_and_write_concerns.js
@@ -13,9 +13,13 @@
if (typeof(jsCode) === "function") {
// Load the override file and immediately invoke the supplied function.
+ // clang-format off
newCode = `load("${overridesFile}"); (${jsCode})();`;
+ // clang-format on
} else {
+ // clang-format off
newCode = `load("${overridesFile}"); ${jsCode};`;
+ // clang-format on
}
return originalStartParallelShell(newCode, port, noConnect);
diff --git a/src/mongo/shell/servers.js b/src/mongo/shell/servers.js
index 78653c04627..8de96e52445 100755
--- a/src/mongo/shell/servers.js
+++ b/src/mongo/shell/servers.js
@@ -768,7 +768,9 @@ MongoRunner.stopMongod = function( port, signal, opts ){
if (!Array.contains(allowedExitCodes, returnCode)) {
throw new MongoRunner.StopError(
+ // clang-format off
`MongoDB process on port ${port} exited with error code ${returnCode}`,
+ // clang-format on
returnCode
);
}