Skip to content

Commit

Permalink
add code analysis (apache#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
slievrly authored Nov 10, 2021
1 parent 83aee26 commit faa905b
Show file tree
Hide file tree
Showing 24 changed files with 312 additions and 17 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '24 19 * * 5'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'java']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
14 changes: 3 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ projects.

## Sub-projects

* [springcloud-seata-sharding-jdbc-mybatis-plus-samples](https://github.com/wilbur-ltf/seata-samples/tree/master/springcloud-seata-sharding-jdbc-mybatis-plus-samples)
- Easy to understand, high availability,Integration example
of [Spring Cloud](https://github.com/spring-cloud)[Seata](https://github.com/seata/seata)
[ShardingJdbc](https://github.com/apache/shardingsphere)[MyBatisPlus](https://github.com/baomidou/mybatis-plus)
* [springcloud-seata-sharding-jdbc-mybatis-plus-samples](https://github.
com/wilbur-ltf/seata-samples/tree/master/springcloud-seata-sharding-jdbc-mybatis-plus-samples)Easy to understand, high availability,Integration example of [Spring Cloud](https://github.com/spring-cloud)[Seata](https://github.com/seata/seata),[ShardingJdbc](https://github.com/apache/shardingsphere),[MyBatisPlus](https://github.com/baomidou/mybatis-plus).
* [spring-cloud-alibaba-samples](https://github.com/seata/seata-samples/tree/master/spring-cloud-alibaba-samples) -
Spring Cloud Alibaba + Nacos + Dubbo + OpenFeign + Sentinel + Seata
* [dubbo](https://github.com/seata/seata-samples/tree/master/dubbo) - Integration example
Expand Down Expand Up @@ -49,13 +47,7 @@ projects.
example of [Seata](https://github.com/Seata) and [Spring Cloud](https://github.com/spring-cloud)
and [Alibaba Nacos](https://github.com/alibaba/nacos/)
* [saga](https://github.com/seata/seata-samples/tree/master/saga) - Saga mode distributed transaction demo projects
* [dubbo-multiple-datasource-mybatis-plus](https://github.com/seata/seata-samples/tree/master/dubbo-multiple-datasource-mybatis-plus)
- Integration example of [Seata](https://github.com/Seata)
and [Spring Boot](https://github.com/spring-projects/spring-boot/)
- [Apache Dubbo](https://github.com/apache/dubbo)
with [dynamic](https://github.com/baomidou/dynamic-datasource-spring-boot-starter) multiple datasource
and [MyBatisPlus](https://github.com/baomidou/mybatis-plus)
and [Alibaba Nacos](https://github.com/alibaba/nacos/)
* [dubbo-multiple-datasource-mybatis-plus](https://github.com/seata/seata-samples/tree/master/dubbo-multiple-datasource-mybatis-plus) Integration example of [Seata](https://github.com/Seata) and [Spring Boot](https://github.com/spring-projects/spring-boot/) [Apache Dubbo](https://github.com/apache/dubbo) with [dynamic](https://github.com/baomidou/dynamic-datasource-spring-boot-starter) multiple datasource and [MyBatisPlus](https://github.com/baomidou/mybatis-plus) and [Alibaba Nacos](https://github.com/alibaba/nacos/)

## Guide

Expand Down
2 changes: 1 addition & 1 deletion seata-samples-jit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.12</version>
<version>1.18.8</version>
</dependency>
<dependency>
<groupId>io.seata</groupId>
Expand Down
2 changes: 1 addition & 1 deletion seata-spring-boot-starter-samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<mybatis.version>1.3.2</mybatis.version>
<mybatis-plus.version>2.3</mybatis-plus.version>
<nacos.version>0.2.3</nacos.version>
<lombok.version>1.16.22</lombok.version>
<lombok.version>1.18.8</lombok.version>
<dubbo.version>2.7.13</dubbo.version>
<nacos-client.verison>1.1.3</nacos-client.verison>
<seata.version>1.4.2</seata.version>
Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-alibaba-samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<java.version>1.8</java.version>
<spring-cloud.version>Greenwich.SR1</spring-cloud.version>
<spring-cloud-alibaba.version>2.1.0.RELEASE</spring-cloud-alibaba.version>
<lombok.version>1.16.8</lombok.version>
<lombok.version>1.18.8</lombok.version>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sikpTests>true</sikpTests>
Expand Down
4 changes: 4 additions & 0 deletions spring-cloud-alibaba-samples/sca-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@
<packaging>jar</packaging>

<artifactId>sca-common</artifactId>
<properties>
<lombok.version>1.18.8</lombok.version>
</properties>

<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<optional>true</optional>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion springboot-dubbo-seata-zk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<mybatis.version>1.3.2</mybatis.version>
<mybatis-plus.version>2.3</mybatis-plus.version>
<nacos.version>0.2.3</nacos.version>
<lombok.version>1.16.22</lombok.version>
<lombok.version>1.18.8</lombok.version>
<dubbo.version>2.7.3</dubbo.version>
<seata.version>1.1.0</seata.version>
<netty.version>4.1.42.Final</netty.version>
Expand Down
2 changes: 1 addition & 1 deletion springboot-shardingsphere-seata/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<dubbo-boot.version>0.2.1.RELEASE</dubbo-boot.version>
<nacos.version>0.2.1.RELEASE</nacos.version>
<nacos-config-spring-boot.version>0.2.1</nacos-config-spring-boot.version>
<lombok.version>1.16.4</lombok.version>
<lombok.version>1.18.8</lombok.version>
<springboot.version>2.0.8.RELEASE</springboot.version>
<!--<sharding-sphere.version>4.0.0-RC2-SNAPSHOT</sharding-sphere.version>-->
<sharding-sphere.version>4.0.0-RC2</sharding-sphere.version>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 1999-2021 Seata.io Group.
*
* 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 com.work.framework.config;

import javax.sql.DataSource;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 1999-2021 Seata.io Group.
*
* 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 com.work.order;

import org.springframework.boot.SpringApplication;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 1999-2021 Seata.io Group.
*
* 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 com.work.order.controller;

import com.work.order.feign.StockFeignClient;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 1999-2021 Seata.io Group.
*
* 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 com.work.order.feign;

import org.springframework.cloud.openfeign.FeignClient;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 1999-2021 Seata.io Group.
*
* 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 com.work.order.feign;

import org.springframework.cloud.openfeign.FeignClient;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 1999-2021 Seata.io Group.
*
* 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 com.work.order.model;

import com.baomidou.mybatisplus.annotation.IdType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 1999-2021 Seata.io Group.
*
* 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 com.work.order.repository;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 1999-2021 Seata.io Group.
*
* 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 com.work.order.service;

import com.work.order.feign.AccountFeignClient;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 1999-2021 Seata.io Group.
*
* 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 com.work.order;

import org.junit.Test;
Expand Down
6 changes: 5 additions & 1 deletion springcloud-nacos-seata/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<artifactId>seata-samples</artifactId>
<groupId>io.seata</groupId>
<version>1.1.0</version>
</parent>
<groupId>com.work</groupId>
<artifactId>springcloud-nacos-seata</artifactId>
<packaging>pom</packaging>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 1999-2021 Seata.io Group.
*
* 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 com.work.stock;

import org.springframework.boot.SpringApplication;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 1999-2021 Seata.io Group.
*
* 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 com.work.stock.controller;

import com.work.stock.service.StockService;
Expand Down
Loading

0 comments on commit faa905b

Please sign in to comment.