Jenkinsfile,dolt/go/utils/copyrighthdrs: Add a small utility program for checking copyright headers.

This commit is contained in:
Aaron Son
2019-07-23 15:28:44 -07:00
parent fffc760243
commit dfebac8e17
5 changed files with 526 additions and 61 deletions
@@ -35,7 +35,7 @@ func (m *RepoId) Reset() { *m = RepoId{} }
func (m *RepoId) String() string { return proto.CompactTextString(m) }
func (*RepoId) ProtoMessage() {}
func (*RepoId) Descriptor() ([]byte, []int) {
return fileDescriptor_chunkstore_777ebdc2debedb19, []int{0}
return fileDescriptor_chunkstore_6a769066ddb98dcb, []int{0}
}
func (m *RepoId) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RepoId.Unmarshal(m, b)
@@ -81,7 +81,7 @@ func (m *HasChunksRequest) Reset() { *m = HasChunksRequest{} }
func (m *HasChunksRequest) String() string { return proto.CompactTextString(m) }
func (*HasChunksRequest) ProtoMessage() {}
func (*HasChunksRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_chunkstore_777ebdc2debedb19, []int{1}
return fileDescriptor_chunkstore_6a769066ddb98dcb, []int{1}
}
func (m *HasChunksRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_HasChunksRequest.Unmarshal(m, b)
@@ -126,7 +126,7 @@ func (m *HasChunksResponse) Reset() { *m = HasChunksResponse{} }
func (m *HasChunksResponse) String() string { return proto.CompactTextString(m) }
func (*HasChunksResponse) ProtoMessage() {}
func (*HasChunksResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_chunkstore_777ebdc2debedb19, []int{2}
return fileDescriptor_chunkstore_6a769066ddb98dcb, []int{2}
}
func (m *HasChunksResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_HasChunksResponse.Unmarshal(m, b)
@@ -165,7 +165,7 @@ func (m *HttpGetChunk) Reset() { *m = HttpGetChunk{} }
func (m *HttpGetChunk) String() string { return proto.CompactTextString(m) }
func (*HttpGetChunk) ProtoMessage() {}
func (*HttpGetChunk) Descriptor() ([]byte, []int) {
return fileDescriptor_chunkstore_777ebdc2debedb19, []int{3}
return fileDescriptor_chunkstore_6a769066ddb98dcb, []int{3}
}
func (m *HttpGetChunk) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_HttpGetChunk.Unmarshal(m, b)
@@ -212,7 +212,7 @@ func (m *RangeChunk) Reset() { *m = RangeChunk{} }
func (m *RangeChunk) String() string { return proto.CompactTextString(m) }
func (*RangeChunk) ProtoMessage() {}
func (*RangeChunk) Descriptor() ([]byte, []int) {
return fileDescriptor_chunkstore_777ebdc2debedb19, []int{4}
return fileDescriptor_chunkstore_6a769066ddb98dcb, []int{4}
}
func (m *RangeChunk) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RangeChunk.Unmarshal(m, b)
@@ -265,7 +265,7 @@ func (m *HttpGetRange) Reset() { *m = HttpGetRange{} }
func (m *HttpGetRange) String() string { return proto.CompactTextString(m) }
func (*HttpGetRange) ProtoMessage() {}
func (*HttpGetRange) Descriptor() ([]byte, []int) {
return fileDescriptor_chunkstore_777ebdc2debedb19, []int{5}
return fileDescriptor_chunkstore_6a769066ddb98dcb, []int{5}
}
func (m *HttpGetRange) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_HttpGetRange.Unmarshal(m, b)
@@ -313,7 +313,7 @@ func (m *DownloadLoc) Reset() { *m = DownloadLoc{} }
func (m *DownloadLoc) String() string { return proto.CompactTextString(m) }
func (*DownloadLoc) ProtoMessage() {}
func (*DownloadLoc) Descriptor() ([]byte, []int) {
return fileDescriptor_chunkstore_777ebdc2debedb19, []int{6}
return fileDescriptor_chunkstore_6a769066ddb98dcb, []int{6}
}
func (m *DownloadLoc) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DownloadLoc.Unmarshal(m, b)
@@ -455,7 +455,7 @@ func (m *HttpPostChunk) Reset() { *m = HttpPostChunk{} }
func (m *HttpPostChunk) String() string { return proto.CompactTextString(m) }
func (*HttpPostChunk) ProtoMessage() {}
func (*HttpPostChunk) Descriptor() ([]byte, []int) {
return fileDescriptor_chunkstore_777ebdc2debedb19, []int{7}
return fileDescriptor_chunkstore_6a769066ddb98dcb, []int{7}
}
func (m *HttpPostChunk) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_HttpPostChunk.Unmarshal(m, b)
@@ -496,7 +496,7 @@ func (m *UploadLoc) Reset() { *m = UploadLoc{} }
func (m *UploadLoc) String() string { return proto.CompactTextString(m) }
func (*UploadLoc) ProtoMessage() {}
func (*UploadLoc) Descriptor() ([]byte, []int) {
return fileDescriptor_chunkstore_777ebdc2debedb19, []int{8}
return fileDescriptor_chunkstore_6a769066ddb98dcb, []int{8}
}
func (m *UploadLoc) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UploadLoc.Unmarshal(m, b)
@@ -614,7 +614,7 @@ func (m *GetDownloadLocsRequest) Reset() { *m = GetDownloadLocsRequest{}
func (m *GetDownloadLocsRequest) String() string { return proto.CompactTextString(m) }
func (*GetDownloadLocsRequest) ProtoMessage() {}
func (*GetDownloadLocsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_chunkstore_777ebdc2debedb19, []int{9}
return fileDescriptor_chunkstore_6a769066ddb98dcb, []int{9}
}
func (m *GetDownloadLocsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetDownloadLocsRequest.Unmarshal(m, b)
@@ -659,7 +659,7 @@ func (m *GetDownloadLocsResponse) Reset() { *m = GetDownloadLocsResponse
func (m *GetDownloadLocsResponse) String() string { return proto.CompactTextString(m) }
func (*GetDownloadLocsResponse) ProtoMessage() {}
func (*GetDownloadLocsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_chunkstore_777ebdc2debedb19, []int{10}
return fileDescriptor_chunkstore_6a769066ddb98dcb, []int{10}
}
func (m *GetDownloadLocsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetDownloadLocsResponse.Unmarshal(m, b)
@@ -698,7 +698,7 @@ func (m *GetUploadLocsRequest) Reset() { *m = GetUploadLocsRequest{} }
func (m *GetUploadLocsRequest) String() string { return proto.CompactTextString(m) }
func (*GetUploadLocsRequest) ProtoMessage() {}
func (*GetUploadLocsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_chunkstore_777ebdc2debedb19, []int{11}
return fileDescriptor_chunkstore_6a769066ddb98dcb, []int{11}
}
func (m *GetUploadLocsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUploadLocsRequest.Unmarshal(m, b)
@@ -743,7 +743,7 @@ func (m *GetUploadLocsResponse) Reset() { *m = GetUploadLocsResponse{} }
func (m *GetUploadLocsResponse) String() string { return proto.CompactTextString(m) }
func (*GetUploadLocsResponse) ProtoMessage() {}
func (*GetUploadLocsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_chunkstore_777ebdc2debedb19, []int{12}
return fileDescriptor_chunkstore_6a769066ddb98dcb, []int{12}
}
func (m *GetUploadLocsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUploadLocsResponse.Unmarshal(m, b)
@@ -781,7 +781,7 @@ func (m *RebaseRequest) Reset() { *m = RebaseRequest{} }
func (m *RebaseRequest) String() string { return proto.CompactTextString(m) }
func (*RebaseRequest) ProtoMessage() {}
func (*RebaseRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_chunkstore_777ebdc2debedb19, []int{13}
return fileDescriptor_chunkstore_6a769066ddb98dcb, []int{13}
}
func (m *RebaseRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RebaseRequest.Unmarshal(m, b)
@@ -818,7 +818,7 @@ func (m *RebaseResponse) Reset() { *m = RebaseResponse{} }
func (m *RebaseResponse) String() string { return proto.CompactTextString(m) }
func (*RebaseResponse) ProtoMessage() {}
func (*RebaseResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_chunkstore_777ebdc2debedb19, []int{14}
return fileDescriptor_chunkstore_6a769066ddb98dcb, []int{14}
}
func (m *RebaseResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RebaseResponse.Unmarshal(m, b)
@@ -849,7 +849,7 @@ func (m *RootRequest) Reset() { *m = RootRequest{} }
func (m *RootRequest) String() string { return proto.CompactTextString(m) }
func (*RootRequest) ProtoMessage() {}
func (*RootRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_chunkstore_777ebdc2debedb19, []int{15}
return fileDescriptor_chunkstore_6a769066ddb98dcb, []int{15}
}
func (m *RootRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RootRequest.Unmarshal(m, b)
@@ -887,7 +887,7 @@ func (m *RootResponse) Reset() { *m = RootResponse{} }
func (m *RootResponse) String() string { return proto.CompactTextString(m) }
func (*RootResponse) ProtoMessage() {}
func (*RootResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_chunkstore_777ebdc2debedb19, []int{16}
return fileDescriptor_chunkstore_6a769066ddb98dcb, []int{16}
}
func (m *RootResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RootResponse.Unmarshal(m, b)
@@ -926,7 +926,7 @@ func (m *ChunkTableInfo) Reset() { *m = ChunkTableInfo{} }
func (m *ChunkTableInfo) String() string { return proto.CompactTextString(m) }
func (*ChunkTableInfo) ProtoMessage() {}
func (*ChunkTableInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_chunkstore_777ebdc2debedb19, []int{17}
return fileDescriptor_chunkstore_6a769066ddb98dcb, []int{17}
}
func (m *ChunkTableInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ChunkTableInfo.Unmarshal(m, b)
@@ -975,7 +975,7 @@ func (m *CommitRequest) Reset() { *m = CommitRequest{} }
func (m *CommitRequest) String() string { return proto.CompactTextString(m) }
func (*CommitRequest) ProtoMessage() {}
func (*CommitRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_chunkstore_777ebdc2debedb19, []int{18}
return fileDescriptor_chunkstore_6a769066ddb98dcb, []int{18}
}
func (m *CommitRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CommitRequest.Unmarshal(m, b)
@@ -1041,7 +1041,7 @@ func (m *CommitResponse) Reset() { *m = CommitResponse{} }
func (m *CommitResponse) String() string { return proto.CompactTextString(m) }
func (*CommitResponse) ProtoMessage() {}
func (*CommitResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_chunkstore_777ebdc2debedb19, []int{19}
return fileDescriptor_chunkstore_6a769066ddb98dcb, []int{19}
}
func (m *CommitResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CommitResponse.Unmarshal(m, b)
@@ -1080,7 +1080,7 @@ func (m *GetRepoMetadataRequest) Reset() { *m = GetRepoMetadataRequest{}
func (m *GetRepoMetadataRequest) String() string { return proto.CompactTextString(m) }
func (*GetRepoMetadataRequest) ProtoMessage() {}
func (*GetRepoMetadataRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_chunkstore_777ebdc2debedb19, []int{20}
return fileDescriptor_chunkstore_6a769066ddb98dcb, []int{20}
}
func (m *GetRepoMetadataRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetRepoMetadataRequest.Unmarshal(m, b)
@@ -1130,7 +1130,7 @@ func (m *GetRepoMetadataResponse) Reset() { *m = GetRepoMetadataResponse
func (m *GetRepoMetadataResponse) String() string { return proto.CompactTextString(m) }
func (*GetRepoMetadataResponse) ProtoMessage() {}
func (*GetRepoMetadataResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_chunkstore_777ebdc2debedb19, []int{21}
return fileDescriptor_chunkstore_6a769066ddb98dcb, []int{21}
}
func (m *GetRepoMetadataResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetRepoMetadataResponse.Unmarshal(m, b)
@@ -1176,7 +1176,7 @@ func (m *ClientRepoFormat) Reset() { *m = ClientRepoFormat{} }
func (m *ClientRepoFormat) String() string { return proto.CompactTextString(m) }
func (*ClientRepoFormat) ProtoMessage() {}
func (*ClientRepoFormat) Descriptor() ([]byte, []int) {
return fileDescriptor_chunkstore_777ebdc2debedb19, []int{22}
return fileDescriptor_chunkstore_6a769066ddb98dcb, []int{22}
}
func (m *ClientRepoFormat) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ClientRepoFormat.Unmarshal(m, b)
@@ -1507,10 +1507,10 @@ var _ChunkStoreService_serviceDesc = grpc.ServiceDesc{
}
func init() {
proto.RegisterFile("dolt/services/remotesapi/v1alpha1/chunkstore.proto", fileDescriptor_chunkstore_777ebdc2debedb19)
proto.RegisterFile("dolt/services/remotesapi/v1alpha1/chunkstore.proto", fileDescriptor_chunkstore_6a769066ddb98dcb)
}
var fileDescriptor_chunkstore_777ebdc2debedb19 = []byte{
var fileDescriptor_chunkstore_6a769066ddb98dcb = []byte{
// 908 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xcf, 0x73, 0xdb, 0x44,
0x14, 0x8e, 0x12, 0xe3, 0xd8, 0xcf, 0x3f, 0x70, 0x35, 0x50, 0x34, 0xe6, 0xd0, 0x74, 0x4f, 0x81,
@@ -1,14 +1,15 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: dolt/services/remotesapi/v1alpha1/credentials.proto
package remotesapi
package remotesapi // import "dolt/services/remotesapi_v1alpha1"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
@@ -32,17 +33,16 @@ func (m *WhoAmIRequest) Reset() { *m = WhoAmIRequest{} }
func (m *WhoAmIRequest) String() string { return proto.CompactTextString(m) }
func (*WhoAmIRequest) ProtoMessage() {}
func (*WhoAmIRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_24ed1d4c5faa311b, []int{0}
return fileDescriptor_credentials_79a5d545e04425e9, []int{0}
}
func (m *WhoAmIRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WhoAmIRequest.Unmarshal(m, b)
}
func (m *WhoAmIRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WhoAmIRequest.Marshal(b, m, deterministic)
}
func (m *WhoAmIRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_WhoAmIRequest.Merge(m, src)
func (dst *WhoAmIRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_WhoAmIRequest.Merge(dst, src)
}
func (m *WhoAmIRequest) XXX_Size() int {
return xxx_messageInfo_WhoAmIRequest.Size(m)
@@ -69,17 +69,16 @@ func (m *WhoAmIResponse) Reset() { *m = WhoAmIResponse{} }
func (m *WhoAmIResponse) String() string { return proto.CompactTextString(m) }
func (*WhoAmIResponse) ProtoMessage() {}
func (*WhoAmIResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_24ed1d4c5faa311b, []int{1}
return fileDescriptor_credentials_79a5d545e04425e9, []int{1}
}
func (m *WhoAmIResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WhoAmIResponse.Unmarshal(m, b)
}
func (m *WhoAmIResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WhoAmIResponse.Marshal(b, m, deterministic)
}
func (m *WhoAmIResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_WhoAmIResponse.Merge(m, src)
func (dst *WhoAmIResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_WhoAmIResponse.Merge(dst, src)
}
func (m *WhoAmIResponse) XXX_Size() int {
return xxx_messageInfo_WhoAmIResponse.Size(m)
@@ -116,29 +115,6 @@ func init() {
proto.RegisterType((*WhoAmIResponse)(nil), "dolt.services.remotesapi.v1alpha1.WhoAmIResponse")
}
func init() {
proto.RegisterFile("dolt/services/remotesapi/v1alpha1/credentials.proto", fileDescriptor_24ed1d4c5faa311b)
}
var fileDescriptor_24ed1d4c5faa311b = []byte{
// 237 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x90, 0xb1, 0x4b, 0x43, 0x31,
0x10, 0xc6, 0x79, 0x0a, 0x45, 0xcf, 0x56, 0x21, 0x53, 0xe9, 0x64, 0xeb, 0xe2, 0x20, 0x79, 0x3e,
0x3b, 0x3a, 0x55, 0x27, 0x17, 0x87, 0x3a, 0x08, 0x2e, 0x8f, 0xb3, 0x39, 0x68, 0x20, 0x79, 0x89,
0xb9, 0xb4, 0xe0, 0xec, 0x3f, 0x2e, 0x2f, 0x31, 0x3e, 0x1c, 0x44, 0x1c, 0xef, 0x77, 0xf7, 0x83,
0xef, 0x3b, 0x58, 0x2a, 0x67, 0x62, 0xcd, 0x14, 0xf6, 0x7a, 0x43, 0x5c, 0x07, 0xb2, 0x2e, 0x12,
0xa3, 0xd7, 0xf5, 0xbe, 0x41, 0xe3, 0xb7, 0xd8, 0xd4, 0x9b, 0x40, 0x8a, 0xba, 0xa8, 0xd1, 0xb0,
0xf4, 0xc1, 0x45, 0x27, 0xe6, 0xbd, 0x24, 0x8b, 0x24, 0x07, 0x49, 0x16, 0x69, 0x71, 0x06, 0x93,
0xe7, 0xad, 0x5b, 0xd9, 0x87, 0x35, 0xbd, 0xed, 0x88, 0xe3, 0x22, 0xc2, 0x69, 0x01, 0xec, 0x5d,
0xc7, 0x24, 0x66, 0x70, 0xb4, 0x63, 0x0a, 0x1d, 0x5a, 0x9a, 0x56, 0xe7, 0xd5, 0xe5, 0xf1, 0xfa,
0x7b, 0x16, 0x73, 0x18, 0x2b, 0xcd, 0xde, 0xe0, 0x7b, 0x9b, 0xf6, 0x07, 0x69, 0x7f, 0xf2, 0xc5,
0x1e, 0xfb, 0x93, 0x0b, 0x98, 0x90, 0x45, 0x6d, 0x5a, 0x54, 0x2a, 0x10, 0xf3, 0xf4, 0x30, 0xdd,
0x8c, 0x13, 0x5c, 0x65, 0x76, 0xf3, 0x51, 0x81, 0xb8, 0x1f, 0xf2, 0x3f, 0xe5, 0xc8, 0xc2, 0xc2,
0x28, 0x87, 0x11, 0xd7, 0xf2, 0xcf, 0x2e, 0xf2, 0x47, 0x91, 0x59, 0xf3, 0x0f, 0x23, 0x37, 0xbd,
0x93, 0x2f, 0x57, 0xbf, 0xbd, 0xb9, 0x2d, 0xce, 0xed, 0xc0, 0x5e, 0x47, 0xe9, 0xcd, 0xcb, 0xcf,
0x00, 0x00, 0x00, 0xff, 0xff, 0x74, 0x1c, 0x7d, 0xef, 0x9d, 0x01, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
@@ -210,3 +186,26 @@ var _CredentialsService_serviceDesc = grpc.ServiceDesc{
Streams: []grpc.StreamDesc{},
Metadata: "dolt/services/remotesapi/v1alpha1/credentials.proto",
}
func init() {
proto.RegisterFile("dolt/services/remotesapi/v1alpha1/credentials.proto", fileDescriptor_credentials_79a5d545e04425e9)
}
var fileDescriptor_credentials_79a5d545e04425e9 = []byte{
// 237 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x90, 0xb1, 0x4b, 0x43, 0x31,
0x10, 0xc6, 0x79, 0x0a, 0x45, 0xcf, 0x56, 0x21, 0x53, 0xe9, 0x64, 0xeb, 0xe2, 0x20, 0x79, 0x3e,
0x3b, 0x3a, 0x55, 0x27, 0x17, 0x87, 0x3a, 0x08, 0x2e, 0x8f, 0xb3, 0x39, 0x68, 0x20, 0x79, 0x89,
0xb9, 0xb4, 0xe0, 0xec, 0x3f, 0x2e, 0x2f, 0x31, 0x3e, 0x1c, 0x44, 0x1c, 0xef, 0x77, 0xf7, 0x83,
0xef, 0x3b, 0x58, 0x2a, 0x67, 0x62, 0xcd, 0x14, 0xf6, 0x7a, 0x43, 0x5c, 0x07, 0xb2, 0x2e, 0x12,
0xa3, 0xd7, 0xf5, 0xbe, 0x41, 0xe3, 0xb7, 0xd8, 0xd4, 0x9b, 0x40, 0x8a, 0xba, 0xa8, 0xd1, 0xb0,
0xf4, 0xc1, 0x45, 0x27, 0xe6, 0xbd, 0x24, 0x8b, 0x24, 0x07, 0x49, 0x16, 0x69, 0x71, 0x06, 0x93,
0xe7, 0xad, 0x5b, 0xd9, 0x87, 0x35, 0xbd, 0xed, 0x88, 0xe3, 0x22, 0xc2, 0x69, 0x01, 0xec, 0x5d,
0xc7, 0x24, 0x66, 0x70, 0xb4, 0x63, 0x0a, 0x1d, 0x5a, 0x9a, 0x56, 0xe7, 0xd5, 0xe5, 0xf1, 0xfa,
0x7b, 0x16, 0x73, 0x18, 0x2b, 0xcd, 0xde, 0xe0, 0x7b, 0x9b, 0xf6, 0x07, 0x69, 0x7f, 0xf2, 0xc5,
0x1e, 0xfb, 0x93, 0x0b, 0x98, 0x90, 0x45, 0x6d, 0x5a, 0x54, 0x2a, 0x10, 0xf3, 0xf4, 0x30, 0xdd,
0x8c, 0x13, 0x5c, 0x65, 0x76, 0xf3, 0x51, 0x81, 0xb8, 0x1f, 0xf2, 0x3f, 0xe5, 0xc8, 0xc2, 0xc2,
0x28, 0x87, 0x11, 0xd7, 0xf2, 0xcf, 0x2e, 0xf2, 0x47, 0x91, 0x59, 0xf3, 0x0f, 0x23, 0x37, 0xbd,
0x93, 0x2f, 0x57, 0xbf, 0xbd, 0xb9, 0x2d, 0xce, 0xed, 0xc0, 0x5e, 0x47, 0xe9, 0xcd, 0xcb, 0xcf,
0x00, 0x00, 0x00, 0xff, 0xff, 0x74, 0x1c, 0x7d, 0xef, 0x9d, 0x01, 0x00, 0x00,
}
+438
View File
@@ -0,0 +1,438 @@
// Copyright 2019 Liquidata, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package main
import (
"bytes"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
)
var ExpectedHeader = []byte(`// Copyright 2019 Liquidata, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
`)
var ExpectedHeaderForFileFromNoms = []byte(`// Copyright 2019 Liquidata, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// This file incorporates work covered by the following copyright and
// permission notice:
//
// Copyright`)
type CopiedNomsFile struct {
Path string
NomsPath string
HadCopyrightNotice bool
}
// Noms file paths referenced from a1f990c94dcc03f9f1845d25a55e84108f1be673 in github.com/attic-labs/noms.
var CopiedNomsFiles []CopiedNomsFile = []CopiedNomsFile{
// These started as slightly modified copies of existing noms value implementations.
{Path: "store/types/float.go", NomsPath: "go/types/number.go", HadCopyrightNotice: true},
{Path: "store/types/float_util.go", NomsPath: "go/types/number_util.go", HadCopyrightNotice: true},
{Path: "store/types/int.go", NomsPath: "go/types/number.go", HadCopyrightNotice: true},
{Path: "store/types/null_value.go", NomsPath: "go/types/number.go", HadCopyrightNotice: true},
{Path: "store/types/tuple.go", NomsPath: "go/types/struct.go", HadCopyrightNotice: true},
{Path: "store/types/uint.go", NomsPath: "go/types/number.go", HadCopyrightNotice: true},
// These included source files from noms did not have copyright notices.
{Path: "store/types/common_supertype.go", NomsPath: "go/types/common_supertype.go", HadCopyrightNotice: false},
{Path: "store/types/common_supertype_test.go", NomsPath: "go/types/common_supertype_test.go", HadCopyrightNotice: false},
{Path: "store/types/simplify.go", NomsPath: "go/types/simplify.go", HadCopyrightNotice: false},
{Path: "store/types/simplify_test.go", NomsPath: "go/types/simplify_test.go", HadCopyrightNotice: false},
{Path: "store/util/random/id.go", NomsPath: "go/util/random/id.go", HadCopyrightNotice: false},
{Path: "store/util/random/id_test.go", NomsPath: "go/util/random/id_test.go", HadCopyrightNotice: false},
// These files started as almost direct copies, potentially with some moving.
{Path: "store/cmd/noms/util/check_error.go", NomsPath: "go/d/check_error.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/util/command.go", NomsPath: "cmd/util/command.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/util/help.go", NomsPath: "cmd/util/help.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/util/kingpin_command.go", NomsPath: "cmd/util/kingpin_command.go", HadCopyrightNotice: true},
{Path: "store/chunks/chunk.go", NomsPath: "go/chunks/chunk.go", HadCopyrightNotice: true},
{Path: "store/chunks/chunk_serializer.go", NomsPath: "go/chunks/chunk_serializer.go", HadCopyrightNotice: true},
{Path: "store/chunks/chunk_serializer_test.go", NomsPath: "go/chunks/chunk_serializer_test.go", HadCopyrightNotice: true},
{Path: "store/chunks/chunk_store.go", NomsPath: "go/chunks/chunk_store.go", HadCopyrightNotice: true},
{Path: "store/chunks/chunk_store_common_test.go", NomsPath: "go/chunks/chunk_store_common_test.go", HadCopyrightNotice: true},
{Path: "store/chunks/chunk_test.go", NomsPath: "go/chunks/chunk_test.go", HadCopyrightNotice: true},
{Path: "store/chunks/memory_store.go", NomsPath: "go/chunks/memory_store.go", HadCopyrightNotice: true},
{Path: "store/chunks/memory_store_test.go", NomsPath: "go/chunks/memory_store_test.go", HadCopyrightNotice: true},
{Path: "store/chunks/remote_requests.go", NomsPath: "go/chunks/remote_requests.go", HadCopyrightNotice: true},
{Path: "store/chunks/remote_requests_test.go", NomsPath: "go/chunks/remote_requests_test.go", HadCopyrightNotice: true},
{Path: "store/chunks/test_utils.go", NomsPath: "go/chunks/test_utils.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/commit_iterator.go", NomsPath: "cmd/noms/commit_iterator.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms.go", NomsPath: "cmd/noms/noms.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_blob.go", NomsPath: "cmd/noms/noms_blob.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_blob_get.go", NomsPath: "cmd/noms/noms_blob_get.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_blob_get_test.go", NomsPath: "cmd/noms/noms_blob_get_test.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_blob_put.go", NomsPath: "cmd/noms/noms_blob_put.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_commit.go", NomsPath: "cmd/noms/noms_commit.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_commit_test.go", NomsPath: "cmd/noms/noms_commit_test.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_config.go", NomsPath: "cmd/noms/noms_config.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_diff.go", NomsPath: "cmd/noms/noms_diff.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_diff_test.go", NomsPath: "cmd/noms/noms_diff_test.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_ds.go", NomsPath: "cmd/noms/noms_ds.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_ds_test.go", NomsPath: "cmd/noms/noms_ds_test.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_list.go", NomsPath: "cmd/noms/noms_list.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_log.go", NomsPath: "cmd/noms/noms_log.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_log_test.go", NomsPath: "cmd/noms/noms_log_test.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_map.go", NomsPath: "cmd/noms/noms_map.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_merge.go", NomsPath: "cmd/noms/noms_merge.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_merge_test.go", NomsPath: "cmd/noms/noms_merge_test.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_root.go", NomsPath: "cmd/noms/noms_root.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_root_test.go", NomsPath: "cmd/noms/noms_root_test.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_set.go", NomsPath: "cmd/noms/noms_set.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_show.go", NomsPath: "cmd/noms/noms_show.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_show_test.go", NomsPath: "cmd/noms/noms_show_test.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_stats.go", NomsPath: "cmd/noms/noms_stats.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_struct.go", NomsPath: "cmd/noms/noms_struct.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_sync.go", NomsPath: "cmd/noms/noms_sync.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_sync_test.go", NomsPath: "cmd/noms/noms_sync_test.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_version.go", NomsPath: "cmd/noms/noms_version.go", HadCopyrightNotice: true},
{Path: "store/cmd/noms/noms_version_test.go", NomsPath: "cmd/noms/noms_version_test.go", HadCopyrightNotice: true},
{Path: "store/config/config.go", NomsPath: "go/config/config.go", HadCopyrightNotice: true},
{Path: "store/config/config_test.go", NomsPath: "go/config/config_test.go", HadCopyrightNotice: true},
{Path: "store/config/resolver.go", NomsPath: "go/config/resolver.go", HadCopyrightNotice: true},
{Path: "store/config/resolver_test.go", NomsPath: "go/config/resolver_test.go", HadCopyrightNotice: true},
{Path: "store/constants/version.go", NomsPath: "go/constants/version.go", HadCopyrightNotice: true},
{Path: "store/d/try.go", NomsPath: "go/d/try.go", HadCopyrightNotice: true},
{Path: "store/d/try_test.go", NomsPath: "go/d/try_test.go", HadCopyrightNotice: true},
{Path: "store/datas/commit.go", NomsPath: "go/datas/commit.go", HadCopyrightNotice: true},
{Path: "store/datas/commit_options.go", NomsPath: "go/datas/commit_options.go", HadCopyrightNotice: true},
{Path: "store/datas/commit_test.go", NomsPath: "go/datas/commit_test.go", HadCopyrightNotice: true},
{Path: "store/datas/database.go", NomsPath: "go/datas/database.go", HadCopyrightNotice: true},
{Path: "store/datas/database_common.go", NomsPath: "go/datas/database_common.go", HadCopyrightNotice: true},
{Path: "store/datas/database_test.go", NomsPath: "go/datas/database_test.go", HadCopyrightNotice: true},
{Path: "store/datas/dataset.go", NomsPath: "go/datas/dataset.go", HadCopyrightNotice: true},
{Path: "store/datas/dataset_test.go", NomsPath: "go/datas/dataset_test.go", HadCopyrightNotice: true},
{Path: "store/datas/pull.go", NomsPath: "go/datas/pull.go", HadCopyrightNotice: true},
{Path: "store/datas/pull_test.go", NomsPath: "go/datas/pull_test.go", HadCopyrightNotice: true},
{Path: "store/datas/serialize_hashes.go", NomsPath: "go/datas/serialize_hashes.go", HadCopyrightNotice: true},
{Path: "store/datas/serialize_hashes_test.go", NomsPath: "go/datas/serialize_hashes_test.go", HadCopyrightNotice: true},
{Path: "store/diff/apply_patch.go", NomsPath: "go/diff/apply_patch.go", HadCopyrightNotice: true},
{Path: "store/diff/apply_patch_test.go", NomsPath: "go/diff/apply_patch_test.go", HadCopyrightNotice: true},
{Path: "store/diff/diff.go", NomsPath: "go/diff/diff.go", HadCopyrightNotice: true},
{Path: "store/diff/diff_test.go", NomsPath: "go/diff/diff_test.go", HadCopyrightNotice: true},
{Path: "store/diff/patch.go", NomsPath: "go/diff/patch.go", HadCopyrightNotice: true},
{Path: "store/diff/patch_test.go", NomsPath: "go/diff/patch_test.go", HadCopyrightNotice: true},
{Path: "store/diff/print_diff.go", NomsPath: "go/diff/print_diff.go", HadCopyrightNotice: true},
{Path: "store/diff/summary.go", NomsPath: "go/diff/summary.go", HadCopyrightNotice: true},
{Path: "store/hash/base32.go", NomsPath: "go/hash/base32.go", HadCopyrightNotice: true},
{Path: "store/hash/base32_test.go", NomsPath: "go/hash/base32_test.go", HadCopyrightNotice: true},
{Path: "store/hash/hash.go", NomsPath: "go/hash/hash.go", HadCopyrightNotice: true},
{Path: "store/hash/hash_slice.go", NomsPath: "go/hash/hash_slice.go", HadCopyrightNotice: true},
{Path: "store/hash/hash_slice_test.go", NomsPath: "go/hash/hash_slice_test.go", HadCopyrightNotice: true},
{Path: "store/hash/hash_test.go", NomsPath: "go/hash/hash_test.go", HadCopyrightNotice: true},
{Path: "store/marshal/decode.go", NomsPath: "go/marshal/decode.go", HadCopyrightNotice: true},
{Path: "store/marshal/decode_test.go", NomsPath: "go/marshal/decode_test.go", HadCopyrightNotice: true},
{Path: "store/marshal/encode.go", NomsPath: "go/marshal/encode.go", HadCopyrightNotice: true},
{Path: "store/marshal/encode_test.go", NomsPath: "go/marshal/encode_test.go", HadCopyrightNotice: true},
{Path: "store/marshal/encode_type.go", NomsPath: "go/marshal/encode_type.go", HadCopyrightNotice: true},
{Path: "store/marshal/encode_type_test.go", NomsPath: "go/marshal/encode_type_test.go", HadCopyrightNotice: true},
{Path: "store/merge/candidate.go", NomsPath: "go/merge/candidate.go", HadCopyrightNotice: true},
{Path: "store/merge/three_way.go", NomsPath: "go/merge/three_way.go", HadCopyrightNotice: true},
{Path: "store/merge/three_way_keyval_test.go", NomsPath: "go/merge/three_way_keyval_test.go", HadCopyrightNotice: true},
{Path: "store/merge/three_way_list.go", NomsPath: "go/merge/three_way_list.go", HadCopyrightNotice: true},
{Path: "store/merge/three_way_list_test.go", NomsPath: "go/merge/three_way_list_test.go", HadCopyrightNotice: true},
{Path: "store/merge/three_way_ordered_sequence.go", NomsPath: "go/merge/three_way_ordered_sequence.go", HadCopyrightNotice: true},
{Path: "store/merge/three_way_set_test.go", NomsPath: "go/merge/three_way_set_test.go", HadCopyrightNotice: true},
{Path: "store/merge/three_way_test.go", NomsPath: "go/merge/three_way_test.go", HadCopyrightNotice: true},
{Path: "store/metrics/histogram.go", NomsPath: "go/metrics/histogram.go", HadCopyrightNotice: true},
{Path: "store/metrics/histogram_test.go", NomsPath: "go/metrics/histogram_test.go", HadCopyrightNotice: true},
{Path: "store/nbs/aws_chunk_source.go", NomsPath: "go/nbs/aws_chunk_source.go", HadCopyrightNotice: true},
{Path: "store/nbs/aws_chunk_source_test.go", NomsPath: "go/nbs/aws_chunk_source_test.go", HadCopyrightNotice: true},
{Path: "store/nbs/aws_table_persister.go", NomsPath: "go/nbs/aws_table_persister.go", HadCopyrightNotice: true},
{Path: "store/nbs/aws_table_persister_test.go", NomsPath: "go/nbs/aws_table_persister_test.go", HadCopyrightNotice: true},
{Path: "store/nbs/benchmarks/block_store_benchmarks.go", NomsPath: "go/nbs/benchmarks/block_store_benchmarks.go", HadCopyrightNotice: true},
{Path: "store/nbs/benchmarks/cachedrop/drop_cache.go", NomsPath: "go/nbs/benchmarks/cachedrop/drop_cache.go", HadCopyrightNotice: true},
{Path: "store/nbs/benchmarks/chunker/main.go", NomsPath: "go/nbs/benchmarks/chunker/main.go", HadCopyrightNotice: true},
{Path: "store/nbs/benchmarks/data_source.go", NomsPath: "go/nbs/benchmarks/data_source.go", HadCopyrightNotice: true},
{Path: "store/nbs/benchmarks/drop_cache_linux.go", NomsPath: "go/nbs/benchmarks/drop_cache_linux.go", HadCopyrightNotice: true},
{Path: "store/nbs/benchmarks/drop_cache_other.go", NomsPath: "go/nbs/benchmarks/drop_cache_other.go", HadCopyrightNotice: true},
{Path: "store/nbs/benchmarks/file_block_store.go", NomsPath: "go/nbs/benchmarks/file_block_store.go", HadCopyrightNotice: true},
{Path: "store/nbs/benchmarks/gen/gen.go", NomsPath: "go/nbs/benchmarks/gen/gen.go", HadCopyrightNotice: true},
{Path: "store/nbs/benchmarks/gen/rolling_value_hasher.go", NomsPath: "go/nbs/benchmarks/gen/rolling_value_hasher.go", HadCopyrightNotice: true},
{Path: "store/nbs/benchmarks/main.go", NomsPath: "go/nbs/benchmarks/main.go", HadCopyrightNotice: true},
{Path: "store/nbs/benchmarks/null_block_store.go", NomsPath: "go/nbs/benchmarks/null_block_store.go", HadCopyrightNotice: true},
{Path: "store/nbs/block_store_test.go", NomsPath: "go/nbs/block_store_test.go", HadCopyrightNotice: true},
{Path: "store/nbs/cache.go", NomsPath: "go/nbs/cache.go", HadCopyrightNotice: true},
{Path: "store/nbs/conjoiner.go", NomsPath: "go/nbs/conjoiner.go", HadCopyrightNotice: true},
{Path: "store/nbs/conjoiner_test.go", NomsPath: "go/nbs/conjoiner_test.go", HadCopyrightNotice: true},
{Path: "store/nbs/dynamo_fake_test.go", NomsPath: "go/nbs/dynamo_fake_test.go", HadCopyrightNotice: true},
{Path: "store/nbs/dynamo_manifest.go", NomsPath: "go/nbs/dynamo_manifest.go", HadCopyrightNotice: true},
{Path: "store/nbs/dynamo_manifest_test.go", NomsPath: "go/nbs/dynamo_manifest_test.go", HadCopyrightNotice: true},
{Path: "store/nbs/dynamo_table_reader.go", NomsPath: "go/nbs/dynamo_table_reader.go", HadCopyrightNotice: true},
{Path: "store/nbs/dynamo_table_reader_test.go", NomsPath: "go/nbs/dynamo_table_reader_test.go", HadCopyrightNotice: true},
{Path: "store/nbs/fd_cache.go", NomsPath: "go/nbs/fd_cache.go", HadCopyrightNotice: true},
{Path: "store/nbs/fd_cache_test.go", NomsPath: "go/nbs/fd_cache_test.go", HadCopyrightNotice: true},
{Path: "store/nbs/file_manifest.go", NomsPath: "go/nbs/file_manifest.go", HadCopyrightNotice: true},
{Path: "store/nbs/file_manifest_test.go", NomsPath: "go/nbs/file_manifest_test.go", HadCopyrightNotice: true},
{Path: "store/nbs/file_table_persister.go", NomsPath: "go/nbs/file_table_persister.go", HadCopyrightNotice: true},
{Path: "store/nbs/file_table_persister_test.go", NomsPath: "go/nbs/file_table_persister_test.go", HadCopyrightNotice: true},
{Path: "store/nbs/frag/main.go", NomsPath: "go/nbs/frag/main.go", HadCopyrightNotice: true},
{Path: "store/nbs/fs_table_cache.go", NomsPath: "go/nbs/fs_table_cache.go", HadCopyrightNotice: true},
{Path: "store/nbs/fs_table_cache_test.go", NomsPath: "go/nbs/fs_table_cache_test.go", HadCopyrightNotice: true},
{Path: "store/nbs/manifest.go", NomsPath: "go/nbs/manifest.go", HadCopyrightNotice: true},
{Path: "store/nbs/manifest_cache.go", NomsPath: "go/nbs/manifest_cache.go", HadCopyrightNotice: true},
{Path: "store/nbs/manifest_cache_test.go", NomsPath: "go/nbs/manifest_cache_test.go", HadCopyrightNotice: true},
{Path: "store/nbs/mem_table.go", NomsPath: "go/nbs/mem_table.go", HadCopyrightNotice: true},
{Path: "store/nbs/mem_table_test.go", NomsPath: "go/nbs/mem_table_test.go", HadCopyrightNotice: true},
{Path: "store/nbs/mmap_table_reader.go", NomsPath: "go/nbs/mmap_table_reader.go", HadCopyrightNotice: true},
{Path: "store/nbs/mmap_table_reader_test.go", NomsPath: "go/nbs/mmap_table_reader_test.go", HadCopyrightNotice: true},
{Path: "store/nbs/persisting_chunk_source.go", NomsPath: "go/nbs/persisting_chunk_source.go", HadCopyrightNotice: true},
{Path: "store/nbs/persisting_chunk_source_test.go", NomsPath: "go/nbs/persisting_chunk_source_test.go", HadCopyrightNotice: true},
{Path: "store/nbs/root_tracker_test.go", NomsPath: "go/nbs/root_tracker_test.go", HadCopyrightNotice: true},
{Path: "store/nbs/s3_fake_test.go", NomsPath: "go/nbs/s3_fake_test.go", HadCopyrightNotice: true},
{Path: "store/nbs/s3_table_reader.go", NomsPath: "go/nbs/s3_table_reader.go", HadCopyrightNotice: true},
{Path: "store/nbs/s3_table_reader_test.go", NomsPath: "go/nbs/s3_table_reader_test.go", HadCopyrightNotice: true},
{Path: "store/nbs/stats.go", NomsPath: "go/nbs/stats.go", HadCopyrightNotice: true},
{Path: "store/nbs/stats_test.go", NomsPath: "go/nbs/stats_test.go", HadCopyrightNotice: true},
{Path: "store/nbs/store.go", NomsPath: "go/nbs/store.go", HadCopyrightNotice: true},
{Path: "store/nbs/table.go", NomsPath: "go/nbs/table.go", HadCopyrightNotice: true},
{Path: "store/nbs/table_persister.go", NomsPath: "go/nbs/table_persister.go", HadCopyrightNotice: true},
{Path: "store/nbs/table_persister_test.go", NomsPath: "go/nbs/table_persister_test.go", HadCopyrightNotice: true},
{Path: "store/nbs/table_reader.go", NomsPath: "go/nbs/table_reader.go", HadCopyrightNotice: true},
{Path: "store/nbs/table_set.go", NomsPath: "go/nbs/table_set.go", HadCopyrightNotice: true},
{Path: "store/nbs/table_set_test.go", NomsPath: "go/nbs/table_set_test.go", HadCopyrightNotice: true},
{Path: "store/nbs/table_test.go", NomsPath: "go/nbs/table_test.go", HadCopyrightNotice: true},
{Path: "store/nbs/table_writer.go", NomsPath: "go/nbs/table_writer.go", HadCopyrightNotice: true},
{Path: "store/nbs/test/manifest_clobber.go", NomsPath: "go/nbs/test/manifest_clobber.go", HadCopyrightNotice: true},
{Path: "store/nomdl/lexer.go", NomsPath: "go/nomdl/lexer.go", HadCopyrightNotice: true},
{Path: "store/nomdl/parser.go", NomsPath: "go/nomdl/parser.go", HadCopyrightNotice: true},
{Path: "store/nomdl/parser_test.go", NomsPath: "go/nomdl/parser_test.go", HadCopyrightNotice: true},
{Path: "store/perf/codec-perf-rig/main.go", NomsPath: "go/perf/codec-perf-rig/main.go", HadCopyrightNotice: true},
{Path: "store/perf/hash-perf-rig/main.go", NomsPath: "go/perf/hash-perf-rig/main.go", HadCopyrightNotice: true},
{Path: "store/perf/suite/suite.go", NomsPath: "go/perf/suite/suite.go", HadCopyrightNotice: true},
{Path: "store/perf/suite/suite_test.go", NomsPath: "go/perf/suite/suite_test.go", HadCopyrightNotice: true},
{Path: "store/sloppy/sloppy.go", NomsPath: "go/sloppy/sloppy.go", HadCopyrightNotice: true},
{Path: "store/sloppy/sloppy_test.go", NomsPath: "go/sloppy/sloppy_test.go", HadCopyrightNotice: true},
{Path: "store/spec/absolute_path.go", NomsPath: "go/spec/absolute_path.go", HadCopyrightNotice: true},
{Path: "store/spec/absolute_path_test.go", NomsPath: "go/spec/absolute_path_test.go", HadCopyrightNotice: true},
{Path: "store/spec/commit_meta.go", NomsPath: "go/spec/commit_meta.go", HadCopyrightNotice: true},
{Path: "store/spec/commit_meta_test.go", NomsPath: "go/spec/commit_meta_test.go", HadCopyrightNotice: true},
{Path: "store/spec/spec.go", NomsPath: "go/spec/spec.go", HadCopyrightNotice: true},
{Path: "store/spec/spec_test.go", NomsPath: "go/spec/spec_test.go", HadCopyrightNotice: true},
{Path: "store/spec/util.go", NomsPath: "go/spec/util.go", HadCopyrightNotice: true},
{Path: "store/types/blob.go", NomsPath: "go/types/blob.go", HadCopyrightNotice: true},
{Path: "store/types/blob_leaf_sequence.go", NomsPath: "go/types/blob_leaf_sequence.go", HadCopyrightNotice: true},
{Path: "store/types/blob_test.go", NomsPath: "go/types/blob_test.go", HadCopyrightNotice: true},
{Path: "store/types/bool.go", NomsPath: "go/types/bool.go", HadCopyrightNotice: true},
{Path: "store/types/codec.go", NomsPath: "go/types/codec.go", HadCopyrightNotice: true},
{Path: "store/types/codec_test.go", NomsPath: "go/types/codec_test.go", HadCopyrightNotice: true},
{Path: "store/types/collection.go", NomsPath: "go/types/collection.go", HadCopyrightNotice: true},
{Path: "store/types/collection_test.go", NomsPath: "go/types/collection_test.go", HadCopyrightNotice: true},
{Path: "store/types/compare_test.go", NomsPath: "go/types/compare_test.go", HadCopyrightNotice: true},
{Path: "store/types/edit_distance.go", NomsPath: "go/types/edit_distance.go", HadCopyrightNotice: true},
{Path: "store/types/edit_distance_test.go", NomsPath: "go/types/edit_distance_test.go", HadCopyrightNotice: true},
{Path: "store/types/encode_human_readable.go", NomsPath: "go/types/encode_human_readable.go", HadCopyrightNotice: true},
{Path: "store/types/encode_human_readable_test.go", NomsPath: "go/types/encode_human_readable_test.go", HadCopyrightNotice: true},
{Path: "store/types/encoding_test.go", NomsPath: "go/types/encoding_test.go", HadCopyrightNotice: true},
{Path: "store/types/equals_test.go", NomsPath: "go/types/equals_test.go", HadCopyrightNotice: true},
{Path: "store/types/get_hash.go", NomsPath: "go/types/get_hash.go", HadCopyrightNotice: true},
{Path: "store/types/incremental_test.go", NomsPath: "go/types/incremental_test.go", HadCopyrightNotice: true},
{Path: "store/types/indexed_sequence_diff.go", NomsPath: "go/types/indexed_sequence_diff.go", HadCopyrightNotice: true},
{Path: "store/types/indexed_sequences.go", NomsPath: "go/types/indexed_sequences.go", HadCopyrightNotice: true},
{Path: "store/types/leaf_sequence.go", NomsPath: "go/types/leaf_sequence.go", HadCopyrightNotice: true},
{Path: "store/types/less.go", NomsPath: "go/types/less.go", HadCopyrightNotice: true},
{Path: "store/types/list.go", NomsPath: "go/types/list.go", HadCopyrightNotice: true},
{Path: "store/types/list_editor.go", NomsPath: "go/types/list_editor.go", HadCopyrightNotice: true},
{Path: "store/types/list_editor_test.go", NomsPath: "go/types/list_editor_test.go", HadCopyrightNotice: true},
{Path: "store/types/list_iterator.go", NomsPath: "go/types/list_iterator.go", HadCopyrightNotice: true},
{Path: "store/types/list_iterator_test.go", NomsPath: "go/types/list_iterator_test.go", HadCopyrightNotice: true},
{Path: "store/types/list_leaf_sequence.go", NomsPath: "go/types/list_leaf_sequence.go", HadCopyrightNotice: true},
{Path: "store/types/list_test.go", NomsPath: "go/types/list_test.go", HadCopyrightNotice: true},
{Path: "store/types/make_type.go", NomsPath: "go/types/make_type.go", HadCopyrightNotice: true},
{Path: "store/types/map.go", NomsPath: "go/types/map.go", HadCopyrightNotice: true},
{Path: "store/types/map_editor.go", NomsPath: "go/types/map_editor.go", HadCopyrightNotice: true},
{Path: "store/types/map_iterator.go", NomsPath: "go/types/map_iterator.go", HadCopyrightNotice: true},
{Path: "store/types/map_iterator_test.go", NomsPath: "go/types/map_iterator_test.go", HadCopyrightNotice: true},
{Path: "store/types/map_leaf_sequence.go", NomsPath: "go/types/map_leaf_sequence.go", HadCopyrightNotice: true},
{Path: "store/types/map_test.go", NomsPath: "go/types/map_test.go", HadCopyrightNotice: true},
{Path: "store/types/meta_sequence.go", NomsPath: "go/types/meta_sequence.go", HadCopyrightNotice: true},
{Path: "store/types/noms_kind.go", NomsPath: "go/types/noms_kind.go", HadCopyrightNotice: true},
{Path: "store/types/ordered_sequences.go", NomsPath: "go/types/ordered_sequences.go", HadCopyrightNotice: true},
{Path: "store/types/ordered_sequences_diff.go", NomsPath: "go/types/ordered_sequences_diff.go", HadCopyrightNotice: true},
{Path: "store/types/ordered_sequences_diff_test.go", NomsPath: "go/types/ordered_sequences_diff_test.go", HadCopyrightNotice: true},
{Path: "store/types/path.go", NomsPath: "go/types/path.go", HadCopyrightNotice: true},
{Path: "store/types/path_test.go", NomsPath: "go/types/path_test.go", HadCopyrightNotice: true},
{Path: "store/types/perf/dummy.go", NomsPath: "go/types/perf/dummy.go", HadCopyrightNotice: true},
{Path: "store/types/perf/perf_test.go", NomsPath: "go/types/perf/perf_test.go", HadCopyrightNotice: true},
{Path: "store/types/primitives_test.go", NomsPath: "go/types/primitives_test.go", HadCopyrightNotice: true},
{Path: "store/types/ref.go", NomsPath: "go/types/ref.go", HadCopyrightNotice: true},
{Path: "store/types/ref_heap.go", NomsPath: "go/types/ref_heap.go", HadCopyrightNotice: true},
{Path: "store/types/ref_heap_test.go", NomsPath: "go/types/ref_heap_test.go", HadCopyrightNotice: true},
{Path: "store/types/ref_test.go", NomsPath: "go/types/ref_test.go", HadCopyrightNotice: true},
{Path: "store/types/rolling_value_hasher.go", NomsPath: "go/types/rolling_value_hasher.go", HadCopyrightNotice: true},
{Path: "store/types/sequence.go", NomsPath: "go/types/sequence.go", HadCopyrightNotice: true},
{Path: "store/types/sequence_chunker.go", NomsPath: "go/types/sequence_chunker.go", HadCopyrightNotice: true},
{Path: "store/types/sequence_concat.go", NomsPath: "go/types/sequence_concat.go", HadCopyrightNotice: true},
{Path: "store/types/sequence_cursor.go", NomsPath: "go/types/sequence_cursor.go", HadCopyrightNotice: true},
{Path: "store/types/sequence_cursor_test.go", NomsPath: "go/types/sequence_cursor_test.go", HadCopyrightNotice: true},
{Path: "store/types/set.go", NomsPath: "go/types/set.go", HadCopyrightNotice: true},
{Path: "store/types/set_editor.go", NomsPath: "go/types/set_editor.go", HadCopyrightNotice: true},
{Path: "store/types/set_iterator.go", NomsPath: "go/types/set_iterator.go", HadCopyrightNotice: true},
{Path: "store/types/set_iterator_test.go", NomsPath: "go/types/set_iterator_test.go", HadCopyrightNotice: true},
{Path: "store/types/set_leaf_sequence.go", NomsPath: "go/types/set_leaf_sequence.go", HadCopyrightNotice: true},
{Path: "store/types/set_test.go", NomsPath: "go/types/set_test.go", HadCopyrightNotice: true},
{Path: "store/types/string.go", NomsPath: "go/types/string.go", HadCopyrightNotice: true},
{Path: "store/types/string_test.go", NomsPath: "go/types/string_test.go", HadCopyrightNotice: true},
{Path: "store/types/struct.go", NomsPath: "go/types/struct.go", HadCopyrightNotice: true},
{Path: "store/types/struct_test.go", NomsPath: "go/types/struct_test.go", HadCopyrightNotice: true},
{Path: "store/types/subtype.go", NomsPath: "go/types/subtype.go", HadCopyrightNotice: true},
{Path: "store/types/subtype_test.go", NomsPath: "go/types/subtype_test.go", HadCopyrightNotice: true},
{Path: "store/types/type.go", NomsPath: "go/types/type.go", HadCopyrightNotice: true},
{Path: "store/types/type_desc.go", NomsPath: "go/types/type_desc.go", HadCopyrightNotice: true},
{Path: "store/types/type_test.go", NomsPath: "go/types/type_test.go", HadCopyrightNotice: true},
{Path: "store/types/util_test.go", NomsPath: "go/types/util_test.go", HadCopyrightNotice: true},
{Path: "store/types/validate_type.go", NomsPath: "go/types/validate_type.go", HadCopyrightNotice: true},
{Path: "store/types/validating_decoder.go", NomsPath: "go/types/validating_decoder.go", HadCopyrightNotice: true},
{Path: "store/types/validating_decoder_test.go", NomsPath: "go/types/validating_decoder_test.go", HadCopyrightNotice: true},
{Path: "store/types/value.go", NomsPath: "go/types/value.go", HadCopyrightNotice: true},
{Path: "store/types/value_decoder.go", NomsPath: "go/types/value_decoder.go", HadCopyrightNotice: true},
{Path: "store/types/value_stats.go", NomsPath: "go/types/value_stats.go", HadCopyrightNotice: true},
{Path: "store/types/value_store.go", NomsPath: "go/types/value_store.go", HadCopyrightNotice: true},
{Path: "store/types/value_store_test.go", NomsPath: "go/types/value_store_test.go", HadCopyrightNotice: true},
{Path: "store/types/walk.go", NomsPath: "go/types/walk.go", HadCopyrightNotice: true},
{Path: "store/types/walk_refs.go", NomsPath: "go/types/walk_refs.go", HadCopyrightNotice: true},
{Path: "store/types/walk_refs_test.go", NomsPath: "go/types/walk_refs_test.go", HadCopyrightNotice: true},
{Path: "store/types/walk_test.go", NomsPath: "go/types/walk_test.go", HadCopyrightNotice: true},
{Path: "store/util/clienttest/client_test_suite.go", NomsPath: "go/util/clienttest/client_test_suite.go", HadCopyrightNotice: true},
{Path: "store/util/datetime/date_time.go", NomsPath: "go/util/datetime/date_time.go", HadCopyrightNotice: true},
{Path: "store/util/datetime/date_time_test.go", NomsPath: "go/util/datetime/date_time_test.go", HadCopyrightNotice: true},
{Path: "store/util/exit/exit.go", NomsPath: "go/util/exit/exit.go", HadCopyrightNotice: true},
{Path: "store/util/functions/all.go", NomsPath: "go/util/functions/all.go", HadCopyrightNotice: true},
{Path: "store/util/functions/all_test.go", NomsPath: "go/util/functions/all_test.go", HadCopyrightNotice: true},
{Path: "store/util/outputpager/page_output.go", NomsPath: "go/util/outputpager/page_output.go", HadCopyrightNotice: true},
{Path: "store/util/profile/profile.go", NomsPath: "go/util/profile/profile.go", HadCopyrightNotice: true},
{Path: "store/util/progressreader/reader.go", NomsPath: "go/util/progressreader/reader.go", HadCopyrightNotice: true},
{Path: "store/util/sizecache/size_cache.go", NomsPath: "go/util/sizecache/size_cache.go", HadCopyrightNotice: true},
{Path: "store/util/sizecache/size_cache_test.go", NomsPath: "go/util/sizecache/size_cache_test.go", HadCopyrightNotice: true},
{Path: "store/util/status/status.go", NomsPath: "go/util/status/status.go", HadCopyrightNotice: true},
{Path: "store/util/test/equals_ignore_hashes.go", NomsPath: "go/util/test/equals_ignore_hashes.go", HadCopyrightNotice: true},
{Path: "store/util/verbose/verbose.go", NomsPath: "go/util/verbose/verbose.go", HadCopyrightNotice: true},
{Path: "store/util/writers/max_line_writer.go", NomsPath: "go/util/writers/max_line_writer.go", HadCopyrightNotice: true},
{Path: "store/util/writers/prefix_writer.go", NomsPath: "go/util/writers/prefix_writer.go", HadCopyrightNotice: true},
{Path: "store/util/writers/writers_test.go", NomsPath: "go/util/writers/writers_test.go", HadCopyrightNotice: true},
}
// Attempt to enforce some simple copyright header standards on some
// directories in the repository.
// The rules:
// - Every .go file in //go that is not a .pb.go file and that did not
// come from noms must have ExpectedHeader.
// - Every .go file in //go that came from noms and whose file in noms
// had a copyright notice must have ExpectedHeaderForFileFromNoms.
// - Every .proto file in //proto must have ExpectedHeader.
func main() {
failed := CheckGo()
failed = CheckProto() || failed
if failed {
os.Exit(1)
}
}
func CheckGo() bool {
nomsLookup := make(map[string]*CopiedNomsFile)
for i := range CopiedNomsFiles {
nomsLookup[CopiedNomsFiles[i].Path] = &CopiedNomsFiles[i]
}
var failed bool
filepath.Walk(".", func(path string, info os.FileInfo, err error) error {
if strings.HasSuffix(path, ".go") && !strings.HasSuffix(path, ".pb.go") {
info := nomsLookup[path]
hasNomsHeader := info != nil && info.HadCopyrightNotice
if info != nil {
delete(nomsLookup, path)
}
f, err := os.Open(path)
if err != nil {
panic(err)
}
defer f.Close()
bs, err := ioutil.ReadAll(f)
if err != nil {
panic(err)
}
var passes bool
if hasNomsHeader {
passes = bytes.HasPrefix(bs, ExpectedHeaderForFileFromNoms)
} else {
passes = bytes.HasPrefix(bs, ExpectedHeader)
}
if !passes {
fmt.Printf("ERROR: Wrong copyright header: %v\n", path)
failed = true
}
}
return nil
})
for path, _ := range nomsLookup {
fmt.Printf("ERROR: Missing noms file from CopiedNomsFiles: %v\n", path)
fmt.Printf(" Please update with new location or remove the reference in ./utils/copyrightshdrs/")
failed = true
}
return failed
}
func CheckProto() bool {
var failed bool
filepath.Walk("../proto", func(path string, info os.FileInfo, err error) error {
if strings.HasSuffix(path, ".proto") {
f, err := os.Open(path)
if err != nil {
panic(err)
}
defer f.Close()
bs, err := ioutil.ReadAll(f)
if err != nil {
panic(err)
}
passes := bytes.HasPrefix(bs, ExpectedHeader)
if !passes {
fmt.Printf("ERROR: Wrong copyright header: %v\n", path)
failed = true
}
}
return nil
})
return failed
}
@@ -1,3 +1,17 @@
// Copyright 2019 Liquidata, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package dolt.services.remotesapi.v1alpha1;
@@ -129,4 +143,4 @@ message GetRepoMetadataResponse {
message ClientRepoFormat {
string nbf_version = 1;
string nbs_version = 2;
}
}
@@ -1,3 +1,17 @@
// Copyright 2019 Liquidata, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package dolt.services.remotesapi.v1alpha1;