Skip to content

Commit

Permalink
Improve output
Browse files Browse the repository at this point in the history
  • Loading branch information
kiliczsh committed May 1, 2021
1 parent 9087d93 commit 75e6fc8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8593,19 +8593,18 @@ try {
extension.concat('$');
console.log(`Searching for ${keyword} in ${codebasepath}!`);

var scanResult = "";
let scanResult = "";
fif.find(keyword, codebasepath, extension)
.then(function(results) {
for (let result in results) {
let res = results[result];
var msg;
msg = String('Found "' + res.matches[0] + '" ' + res.count
+ ' times in "' + result + '"');
scanResult = String(scanResult + '\n' + msg);
let msg = String(`Found '${res.matches[0]}' ${res.count} times in '${result}'`);
scanResult = String(`${scanResult} \n ${msg}`);
console.log(scanResult);
}
});
core.setOutput('results', `${scanResult}`);

} catch (error) {
core.setFailed(error.message);
}
Expand Down
9 changes: 4 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,18 @@ try {
extension.concat('$');
console.log(`Searching for ${keyword} in ${codebasepath}!`);

var scanResult = "";
let scanResult = "";
fif.find(keyword, codebasepath, extension)
.then(function(results) {
for (let result in results) {
let res = results[result];
var msg;
msg = String('Found "' + res.matches[0] + '" ' + res.count
+ ' times in "' + result + '"');
scanResult = String(scanResult + '\n' + msg);
let msg = String(`Found '${res.matches[0]}' ${res.count} times in '${result}'`);
scanResult = String(`${scanResult} \n ${msg}`);
console.log(scanResult);
}
});
core.setOutput('results', `${scanResult}`);

} catch (error) {
core.setFailed(error.message);
}

0 comments on commit 75e6fc8

Please sign in to comment.