Skip to content

Commit 7092aaa

Browse files
authored
Merge pull request #8 from inteon/makefile
Add copyright, add makefile unit-test & make 'make verify' work
2 parents 37bb601 + 9ba7748 commit 7092aaa

File tree

29 files changed

+484
-17
lines changed

29 files changed

+484
-17
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/_bin

heuristics/newlines.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright 2024 The cert-manager Authors.
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+
117
package heuristics
218

319
import (

heuristics/newlines_test.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright 2024 The cert-manager Authors.
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+
117
package heuristics
218

319
import (

heuristics/sniffer.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright 2024 The cert-manager Authors.
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+
117
package heuristics
218

319
import (

heuristics/sniffer_test.go

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright 2024 The cert-manager Authors.
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+
117
package heuristics
218

319
import (
@@ -207,7 +223,7 @@ func TestParseCommentIntoBlocks(t *testing.T) {
207223
Segments: []CommentBlockSegment{
208224
{
209225
Type: ContentTypeText,
210-
Contents: []string{" This is an example single line comment"},
226+
Contents: []string{"This is an example single line comment"},
211227
},
212228
},
213229
},
@@ -228,7 +244,7 @@ func TestParseCommentIntoBlocks(t *testing.T) {
228244
Segments: []CommentBlockSegment{
229245
{
230246
Type: ContentTypeText,
231-
Contents: []string{" This is an example multi-line", " comment"},
247+
Contents: []string{"This is an example multi-line", "comment"},
232248
},
233249
},
234250
},
@@ -251,11 +267,11 @@ func TestParseCommentIntoBlocks(t *testing.T) {
251267
Segments: []CommentBlockSegment{
252268
{
253269
Type: ContentTypeText,
254-
Contents: []string{" This is an example multi-line", " comment followed by some yaml"},
270+
Contents: []string{"This is an example multi-line", "comment followed by some yaml"},
255271
},
256272
{
257273
Type: ContentTypeYaml,
258-
Contents: []string{" foo:", " bar: baz"},
274+
Contents: []string{"foo:", " bar: baz"},
259275
},
260276
},
261277
},
@@ -280,19 +296,19 @@ func TestParseCommentIntoBlocks(t *testing.T) {
280296
Segments: []CommentBlockSegment{
281297
{
282298
Type: ContentTypeText,
283-
Contents: []string{" This is an example multi-line", " comment followed by some yaml"},
299+
Contents: []string{"This is an example multi-line", "comment followed by some yaml"},
284300
},
285301
{
286302
Type: ContentTypeYaml,
287-
Contents: []string{" foo:", " bar: baz"},
303+
Contents: []string{"foo:", " bar: baz"},
288304
},
289305
},
290306
},
291307
{
292308
Segments: []CommentBlockSegment{
293309
{
294310
Type: ContentTypeText,
295-
Contents: []string{" This is another comment"},
311+
Contents: []string{"This is another comment"},
296312
},
297313
},
298314
},

klone.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,35 @@ targets:
1010
- folder_name: boilerplate
1111
repo_url: https://github.com/cert-manager/makefile-modules.git
1212
repo_ref: main
13-
repo_hash: 6dd5775328055379827511b82508ee6847db60e0
13+
repo_hash: 170011a316b4243134effad30cbc415a331baa97
1414
repo_path: modules/boilerplate
15+
- folder_name: generate-verify
16+
repo_url: https://github.com/cert-manager/makefile-modules.git
17+
repo_ref: main
18+
repo_hash: 170011a316b4243134effad30cbc415a331baa97
19+
repo_path: modules/generate-verify
1520
- folder_name: help
1621
repo_url: https://github.com/cert-manager/makefile-modules.git
1722
repo_ref: main
18-
repo_hash: 6dd5775328055379827511b82508ee6847db60e0
23+
repo_hash: 170011a316b4243134effad30cbc415a331baa97
1924
repo_path: modules/help
2025
- folder_name: klone
2126
repo_url: https://github.com/cert-manager/makefile-modules.git
2227
repo_ref: main
23-
repo_hash: 6dd5775328055379827511b82508ee6847db60e0
28+
repo_hash: 170011a316b4243134effad30cbc415a331baa97
2429
repo_path: modules/klone
2530
- folder_name: oci-image
2631
repo_url: https://github.com/cert-manager/makefile-modules.git
2732
repo_ref: main
28-
repo_hash: 6dd5775328055379827511b82508ee6847db60e0
33+
repo_hash: 170011a316b4243134effad30cbc415a331baa97
2934
repo_path: modules/oci-image
3035
- folder_name: repository-base
3136
repo_url: https://github.com/cert-manager/makefile-modules.git
3237
repo_ref: main
33-
repo_hash: 6dd5775328055379827511b82508ee6847db60e0
38+
repo_hash: 170011a316b4243134effad30cbc415a331baa97
3439
repo_path: modules/repository-base
3540
- folder_name: tools
3641
repo_url: https://github.com/cert-manager/makefile-modules.git
3742
repo_ref: main
38-
repo_hash: 6dd5775328055379827511b82508ee6847db60e0
43+
repo_hash: 170011a316b4243134effad30cbc415a331baa97
3944
repo_path: modules/tools

linter/diff.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright 2024 The cert-manager Authors.
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+
117
package linter
218

319
import (

linter/diff_test.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright 2024 The cert-manager Authors.
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+
117
package linter
218

319
import (

linter/linter.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright 2024 The cert-manager Authors.
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+
117
package linter
218

319
import (

linter/parsetemplates/funcs_serdes/funcs_serdes.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright 2024 The cert-manager Authors.
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+
117
package funcs_serdes
218

319
import (

0 commit comments

Comments
 (0)