Browse Source

add reviewdog (#105)

* add reviewdog
revert-106-v2
scott lewis GitHub 3 years ago
parent
commit
c90cb3b940
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 46 additions and 1 deletions
  1. +1
    -0
      .github/actions/review-dog
  2. +35
    -0
      .github/workflows/reviewdog.yml
  3. +3
    -0
      .gitmodules
  4. +6
    -0
      .reviewdog.yml
  5. +1
    -1
      pkg/tc/lock/lock_manager.go

+ 1
- 0
.github/actions/review-dog

@@ -0,0 +1 @@
Subproject commit 6a895732124427993d93d4ccf93e2c664a9068cd

+ 35
- 0
.github/workflows/reviewdog.yml View File

@@ -0,0 +1,35 @@
#
# 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: reviewdog
on: [pull_request]
jobs:
golangci-lint:
name: review
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
persist-credentials: false
submodules: true
- name: golangci-lint
uses: ./.github/actions/review-dog
with:
golangci_lint_flags: "--timeout=10m"

+ 3
- 0
.gitmodules View File

@@ -0,0 +1,3 @@
[submodule ".github/actions/review-dog"]
path = .github/actions/review-dog
url = git@github.com:reviewdog/action-golangci-lint.git

+ 6
- 0
.reviewdog.yml View File

@@ -0,0 +1,6 @@
runner:
golint:
cmd: golangci-lint run
errorformat:
- "%f:%l:%c: %m"
level: warning

+ 1
- 1
pkg/tc/lock/lock_manager.go View File

@@ -2,7 +2,7 @@ package lock

import (
"encoding/json"
"github.com/opentrx/seata-golang/v2/pkg/apis"
"github.com/opentrx/seata-golang/v2/pkg/tc/model"
"github.com/opentrx/seata-golang/v2/pkg/tc/storage"


Loading…
Cancel
Save