Skip to content

Commit

Permalink
*: Integrate SkyWalking-eyes to check license headers in CI and fix l…
Browse files Browse the repository at this point in the history
…icenses headers (pingcap#27198)
  • Loading branch information
fgksgf authored Aug 16, 2021
1 parent 0709307 commit 7755d25
Show file tree
Hide file tree
Showing 1,480 changed files with 1,621 additions and 9 deletions.
1 change: 1 addition & 0 deletions .build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#
# 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.

Expand Down
100 changes: 100 additions & 0 deletions .github/.licenserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
header:
license:
spdx-id: Apache-2.0
copyright-owner: PingCAP, Inc.
paths-ignore:
- 'docs/'
- 'br/'
- '.gitignore'
- '.gitattributes'
- '.golangci.yml'
- '.licenserc.yaml'
- 'LICENSES/'
- '**/*.md'
- '**/*.json'
- '**/*.pem'
- '**/*.crt'
- '**/*.test'
- '**/*.result'
- '**/*.example'
- '.codecov.yml'
- 'circle.yml'
- 'errors.toml'
- 'Jenkinsfile'
- '.editorconfig'
- 'hooks/pre-commit'
- '**/go.mod'
- '**/go.sum'
- 'LICENSE'
- '.github/'
# The license checker think the following 68 files do not have valid header licenses, need to be discussed.
# Ignore them for now.
- 'cmd/explaintest/config.toml'
- 'cmd/importer/config.toml'
- 'cmd/portgenerator/portgenerator.go'
- 'ddl/ddl.go'
- 'ddl/ddl_api.go'
- 'ddl/mock.go'
- 'ddl/options.go'
- 'executor/aggfuncs/func_stddevpop_test.go'
- 'executor/aggfuncs/func_stddevsamp_test.go'
- 'executor/aggfuncs/func_varpop_test.go'
- 'executor/aggfuncs/func_varsamp_test.go'
- 'executor/index_lookup_merge_join_test.go'
- 'executor/pkg_test.go'
- 'expression/aggregation/base_func_test.go'
- 'expression/aggregation/util_test.go'
- 'expression/builtin.go'
- 'expression/builtin_info.go'
- 'expression/builtin_math.go'
- 'expression/builtin_miscellaneous.go'
- 'expression/builtin_miscellaneous_test.go'
- 'expression/builtin_string.go'
- 'expression/builtin_time.go'
- 'metrics/alertmanager/tidb.rules.yml'
- 'metrics/topsql.go'
- 'planner/core/cache_test.go'
- 'planner/core/logical_plans_test.go'
- 'planner/core/partition_prune.go'
- 'planner/core/partition_pruning_test.go'
- 'planner/core/rule_aggregation_push_down.go'
- 'planner/core/rule_max_min_eliminate.go'
- 'planner/core/rule_partition_processor.go'
- 'planner/core/rule_predicate_push_down.go'
- 'planner/core/telemetry.go'
- 'plugin/conn_ip_example/manifest.toml'
- 'server/conn.go'
- 'server/conn_stmt.go'
- 'server/packetio.go'
- 'server/server.go'
- 'server/util.go'
- 'session/bootstrap.go'
- 'session/session.go'
- 'session/tidb.go'
- 'store/driver/kv_test.go'
- 'store/mockstore/unistore/config/config-template.toml'
- 'store/mockstore/unistore/server/server.go'
- 'table/column.go'
- 'table/table.go'
- 'table/tables/tables.go'
- 'tests/globalkilltest/config.toml'
- 'tests/readonlytest/readonly_test.go'
- 'tools/check/check-timeout.go'
- 'tools/check/revive.toml'
- 'types/convert.go'
- 'types/etc.go'
- 'types/fuzzMarshalJSON.go'
- 'types/fuzzNewBitLiteral.go'
- 'types/fuzzNewHexLiteral.go'
- 'util/collate/collate_bench_test.go'
- 'util/format/format.go'
- 'util/logutil/slow_query_logger.go'
- 'util/mvmap/fnv.go'
- 'util/prefix_helper.go'
- 'util/resourcegrouptag/resource_group_tag.go'
- 'util/set/set_with_memory_usage_test.go'
- 'util/testkit/fake.go'
- 'util/testleak/leaktest.go'
- 'util/timeutil/time_test.go'
- 'util/topsql/reporter/mock/server.go'
comment: on-failure
23 changes: 23 additions & 0 deletions .github/workflows/license-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: License checker

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
check-license:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Check License Header
uses: apache/skywalking-eyes@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
log: info
config: .github/.licenserc.yaml
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#
# 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.

Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#
# 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.

Expand Down
1 change: 1 addition & 0 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#
# 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.

Expand Down
1 change: 1 addition & 0 deletions bindinfo/bind_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions bindinfo/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions bindinfo/handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions bindinfo/session_handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions bindinfo/stat.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions br/cmd/br/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions br/cmd/tidb-lightning-ctl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions br/cmd/tidb-lightning-ctl/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions br/cmd/tidb-lightning/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions br/cmd/tidb-lightning/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions br/compatibility/prepare_backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#
# 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.

Expand Down
1 change: 1 addition & 0 deletions br/pkg/cdclog/buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions br/pkg/cdclog/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions br/pkg/cdclog/decoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions br/pkg/cdclog/puller.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions br/pkg/kv/checksum.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions br/pkg/kv/checksum_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions br/pkg/kv/kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions br/pkg/kv/kv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions br/pkg/kv/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions br/pkg/kv/session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions br/pkg/lightning/backend/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions br/pkg/lightning/backend/importer/importer.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions br/pkg/lightning/backend/importer/importer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions br/pkg/lightning/backend/kv/allocator.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions br/pkg/lightning/backend/kv/kv2sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions br/pkg/lightning/backend/kv/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions br/pkg/lightning/backend/kv/session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions br/pkg/lightning/backend/kv/sql2kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
1 change: 1 addition & 0 deletions br/pkg/lightning/backend/kv/sql2kv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// 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.

Expand Down
Loading

0 comments on commit 7755d25

Please sign in to comment.