From c0050e5e0158f558f497fa89a62affc17fd0459a Mon Sep 17 00:00:00 2001 From: anakinxc <103552181+anakinxc@users.noreply.github.com> Date: Thu, 14 Mar 2024 10:28:09 +0800 Subject: [PATCH] Fix all copyright banner (#290) --- .github/workflows/license-check.yml | 14 ++++ .licenserc.yaml | 64 +++++++++++++++++++ bazel/mcl.BUILD | 14 ++++ yacl/crypto/base/aes/aes_intrinsics.h | 2 +- yacl/crypto/primitives/vss/BUILD.bazel | 14 ++++ yacl/crypto/primitives/zkp/sigma_config.cc | 2 +- yacl/io/kv/kvstore.h | 14 +++- yacl/io/kv/kvstore_test.cc | 14 +++- yacl/io/kv/leveldb_kvstore.cc | 14 +++- yacl/io/kv/leveldb_kvstore.h | 14 +++- yacl/io/kv/memory_kvstore.cc | 14 +++- yacl/io/kv/memory_kvstore.h | 14 +++- .../blackbox_service_errorcode.h | 4 +- yacl/link/transport/brpc_blackbox_link.cc | 2 +- yacl/link/transport/brpc_link.cc | 2 +- 15 files changed, 190 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/license-check.yml create mode 100644 .licenserc.yaml diff --git a/.github/workflows/license-check.yml b/.github/workflows/license-check.yml new file mode 100644 index 00000000..bec92349 --- /dev/null +++ b/.github/workflows/license-check.yml @@ -0,0 +1,14 @@ +--- +name: License Check +on: + push: + branches: + - main + pull_request: + branches: + - main +permissions: + contents: read +jobs: + license-checker: + uses: secretflow/.github/.github/workflows/license-check.yml@main diff --git a/.licenserc.yaml b/.licenserc.yaml new file mode 100644 index 00000000..621b9a87 --- /dev/null +++ b/.licenserc.yaml @@ -0,0 +1,64 @@ +header: # <1> + license: + spdx-id: Apache-2.0 # <2> + copyright-owner: Ant Group Co., Ltd. # <3> + copyright-year: '2024' # <25> + software-name: secretflow # <4> + + pattern: | # <6> + 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[s]?://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. + + paths: # <7> + - '**' + + paths-ignore: # <8> + - '.circleci' + - '.github' + - '**/*.md' + - '**/*.json' + - '**/*.yaml' + - '**/*.yml' + - '**/*.patch' + - '**/*.lds' + - '**/*.csv' + - 'LICENSE' + - 'NOTICE' + - '.bazelversion' + - '.clang-format' + - '.clang-tidy' + - '.gitattributes' + - '.gitignore' + - '.gitmodules' + - 'yacl/base/dynamic_bitset.h' # MIT + - 'yacl/crypto/base/aes/aes_intrinsics.h' + - 'yacl/crypto/base/aes/aes_opt.h' + + comment: never # <9> + + license-location-threshold: 80 # <10> + + language: # <11> + Starlark: # <12> + extensions: #<13> + - ".bazel" + - ".bazelrc" + - "BUILD" + - ".bzl" + - "WORKSPACE" + comment_style_id: PythonStyle # <15> + Cpp: + extensions: + - ".cc" + - ".h" + - ".cu" + comment_style_id: DoubleSlash \ No newline at end of file diff --git a/bazel/mcl.BUILD b/bazel/mcl.BUILD index 6515f7f6..614023d3 100644 --- a/bazel/mcl.BUILD +++ b/bazel/mcl.BUILD @@ -1,3 +1,17 @@ +# Copyright 2024 Ant Group Co., Ltd. +# +# 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. + load("@yacl//bazel:yacl.bzl", "yacl_cmake_external") package(default_visibility = ["//visibility:public"]) diff --git a/yacl/crypto/base/aes/aes_intrinsics.h b/yacl/crypto/base/aes/aes_intrinsics.h index 455a7ae7..dde69d7c 100644 --- a/yacl/crypto/base/aes/aes_intrinsics.h +++ b/yacl/crypto/base/aes/aes_intrinsics.h @@ -9,7 +9,7 @@ // // 2. Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in -// the documentation and/or other materials provided with the +// the documentation and/or other materials provided with the // distribution. // // 3. All advertising materials mentioning features or use of this diff --git a/yacl/crypto/primitives/vss/BUILD.bazel b/yacl/crypto/primitives/vss/BUILD.bazel index 5398f1c4..6f51b969 100644 --- a/yacl/crypto/primitives/vss/BUILD.bazel +++ b/yacl/crypto/primitives/vss/BUILD.bazel @@ -1,3 +1,17 @@ +# Copyright 2024 Ant Group Co., Ltd. +# +# 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. + load("//bazel:yacl.bzl", "yacl_cc_library", "yacl_cc_test") package(default_visibility = ["//visibility:public"]) diff --git a/yacl/crypto/primitives/zkp/sigma_config.cc b/yacl/crypto/primitives/zkp/sigma_config.cc index a97ecc17..0af3f31a 100644 --- a/yacl/crypto/primitives/zkp/sigma_config.cc +++ b/yacl/crypto/primitives/zkp/sigma_config.cc @@ -1,6 +1,6 @@ // Copyright 2023 Ant Group Co., Ltd. // -// Licensed under the Apache License, Version 2.0 (the "License"){} +// 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 // diff --git a/yacl/io/kv/kvstore.h b/yacl/io/kv/kvstore.h index dc5ee43b..d2e3d696 100644 --- a/yacl/io/kv/kvstore.h +++ b/yacl/io/kv/kvstore.h @@ -1,4 +1,16 @@ -// Copyright (c) 2021 Ant Financial. All rights reserved. +// Copyright 2021 Ant Group Co., Ltd. +// +// 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. #pragma once diff --git a/yacl/io/kv/kvstore_test.cc b/yacl/io/kv/kvstore_test.cc index ea6f7294..3885de20 100644 --- a/yacl/io/kv/kvstore_test.cc +++ b/yacl/io/kv/kvstore_test.cc @@ -1,4 +1,16 @@ -// Copyright (c) 2021 Ant Financial. All rights reserved. +// Copyright 2021 Ant Group Co., Ltd. +// +// 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. #include #include diff --git a/yacl/io/kv/leveldb_kvstore.cc b/yacl/io/kv/leveldb_kvstore.cc index 69571159..4539140c 100644 --- a/yacl/io/kv/leveldb_kvstore.cc +++ b/yacl/io/kv/leveldb_kvstore.cc @@ -1,4 +1,16 @@ -// Copyright (c) 2021 Ant Financial. All rights reserved. +// Copyright 2021 Ant Group Co., Ltd. +// +// 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. #include "yacl/io/kv/leveldb_kvstore.h" diff --git a/yacl/io/kv/leveldb_kvstore.h b/yacl/io/kv/leveldb_kvstore.h index c2cc69d6..f9e56242 100644 --- a/yacl/io/kv/leveldb_kvstore.h +++ b/yacl/io/kv/leveldb_kvstore.h @@ -1,4 +1,16 @@ -// Copyright (c) 2021 Ant Financial. All rights reserved. +// Copyright 2021 Ant Group Co., Ltd. +// +// 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. #pragma once diff --git a/yacl/io/kv/memory_kvstore.cc b/yacl/io/kv/memory_kvstore.cc index 7447bd3b..f2eddc74 100644 --- a/yacl/io/kv/memory_kvstore.cc +++ b/yacl/io/kv/memory_kvstore.cc @@ -1,4 +1,16 @@ -// Copyright (c) 2021 Ant Financial. All rights reserved. +// Copyright 2021 Ant Group Co., Ltd. +// +// 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. #include "yacl/io/kv/memory_kvstore.h" diff --git a/yacl/io/kv/memory_kvstore.h b/yacl/io/kv/memory_kvstore.h index e033120e..a683c8c2 100644 --- a/yacl/io/kv/memory_kvstore.h +++ b/yacl/io/kv/memory_kvstore.h @@ -1,4 +1,16 @@ -// Copyright (c) 2021 Ant Financial. All rights reserved. +// Copyright 2021 Ant Group Co., Ltd. +// +// 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. #pragma once diff --git a/yacl/link/transport/blackbox_interconnect/blackbox_service_errorcode.h b/yacl/link/transport/blackbox_interconnect/blackbox_service_errorcode.h index 20e881e0..5dff39d9 100644 --- a/yacl/link/transport/blackbox_interconnect/blackbox_service_errorcode.h +++ b/yacl/link/transport/blackbox_interconnect/blackbox_service_errorcode.h @@ -1,10 +1,10 @@ // Copyright 2023 Ant Group Co., Ltd. // -// Licensed under the Apache License, Version 2.0 (the "License")}, +// 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 +// 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, diff --git a/yacl/link/transport/brpc_blackbox_link.cc b/yacl/link/transport/brpc_blackbox_link.cc index 478022f6..8d8dfd03 100644 --- a/yacl/link/transport/brpc_blackbox_link.cc +++ b/yacl/link/transport/brpc_blackbox_link.cc @@ -4,7 +4,7 @@ // 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/LICENSE2.0 +// 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, diff --git a/yacl/link/transport/brpc_link.cc b/yacl/link/transport/brpc_link.cc index f8ecc026..690c9894 100644 --- a/yacl/link/transport/brpc_link.cc +++ b/yacl/link/transport/brpc_link.cc @@ -4,7 +4,7 @@ // 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/LICENSE2.0 +// 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,