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

java: ignore files with 'sources' in the name #58

Merged
merged 1 commit into from
Nov 19, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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