google / addlicense

A program which ensures source code files have copyright license headers by scanning directory patterns recursively

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why use "//" instead of "/* ... */" for Java and Kotlin?

fstanis opened this issue · comments

It seems the majority of Java projects puts the license on top of the file via multiple comments /* ... */, but addlicense uses // for Java and Kotlin:

addlicense/main.go

Lines 220 to 221 in a029431

case ".cc", ".cpp", ".cs", ".go", ".hh", ".hpp", ".java", ".m", ".mm", ".proto", ".rs", ".scala", ".swift", ".dart", ".groovy", ".kt", ".kts", ".v", ".sv":
lic, err = prefix(tmpl, data, "", "// ", "")

Is there any reason for this? If not, I think we should move .java, .kt and .kts a few lines above with other languages that use /* ... */.

Closing as duplicate of #46, and will continue discussion there.