From 0fdb165662a1ae27cbe5f282501beae9cec5406d Mon Sep 17 00:00:00 2001 From: Zhenxu Ke Date: Tue, 9 Mar 2021 18:15:00 +0800 Subject: [PATCH] Set up code quality check and fix some (#6519) --- .github/actions/skip/action.yml | 3 ++ .github/workflows/codeql.yaml | 49 +++++++++++++++++++ .../apm-toolkit-trace-scenario/pom.xml | 6 +-- .../scenarios/customize-scenario/pom.xml | 6 +-- .../scenarios/dubbo-2.5.x-scenario/pom.xml | 6 +-- .../scenarios/dubbo-2.7.x-scenario/pom.xml | 6 +-- .../gateway-projectA-scenario/pom.xml | 4 +- .../gateway-projectA-scenario/pom.xml | 4 +- .../jettyclient-scenario/pom.xml | 6 +-- test/plugin/scenarios/kafka-scenario/pom.xml | 6 +-- .../scenarios/mongodb-3.x-scenario/pom.xml | 6 +-- test/plugin/scenarios/okhttp-scenario/pom.xml | 6 +-- test/plugin/scenarios/pulsar-scenario/pom.xml | 4 +- .../scenarios/redisson-scenario/pom.xml | 6 +-- .../shardingsphere-3.x-scenario/pom.xml | 6 +-- .../shardingsphere-4.0.x-scenario/pom.xml | 6 +-- .../pom.xml | 6 +-- .../shardingsphere-4.x-RC3-scenario/pom.xml | 6 +-- .../shardingsphere-4.x-scenario/pom.xml | 6 +-- .../plugin/scenarios/sofarpc-scenario/pom.xml | 6 +-- .../scenarios/spring-3.0.x-scenario/pom.xml | 6 +-- .../scenarios/spring-3.1.x-scenario/pom.xml | 6 +-- .../scenarios/spring-4.1.x-scenario/pom.xml | 6 +-- .../scenarios/spring-4.3.x-scenario/pom.xml | 6 +-- .../scenarios/spring-async-scenario/pom.xml | 6 +-- .../spring-kafka-1.3.x-scenario/pom.xml | 6 +-- .../spring-kafka-2.2.x-scenario/pom.xml | 6 +-- .../spring-kafka-2.3.x-scenario/pom.xml | 6 +-- .../scenarios/spring-tx-scenario/pom.xml | 6 +-- .../scenarios/undertow-scenario/pom.xml | 6 +-- .../scenarios/zookeeper-scenario/pom.xml | 6 +-- 31 files changed, 136 insertions(+), 84 deletions(-) create mode 100644 .github/workflows/codeql.yaml diff --git a/.github/actions/skip/action.yml b/.github/actions/skip/action.yml index 7ed03e424..489ae28fd 100644 --- a/.github/actions/skip/action.yml +++ b/.github/actions/skip/action.yml @@ -33,7 +33,10 @@ inputs: ".licenserc.yaml" "docs/menu.yml" ".github/actions/skip/action.yml" + ".github/workflows/codeql.yaml" "dist-material/release-docs" + "test/plugin/*" + runs: using: "composite" steps: diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml new file mode 100644 index 000000000..8b9796ab1 --- /dev/null +++ b/.github/workflows/codeql.yaml @@ -0,0 +1,49 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. + +name: "CodeQL" + +on: + pull_request: + branches: [ 'master' ] + schedule: + - cron: '28 3 * * *' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + language: [ 'java' ] + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + submodules: true + + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + + - run: ./mvnw -Dmaven.test.skip=true clean install + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/test/plugin/scenarios/apm-toolkit-trace-scenario/pom.xml b/test/plugin/scenarios/apm-toolkit-trace-scenario/pom.xml index 8c73380c6..4ddb6b501 100644 --- a/test/plugin/scenarios/apm-toolkit-trace-scenario/pom.xml +++ b/test/plugin/scenarios/apm-toolkit-trace-scenario/pom.xml @@ -113,11 +113,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone - \ No newline at end of file + diff --git a/test/plugin/scenarios/customize-scenario/pom.xml b/test/plugin/scenarios/customize-scenario/pom.xml index c1c65f54d..da45cf030 100644 --- a/test/plugin/scenarios/customize-scenario/pom.xml +++ b/test/plugin/scenarios/customize-scenario/pom.xml @@ -102,11 +102,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone - \ No newline at end of file + diff --git a/test/plugin/scenarios/dubbo-2.5.x-scenario/pom.xml b/test/plugin/scenarios/dubbo-2.5.x-scenario/pom.xml index 0b27ed542..27b2e8e85 100644 --- a/test/plugin/scenarios/dubbo-2.5.x-scenario/pom.xml +++ b/test/plugin/scenarios/dubbo-2.5.x-scenario/pom.xml @@ -109,11 +109,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone - \ No newline at end of file + diff --git a/test/plugin/scenarios/dubbo-2.7.x-scenario/pom.xml b/test/plugin/scenarios/dubbo-2.7.x-scenario/pom.xml index 4bd7eefa7..d962e3723 100644 --- a/test/plugin/scenarios/dubbo-2.7.x-scenario/pom.xml +++ b/test/plugin/scenarios/dubbo-2.7.x-scenario/pom.xml @@ -109,11 +109,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone - \ No newline at end of file + diff --git a/test/plugin/scenarios/gateway-2.0.x-scenario/gateway-projectA-scenario/pom.xml b/test/plugin/scenarios/gateway-2.0.x-scenario/gateway-projectA-scenario/pom.xml index bdfa254b2..fc1fb5e6d 100644 --- a/test/plugin/scenarios/gateway-2.0.x-scenario/gateway-projectA-scenario/pom.xml +++ b/test/plugin/scenarios/gateway-2.0.x-scenario/gateway-projectA-scenario/pom.xml @@ -57,11 +57,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone diff --git a/test/plugin/scenarios/gateway-2.1.x-scenario/gateway-projectA-scenario/pom.xml b/test/plugin/scenarios/gateway-2.1.x-scenario/gateway-projectA-scenario/pom.xml index 09c8e9061..9a6479e1b 100644 --- a/test/plugin/scenarios/gateway-2.1.x-scenario/gateway-projectA-scenario/pom.xml +++ b/test/plugin/scenarios/gateway-2.1.x-scenario/gateway-projectA-scenario/pom.xml @@ -57,11 +57,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone diff --git a/test/plugin/scenarios/jetty-scenario/jettyclient-scenario/pom.xml b/test/plugin/scenarios/jetty-scenario/jettyclient-scenario/pom.xml index 1f20c7d62..1d50dede0 100644 --- a/test/plugin/scenarios/jetty-scenario/jettyclient-scenario/pom.xml +++ b/test/plugin/scenarios/jetty-scenario/jettyclient-scenario/pom.xml @@ -97,11 +97,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone - \ No newline at end of file + diff --git a/test/plugin/scenarios/kafka-scenario/pom.xml b/test/plugin/scenarios/kafka-scenario/pom.xml index d9b13f4a0..ebc971dd7 100644 --- a/test/plugin/scenarios/kafka-scenario/pom.xml +++ b/test/plugin/scenarios/kafka-scenario/pom.xml @@ -135,11 +135,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone - \ No newline at end of file + diff --git a/test/plugin/scenarios/mongodb-3.x-scenario/pom.xml b/test/plugin/scenarios/mongodb-3.x-scenario/pom.xml index 06166219a..d9a191400 100644 --- a/test/plugin/scenarios/mongodb-3.x-scenario/pom.xml +++ b/test/plugin/scenarios/mongodb-3.x-scenario/pom.xml @@ -130,11 +130,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone - \ No newline at end of file + diff --git a/test/plugin/scenarios/okhttp-scenario/pom.xml b/test/plugin/scenarios/okhttp-scenario/pom.xml index d6863cc5d..cb90629dd 100644 --- a/test/plugin/scenarios/okhttp-scenario/pom.xml +++ b/test/plugin/scenarios/okhttp-scenario/pom.xml @@ -133,11 +133,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone - \ No newline at end of file + diff --git a/test/plugin/scenarios/pulsar-scenario/pom.xml b/test/plugin/scenarios/pulsar-scenario/pom.xml index c00b7b18b..d8df64ee9 100644 --- a/test/plugin/scenarios/pulsar-scenario/pom.xml +++ b/test/plugin/scenarios/pulsar-scenario/pom.xml @@ -129,11 +129,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone diff --git a/test/plugin/scenarios/redisson-scenario/pom.xml b/test/plugin/scenarios/redisson-scenario/pom.xml index de15f8f2d..cdce5c1aa 100644 --- a/test/plugin/scenarios/redisson-scenario/pom.xml +++ b/test/plugin/scenarios/redisson-scenario/pom.xml @@ -95,11 +95,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone - \ No newline at end of file + diff --git a/test/plugin/scenarios/shardingsphere-3.x-scenario/pom.xml b/test/plugin/scenarios/shardingsphere-3.x-scenario/pom.xml index 2955a71e1..af3ee5199 100644 --- a/test/plugin/scenarios/shardingsphere-3.x-scenario/pom.xml +++ b/test/plugin/scenarios/shardingsphere-3.x-scenario/pom.xml @@ -137,11 +137,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone - \ No newline at end of file + diff --git a/test/plugin/scenarios/shardingsphere-4.0.x-scenario/pom.xml b/test/plugin/scenarios/shardingsphere-4.0.x-scenario/pom.xml index ce652a876..717a04236 100644 --- a/test/plugin/scenarios/shardingsphere-4.0.x-scenario/pom.xml +++ b/test/plugin/scenarios/shardingsphere-4.0.x-scenario/pom.xml @@ -138,12 +138,12 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone - \ No newline at end of file + diff --git a/test/plugin/scenarios/shardingsphere-4.x-RC1-RC2-scenario/pom.xml b/test/plugin/scenarios/shardingsphere-4.x-RC1-RC2-scenario/pom.xml index 8ab8f5fef..e443f02ea 100644 --- a/test/plugin/scenarios/shardingsphere-4.x-RC1-RC2-scenario/pom.xml +++ b/test/plugin/scenarios/shardingsphere-4.x-RC1-RC2-scenario/pom.xml @@ -139,11 +139,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone - \ No newline at end of file + diff --git a/test/plugin/scenarios/shardingsphere-4.x-RC3-scenario/pom.xml b/test/plugin/scenarios/shardingsphere-4.x-RC3-scenario/pom.xml index 6e2615a9b..1d29f34f5 100644 --- a/test/plugin/scenarios/shardingsphere-4.x-RC3-scenario/pom.xml +++ b/test/plugin/scenarios/shardingsphere-4.x-RC3-scenario/pom.xml @@ -139,11 +139,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone - \ No newline at end of file + diff --git a/test/plugin/scenarios/shardingsphere-4.x-scenario/pom.xml b/test/plugin/scenarios/shardingsphere-4.x-scenario/pom.xml index 02ef46893..90a4fc480 100644 --- a/test/plugin/scenarios/shardingsphere-4.x-scenario/pom.xml +++ b/test/plugin/scenarios/shardingsphere-4.x-scenario/pom.xml @@ -138,11 +138,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone - \ No newline at end of file + diff --git a/test/plugin/scenarios/sofarpc-scenario/pom.xml b/test/plugin/scenarios/sofarpc-scenario/pom.xml index 559767348..bae032602 100644 --- a/test/plugin/scenarios/sofarpc-scenario/pom.xml +++ b/test/plugin/scenarios/sofarpc-scenario/pom.xml @@ -109,11 +109,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone - \ No newline at end of file + diff --git a/test/plugin/scenarios/spring-3.0.x-scenario/pom.xml b/test/plugin/scenarios/spring-3.0.x-scenario/pom.xml index c233a7d7b..08635a0b8 100644 --- a/test/plugin/scenarios/spring-3.0.x-scenario/pom.xml +++ b/test/plugin/scenarios/spring-3.0.x-scenario/pom.xml @@ -87,11 +87,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone - \ No newline at end of file + diff --git a/test/plugin/scenarios/spring-3.1.x-scenario/pom.xml b/test/plugin/scenarios/spring-3.1.x-scenario/pom.xml index 62b0fbe4a..1897356b4 100644 --- a/test/plugin/scenarios/spring-3.1.x-scenario/pom.xml +++ b/test/plugin/scenarios/spring-3.1.x-scenario/pom.xml @@ -115,11 +115,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone - \ No newline at end of file + diff --git a/test/plugin/scenarios/spring-4.1.x-scenario/pom.xml b/test/plugin/scenarios/spring-4.1.x-scenario/pom.xml index 784ad6bc7..f95ac1c28 100644 --- a/test/plugin/scenarios/spring-4.1.x-scenario/pom.xml +++ b/test/plugin/scenarios/spring-4.1.x-scenario/pom.xml @@ -104,11 +104,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone - \ No newline at end of file + diff --git a/test/plugin/scenarios/spring-4.3.x-scenario/pom.xml b/test/plugin/scenarios/spring-4.3.x-scenario/pom.xml index 85cf9c4b3..b876ea759 100644 --- a/test/plugin/scenarios/spring-4.3.x-scenario/pom.xml +++ b/test/plugin/scenarios/spring-4.3.x-scenario/pom.xml @@ -111,11 +111,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone - \ No newline at end of file + diff --git a/test/plugin/scenarios/spring-async-scenario/pom.xml b/test/plugin/scenarios/spring-async-scenario/pom.xml index 63c2d157c..330d55f98 100644 --- a/test/plugin/scenarios/spring-async-scenario/pom.xml +++ b/test/plugin/scenarios/spring-async-scenario/pom.xml @@ -87,11 +87,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone - \ No newline at end of file + diff --git a/test/plugin/scenarios/spring-kafka-1.3.x-scenario/pom.xml b/test/plugin/scenarios/spring-kafka-1.3.x-scenario/pom.xml index 61f0ed084..3c8262441 100644 --- a/test/plugin/scenarios/spring-kafka-1.3.x-scenario/pom.xml +++ b/test/plugin/scenarios/spring-kafka-1.3.x-scenario/pom.xml @@ -124,11 +124,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone - \ No newline at end of file + diff --git a/test/plugin/scenarios/spring-kafka-2.2.x-scenario/pom.xml b/test/plugin/scenarios/spring-kafka-2.2.x-scenario/pom.xml index 0c0d99111..62d518db5 100644 --- a/test/plugin/scenarios/spring-kafka-2.2.x-scenario/pom.xml +++ b/test/plugin/scenarios/spring-kafka-2.2.x-scenario/pom.xml @@ -124,11 +124,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone - \ No newline at end of file + diff --git a/test/plugin/scenarios/spring-kafka-2.3.x-scenario/pom.xml b/test/plugin/scenarios/spring-kafka-2.3.x-scenario/pom.xml index 948b14c68..b00bdc1f0 100644 --- a/test/plugin/scenarios/spring-kafka-2.3.x-scenario/pom.xml +++ b/test/plugin/scenarios/spring-kafka-2.3.x-scenario/pom.xml @@ -119,11 +119,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone - \ No newline at end of file + diff --git a/test/plugin/scenarios/spring-tx-scenario/pom.xml b/test/plugin/scenarios/spring-tx-scenario/pom.xml index b622b1a7a..6c4e693e8 100644 --- a/test/plugin/scenarios/spring-tx-scenario/pom.xml +++ b/test/plugin/scenarios/spring-tx-scenario/pom.xml @@ -99,11 +99,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone - \ No newline at end of file + diff --git a/test/plugin/scenarios/undertow-scenario/pom.xml b/test/plugin/scenarios/undertow-scenario/pom.xml index 9bf672e85..8df511ad3 100644 --- a/test/plugin/scenarios/undertow-scenario/pom.xml +++ b/test/plugin/scenarios/undertow-scenario/pom.xml @@ -104,11 +104,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone - \ No newline at end of file + diff --git a/test/plugin/scenarios/zookeeper-scenario/pom.xml b/test/plugin/scenarios/zookeeper-scenario/pom.xml index 4cbbf00e6..2f91a3534 100644 --- a/test/plugin/scenarios/zookeeper-scenario/pom.xml +++ b/test/plugin/scenarios/zookeeper-scenario/pom.xml @@ -138,11 +138,11 @@ spring-snapshots - http://repo.spring.io/snapshot + https://repo.spring.io/snapshot spring-milestones - http://repo.spring.io/milestone + https://repo.spring.io/milestone - \ No newline at end of file +