Skip to content

Commit 304b382

Browse files
committed
Improve visibility of the files with unsupported extensions
1 parent 87b93e5 commit 304b382

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

addlicense/main.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ func processFile(f *file, t *template.Template, license LicenseData, checkonly b
241241
return err
242242
}
243243
if lic == nil { // Unknown fileExtension
244+
logger.Printf("[WARN] %s - unknown file extension", f.path)
244245
return nil
245246
}
246247
// Check if file has a license
@@ -259,8 +260,12 @@ func processFile(f *file, t *template.Template, license LicenseData, checkonly b
259260
logger.Printf("%s: %v", f.path, err)
260261
return err
261262
}
262-
if verbose && modified {
263-
logger.Printf("%s modified", f.path)
263+
if verbose {
264+
if modified {
265+
logger.Printf("%s modified", f.path)
266+
} else {
267+
logger.Printf("[WARN] %s - unknown file extension", f.path)
268+
}
264269
}
265270
}
266271
return nil

0 commit comments

Comments
 (0)