Skip to content

Commit

Permalink
fix: exclude scaladoc files
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyLewen committed Mar 7, 2024
1 parent 004a75f commit 3e0b5c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/crawler/crawler.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,10 @@ func (c *Crawler) sha1Urls(ctx context.Context, url string) ([]string, error) {
// e.g. https://repo.maven.apache.org/maven2/africa/absa/inception-oauth2-resource-server/1.0.0/
// We need to use `href` to make sure we use the correct filename
if fileName, ok := selection.Attr("href"); ok {
// don't include sources, test, javadocs, scaladoc files
if strings.HasSuffix(fileName, ".jar.sha1") && !strings.HasSuffix(fileName, "sources.jar.sha1") &&
!strings.HasSuffix(fileName, "test.jar.sha1") && !strings.HasSuffix(fileName, "javadoc.jar.sha1") {
!strings.HasSuffix(fileName, "test.jar.sha1") && !strings.HasSuffix(fileName, "javadoc.jar.sha1") &&
!strings.HasSuffix(fileName, ".scaladoc.jar.sha1") {
sha1URLs = append(sha1URLs, url+fileName)
}
}
Expand Down

0 comments on commit 3e0b5c9

Please sign in to comment.