File tree 15 files changed +285
-290
lines changed
15 files changed +285
-290
lines changed Original file line number Diff line number Diff line change 1
- oci-validate-examples
2
1
code-of-conduct.md
3
2
oci-image-tool
3
+ oci-validate-examples
4
+ output
Original file line number Diff line number Diff line change
1
+ // Copyright 2016 The Linux Foundation
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -o errexit
4
+ set -o nounset
5
+ set -o pipefail
6
+
7
+ ret=0
8
+
9
+ for file in $( find . -type f -iname ' *.go' ! -path ' ./vendor/*' ) ; do
10
+ (head -n3 " ${file} " | grep -Eq " (Copyright|generated|GENERATED)" ) || (echo -e " ${file} :missing license header" && ret=1)
11
+ done
12
+
13
+ exit $ret
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -o errexit
4
+ set -o nounset
5
+ set -o pipefail
6
+
7
+ if [ ! $( command -v gometalinter) ]; then
8
+ go get github.com/alecthomas/gometalinter
9
+ gometalinter --update --install
10
+ fi
11
+
12
+ for d in $( find . -type d -not -iwholename ' *.git*' -a -not -iname ' .tool' ) ; do
13
+ gometalinter \
14
+ --exclude=' error return value not checked.*(Close|Log|Print).*\(errcheck\)$' \
15
+ --exclude=' .*_test\.go:.*error return value not checked.*\(errcheck\)$' \
16
+ --exclude=' duplicate of.*_test.go.*\(dupl\)$' \
17
+ --exclude=' schema/fs.go' \
18
+ --disable=aligncheck \
19
+ --disable=gotype \
20
+ --cyclo-over=20 \
21
+ --tests \
22
+ --deadline=10s " ${d} "
23
+ done
Original file line number Diff line number Diff line change @@ -18,5 +18,6 @@ install: true
18
18
script :
19
19
- git-validation -run DCO,short-subject -v -range ${TRAVIS_COMMIT_RANGE}
20
20
- make lint
21
+ - make check-license
21
22
- make test
22
23
- make oci-image-tool
Original file line number Diff line number Diff line change @@ -64,8 +64,17 @@ oci-validate-examples: cmd/oci-validate-examples/main.go
64
64
oci-image-tool :
65
65
go build ./cmd/oci-image-tool
66
66
67
+ schema-fs :
68
+ @echo " generating schema fs"
69
+ @cd schema && echo -e " $$ (cat ../.header)\n\n$$ (go generate)" > fs.go
70
+
71
+ check-license :
72
+ @echo " checking license headers"
73
+ @./.tool/check-license
74
+
67
75
lint :
68
- for d in $( shell find . -type d -not -iwholename ' *.git*' ) ; do echo " $$ {d}" && ./lint " $$ {d}" ; done
76
+ @echo " checking lint"
77
+ @./.tool/lint
69
78
70
79
test :
71
80
go test -race ./...
@@ -78,6 +87,7 @@ media-types.png: media-types.dot
78
87
.PHONY : \
79
88
validate-examples \
80
89
oci-image-tool \
90
+ check-license \
81
91
lint \
82
92
docs \
83
93
test
Original file line number Diff line number Diff line change
1
+ // Copyright 2016 The Linux Foundation
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
1
15
package main
2
16
3
17
import (
Original file line number Diff line number Diff line change
1
+ // Copyright 2016 The Linux Foundation
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
1
15
package main
2
16
3
17
import (
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ // Copyright 2016 The Linux Foundation
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
1
15
// Package schema defines the OCI image media types, schema definitions and validation functions.
2
16
package schema
You can’t perform that action at this time.
0 commit comments