Skip to content

Commit

Permalink
refactor(npm): Stop flagging analyzer issues for integrity checks
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
fviernau committed Jan 26, 2024
1 parent 356d8ec commit 9e44675
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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://[email protected]/jonschlinkert/gulp-format-md.git "
severity: "WARNING"
- timestamp: "1970-01-01T00:00:00Z"
source: "NPM"
message: "skipping integrity check for git dependency ssh://[email protected]/mochajs/mocha.git "
severity: "WARNING"
- timestamp: "1970-01-01T00:00:00Z"
source: "NPM"
message: "skipping integrity check for git dependency ssh://[email protected]/tinydesk/angular-tileview.git "
severity: "WARNING"
11 changes: 9 additions & 2 deletions plugins/package-managers/node/src/main/kotlin/Npm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,15 @@ private fun nodeModulesDirForPackageJson(packageJson: File): File? {
}

private fun List<String>.groupLines(marker: String): List<String> {
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<String>()
val minCommonPrefixLength = 5

val issueLines = mapNotNull { line ->
Expand Down

0 comments on commit 9e44675

Please sign in to comment.