fabric8-analytics-lsp-server
Advanced tools
Comparing version 0.4.1 to 0.4.2
{ | ||
"name": "fabric8-analytics-lsp-server", | ||
"description": "LSP Server for Dependency Analytics", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"author": "Pavel Odvody", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
@@ -13,2 +13,3 @@ /* -------------------------------------------------------------------------------------------- | ||
const aggregators_1 = require("./aggregators"); | ||
const vulnerability_1 = require("./vulnerability"); | ||
const node_fetch_1 = require("node-fetch"); | ||
@@ -293,2 +294,3 @@ const url = require('url'); | ||
let codeActions = []; | ||
let hasAnalyticsDiagonostic = false; | ||
for (let diagnostic of params.context.diagnostics) { | ||
@@ -298,7 +300,10 @@ let codeAction = consumers_1.codeActionsMap[diagnostic.range.start.line + "|" + diagnostic.range.start.character]; | ||
codeActions.push(codeAction); | ||
if (config.provide_fullstack_action) { | ||
codeActions.push(fullStackReportAction); | ||
} | ||
} | ||
if (!hasAnalyticsDiagonostic) { | ||
hasAnalyticsDiagonostic = diagnostic.source === vulnerability_1.AnalyticsSource; | ||
} | ||
} | ||
if (config.provide_fullstack_action && hasAnalyticsDiagonostic) { | ||
codeActions.push(fullStackReportAction); | ||
} | ||
return codeActions; | ||
@@ -305,0 +310,0 @@ }); |
@@ -7,4 +7,6 @@ /* -------------------------------------------------------------------------------------------- | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Vulnerability = void 0; | ||
exports.AnalyticsSource = exports.Vulnerability = void 0; | ||
const vscode_languageserver_1 = require("vscode-languageserver"); | ||
const AnalyticsSource = "\nDependency Analytics Plugin [Powered by Snyk]"; | ||
exports.AnalyticsSource = AnalyticsSource; | ||
/* Vulnerability data along with package name and version */ | ||
@@ -48,3 +50,3 @@ class Vulnerability { | ||
message: msg, | ||
source: '\nDependency Analytics Plugin [Powered by Snyk]', | ||
source: AnalyticsSource, | ||
}; | ||
@@ -51,0 +53,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
86965
917