Skip to content

Commit a97ed93

Browse files
authored
Merge pull request #8 from morgante/support_tf
Add support for Terraform files
2 parents 2c0d0d6 + 7685276 commit a97ed93

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func addLicense(path string, fmode os.FileMode, typ string, data *copyrightData)
117117
return nil
118118
case ".c", ".h":
119119
lic, err = prefix(typ, data, "/*", " * ", " */")
120-
case ".js", ".css":
120+
case ".js", ".css", ".tf":
121121
lic, err = prefix(typ, data, "/**", " * ", " */")
122122
case ".cc", ".cpp", ".cs", ".go", ".hh", ".hpp", ".java", ".m", ".mm", ".proto", ".rs", ".scala", ".swift", ".dart":
123123
lic, err = prefix(typ, data, "", "// ", "")

testdata/expected/file.tf

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* Copyright 2016 Google Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
resource "null_resource" "dummy" {}

testdata/initial/file.tf

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
resource "null_resource" "dummy" {}

0 commit comments

Comments
 (0)