Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Commit

Permalink
java: ignore files with 'sources' or 'javadoc' in the name (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcoops authored Nov 19, 2021
1 parent 095ff94 commit 204d9ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions deplist.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ func GetDeps(fullPath string) ([]Dependency, Bitmask, error) {

// java
if ext == ".jar" || ext == ".war" || ext == ".ear" || ext == ".adm" || ext == ".hpi" || ext == ".zip" {
file := strings.Replace(filepath.Base(path), ext, "", 1) // get filename, check if we can ignore
if strings.HasSuffix(file, "-sources") || strings.HasSuffix(file, "-javadoc") {
return nil
}
pkgs, err := scan.GetJarDeps(path)
if err == nil {

Expand Down

0 comments on commit 204d9ee

Please sign in to comment.