From 9e4467553d008f5fdcf4085aa09c39c1750956dc Mon Sep 17 00:00:00 2001 From: Frank Viernau Date: Fri, 26 Jan 2024 10:04:19 +0100 Subject: [PATCH] refactor(npm): Stop flagging analyzer issues for integrity checks The analyzer correctly constructs the dependency tree according to the `package.json`. So, there should be no issues in the result. Integrity cannot be verified because the way the dependencies are specified. There is a plethora of other places where integrity is not verified for which no analyzer issues are created. Signed-off-by: Frank Viernau --- .../synthetic/npm-version-urls-expected-output.yml | 13 ------------- .../package-managers/node/src/main/kotlin/Npm.kt | 11 +++++++++-- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/plugins/package-managers/node/src/funTest/assets/projects/synthetic/npm-version-urls-expected-output.yml b/plugins/package-managers/node/src/funTest/assets/projects/synthetic/npm-version-urls-expected-output.yml index b1c72f9933fe6..e64a626004b00 100644 --- a/plugins/package-managers/node/src/funTest/assets/projects/synthetic/npm-version-urls-expected-output.yml +++ b/plugins/package-managers/node/src/funTest/assets/projects/synthetic/npm-version-urls-expected-output.yml @@ -5148,16 +5148,3 @@ packages: url: "https://github.com/Raynos/xtend.git" revision: "37816c0e2e25da2901d584442235946d5cd8c80d" path: "" -issues: -- timestamp: "1970-01-01T00:00:00Z" - source: "NPM" - message: "skipping integrity check for git dependency ssh://git@github.com/jonschlinkert/gulp-format-md.git " - severity: "WARNING" -- timestamp: "1970-01-01T00:00:00Z" - source: "NPM" - message: "skipping integrity check for git dependency ssh://git@github.com/mochajs/mocha.git " - severity: "WARNING" -- timestamp: "1970-01-01T00:00:00Z" - source: "NPM" - message: "skipping integrity check for git dependency ssh://git@github.com/tinydesk/angular-tileview.git " - severity: "WARNING" diff --git a/plugins/package-managers/node/src/main/kotlin/Npm.kt b/plugins/package-managers/node/src/main/kotlin/Npm.kt index 75fd2349a0347..7615b68021f8a 100644 --- a/plugins/package-managers/node/src/main/kotlin/Npm.kt +++ b/plugins/package-managers/node/src/main/kotlin/Npm.kt @@ -634,8 +634,15 @@ private fun nodeModulesDirForPackageJson(packageJson: File): File? { } private fun List.groupLines(marker: String): List { - val ignorableLinePrefixes = setOf("code ", "deprecated ", "errno ", "path ", "syscall ") - val singleLinePrefixes = setOf("skipping integrity check for git dependency ") + val ignorableLinePrefixes = setOf( + "code ", + "deprecated ", + "errno ", + "path ", + "skipping integrity check for git dependency ", + "syscall " + ) + val singleLinePrefixes = emptySet() val minCommonPrefixLength = 5 val issueLines = mapNotNull { line ->