Skip to content
This repository was archived by the owner on Mar 28, 2022. It is now read-only.

Commit 235d297

Browse files
committed
Fix some minor sonar bugs and code smells
1 parent 7f63946 commit 235d297

4 files changed

Lines changed: 13 additions & 3 deletions

File tree

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,5 +175,5 @@
175175

176176
END OF TERMS AND CONDITIONS
177177

178-
Copyright 2019 Javier Brea
178+
Copyright 2019 Javier Brea and contributors
179179
Copyright 2019 XbyOrange

lib/Cli.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
Copyright 2019 Javier Brea
23
Copyright 2019 XbyOrange
34
45
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
@@ -142,7 +143,9 @@ class Cli {
142143
if (!input || !input.length) {
143144
return Promise.resolve(featuresNames);
144145
}
145-
return Promise.resolve(featuresNames.filter(feature => feature.includes(input)));
146+
return Promise.resolve(
147+
featuresNames.filter(currentFeature => currentFeature.includes(input))
148+
);
146149
}
147150
});
148151
this._features.current = feature;

sonar-project.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@ sonar.coverage.exclusions=test/**/*
1010
sonar.cpd.exclusions=test/**
1111
sonar.javascript.lcov.reportPaths=coverage/lcov.info
1212
sonar.host.url=https://sonarcloud.io
13+
14+
sonar.issue.ignore.multicriteria=j1
15+
sonar.issue.ignore.multicriteria.j1.ruleKey=javascript:S4144
16+
sonar.issue.ignore.multicriteria.j1.resourceKey=test/**/*

test/utils/CliRunner.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
Copyright 2019 Javier Brea
23
Copyright 2019 XbyOrange
34
45
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
@@ -116,7 +117,9 @@ module.exports = class CliRunner {
116117
return this._exitPromise;
117118
}
118119

119-
async hasPrinted(data, action, timeOut = 1000) {
120+
async hasPrinted(data, inputAction, inputTimeOut = 1000) {
121+
let timeOut = inputTimeOut;
122+
let action = inputAction;
120123
if (isNumber(action)) {
121124
timeOut = action;
122125
action = null;

0 commit comments

Comments
 (0)