Skip to content

Commit

Permalink
Fixed SonarQube issues; updated versions
Browse files Browse the repository at this point in the history
  • Loading branch information
bbyars committed May 21, 2017
1 parent 7a48f71 commit ccd415a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ You are welcome to fix any tech debt that you see in SaaS dashboards:
* [Codacy](https://www.codacy.com/app/brandonbyars/mountebank/dashboard)
* [Bithound](https://www.bithound.io/github/bbyars/mountebank/master)
* [Test Coverage](https://codeclimate.com/github/bbyars/mountebank/coverage)
* [SonarQube](https://sonarqube.com/dashboard?id=mountebank)

There are several linting tools run locally as well:

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ you can contact me directly at brandon.byars@gmail.com.

| |Node Version |Ubuntu 12.04 |CentOS 6.7 |OS X Mavericks |Windows Server 2012 |
|-----------------------|:-----------:|:--------------------------------------:|:------------------------------------:|:---------------------------------------:|:-------------------------------------------:|
|npm | v7.8 |[![Build Status][travis-badge]][travis] | (not tested) | [![Build Status][travis-badge]][travis] | [![Build status][appveyor-badge]][appveyor] |
|npm | v7.10 |[![Build Status][travis-badge]][travis] | (not tested) | [![Build Status][travis-badge]][travis] | [![Build status][appveyor-badge]][appveyor] |
|npm | v6.10 (LTS) |[![Build Status][travis-badge]][travis] | (not tested) | [![Build Status][travis-badge]][travis] | [![Build status][appveyor-badge]][appveyor] |
|npm | v4.4 |[![Build Status][travis-badge]][travis] | (not tested) | [![Build Status][travis-badge]][travis] | [![Build status][appveyor-badge]][appveyor] |
|OS package | v6.10 |[![Build Status][travis-badge]][travis] | (not tested | [![Build Status][travis-badge]][travis] | N/A |
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/impostersController.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ function create (protocols, imposters, Imposter, logger) {
var Q = require('q'),
requestImposters = request.body.imposters || [],
validationPromises = requestImposters.map(function (imposter) {
return validate(imposter, logger);
return validate(imposter);
});

logger.debug(requestDetails(request));
Expand Down
8 changes: 4 additions & 4 deletions src/models/dryRunValidator.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ function create (options) {
}));
}

function addDryRunErrors (stub, encoding, errors, logger, imposterState) {
function addDryRunErrors (stub, encoding, errors, logger) {
var Q = require('q'),
deferred = Q.defer();

try {
dryRun(stub, encoding, logger, imposterState).done(deferred.resolve, function (reason) {
dryRun(stub, encoding, logger).done(deferred.resolve, function (reason) {
reason.source = reason.source || JSON.stringify(stub);
errors.push(reason);
deferred.resolve();
Expand Down Expand Up @@ -141,7 +141,7 @@ function create (options) {
});
}

function errorsForStub (stub, encoding, logger, imposterState) {
function errorsForStub (stub, encoding, logger) {
var errors = [],
Q = require('q'),
util = require('util'),
Expand All @@ -163,7 +163,7 @@ function create (options) {
deferred.resolve(errors);
}
else {
addDryRunErrors(stub, encoding, errors, logger, imposterState).done(function () {
addDryRunErrors(stub, encoding, errors, logger).done(function () {
deferred.resolve(errors);
});
}
Expand Down

0 comments on commit ccd415a

Please sign in to comment.