Skip to content

Commit 38d99b7

Browse files
authored
Merge pull request #43 from TomerAberbach/master
Support DOT files
2 parents 4d786df + c4cb7c1 commit 38d99b7

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ func licenseHeader(path string, tmpl *template.Template, data *copyrightData) ([
213213
switch fileExtension(path) {
214214
default:
215215
return nil, nil
216-
case ".c", ".h":
216+
case ".c", ".h", ".gv":
217217
lic, err = prefix(tmpl, data, "/*", " * ", " */")
218218
case ".js", ".mjs", ".cjs", ".jsx", ".tsx", ".css", ".tf", ".ts":
219219
lic, err = prefix(tmpl, data, "/**", " * ", " */")

testdata/expected/file.gv

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright 2018 Google LLC
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+
graph ethane {
18+
C_0 -- H_0;
19+
C_0 -- H_1;
20+
C_0 -- H_2;
21+
C_0 -- C_1;
22+
C_1 -- H_3;
23+
C_1 -- H_4;
24+
C_1 -- H_5;
25+
}

testdata/initial/file.gv

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
graph ethane {
2+
C_0 -- H_0;
3+
C_0 -- H_1;
4+
C_0 -- H_2;
5+
C_0 -- C_1;
6+
C_1 -- H_3;
7+
C_1 -- H_4;
8+
C_1 -- H_5;
9+
}

0 commit comments

Comments
 (0)