@zohodesk/testinglibrary 0.1.8-eslint-15 → 0.1.8-eslint-17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -28,7 +28,6 @@ async function runEslintForDiff(cliParams, options = {}) {
|
|
|
28
28
|
const reportPath = getReportPath();
|
|
29
29
|
const diffJSON = diffPath ? require(getDiffJsonPath(diffPath)) : null;
|
|
30
30
|
const filteredDiffFiles = getDiffFiles(diffJSON);
|
|
31
|
-
console.log(filterDiffJson);
|
|
32
31
|
var lintFiles = !filteredDiffFiles ? [_path.default.resolve(process.cwd(), 'uat', 'modules')] : filteredDiffFiles;
|
|
33
32
|
if (lintEnv === 'pre-commit') {
|
|
34
33
|
lintFiles = gitDiffFiles();
|
|
@@ -40,6 +39,9 @@ async function runEslintForDiff(cliParams, options = {}) {
|
|
|
40
39
|
shell: true,
|
|
41
40
|
cwd: process.cwd()
|
|
42
41
|
});
|
|
42
|
+
if (lint_process.stderr) {
|
|
43
|
+
_logger.Logger.log(_logger.Logger.FAILURE_TYPE, lint_process.stderr.toString());
|
|
44
|
+
}
|
|
43
45
|
if (lint_process.error) {
|
|
44
46
|
throw lintFiles.error;
|
|
45
47
|
}
|
|
@@ -23,7 +23,6 @@ var _rootPath = require("../utils/rootPath");
|
|
|
23
23
|
|
|
24
24
|
function runSonarAnalysis(cliParams) {
|
|
25
25
|
var _getFilePathFrmReport, _getFilePathFrmReport2;
|
|
26
|
-
_logger.Logger.log(_logger.Logger.INFO_TYPE, 'sending report to server ...');
|
|
27
26
|
const {
|
|
28
27
|
diffPath,
|
|
29
28
|
repo,
|
|
@@ -52,6 +51,7 @@ function runSonarAnalysis(cliParams) {
|
|
|
52
51
|
const command = ['-jar', sonar_scanner_path, `-Dsonar.host.url=${sonarqube_host_url}`, `-Dsonar.projectKey=${project_name}`, `-Dsonar.login=${Dlogin}`, `-Dsonar.password=${Dpassword}`, `-Dsonar.sources=${source_directories_str}`, `-Dsonar.tests=${resultFilesPath}`, '-Dsonar.language=js', `-Dsonar.eslint.reportPaths=${(0, _eslintLintStage.getReportPath)()}`, '-Dsonar.javascript.lcov.reportPaths=coverage/lcov-report/lcov.info'];
|
|
53
52
|
const child_process = (0, _child_process.spawn)('java', command);
|
|
54
53
|
child_process.stdout.on('data', data => {
|
|
54
|
+
_logger.Logger.log(_logger.Logger.INFO_TYPE, 'sending report to server ...');
|
|
55
55
|
_logger.Logger.log(_logger.Logger.SUCCESS_TYPE, data);
|
|
56
56
|
});
|
|
57
57
|
child_process.stderr.on('data', errorOut => {
|