Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve visibility of the files with unsupported extensions
Browse files Browse the repository at this point in the history
IvanRibakov committed Jan 27, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 87b93e5 commit 304b382
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions addlicense/main.go
Original file line number Diff line number Diff line change
@@ -241,6 +241,7 @@ func processFile(f *file, t *template.Template, license LicenseData, checkonly b
return err
}
if lic == nil { // Unknown fileExtension
logger.Printf("[WARN] %s - unknown file extension", f.path)
return nil
}
// Check if file has a license
@@ -259,8 +260,12 @@ func processFile(f *file, t *template.Template, license LicenseData, checkonly b
logger.Printf("%s: %v", f.path, err)
return err
}
if verbose && modified {
logger.Printf("%s modified", f.path)
if verbose {
if modified {
logger.Printf("%s modified", f.path)
} else {
logger.Printf("[WARN] %s - unknown file extension", f.path)
}
}
}
return nil

0 comments on commit 304b382

Please sign in to comment.