Skip to content

Commit

Permalink
fix: add analytics for new issues format
Browse files Browse the repository at this point in the history
For smooth rollout of new issues format with actionable remmediation,
it's useful to monitor how it is used and verify potential edgecases.
  • Loading branch information
Mila Votradovec committed Oct 10, 2019
1 parent 79b792b commit 6eefb4a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cli/commands/test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
formatIssuesWithRemediation,
getSeverityValue,
} from './formatters/remediation-based-format-issues';
import * as analytics from '../../../lib/analytics';

const debug = Debug('snyk');
const SEPARATOR = '\n-------------------------------------------------------\n';
Expand Down Expand Up @@ -377,12 +378,14 @@ function displayResult(res, options: Options & TestOptions) {

let groupedVulnInfoOutput;
if (res.remediation) {
analytics.add('actionableRemediation', true);
groupedVulnInfoOutput = formatIssuesWithRemediation(
filteredSortedGroupedVulns,
res.remediation,
options,
);
} else {
analytics.add('actionableRemediation', false);
groupedVulnInfoOutput = filteredSortedGroupedVulns.map((vuln) =>
formatIssues(vuln, options),
);
Expand Down

0 comments on commit 6eefb4a

Please sign in to comment.