File tree Expand file tree Collapse file tree 7 files changed +19
-10
lines changed
templates/github/workflows Expand file tree Collapse file tree 7 files changed +19
-10
lines changed Original file line number Diff line number Diff line change
1
+ # This script is provided by github.com/bool64/dev.
1
2
name : cloc
2
3
on :
3
4
pull_request :
5
+
6
+ # Cancel the workflow in progress in newer build is about to start.
7
+ concurrency :
8
+ group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
9
+ cancel-in-progress : true
10
+
4
11
jobs :
5
12
cloc :
6
13
runs-on : ubuntu-latest
@@ -17,19 +24,19 @@ jobs:
17
24
- name : Count Lines Of Code
18
25
id : loc
19
26
run : |
20
- curl -OL https://github.com/vearutop/sccdiff/releases/download/v1.0.1 /linux_amd64.tar.gz && tar xf linux_amd64.tar.gz
27
+ curl -sLO https://github.com/vearutop/sccdiff/releases/download/v1.0.2 /linux_amd64.tar.gz && tar xf linux_amd64.tar.gz && echo "b17e76bede22af0206b4918d3b3c4e7357f2a21b57f8de9e7c9dc0eb56b676c0 sccdiff" | shasum -c
21
28
OUTPUT=$(cd pr && ../sccdiff -basedir ../base)
22
- OUTPUT="${OUTPUT//'%'/'%25'}"
23
- OUTPUT="${OUTPUT//$'\n'/'%0A'}"
24
- OUTPUT="${OUTPUT//$'\r'/'%0D'}"
29
+ echo "${OUTPUT}"
30
+ OUTPUT="${OUTPUT//$'\n'/%0A}"
25
31
echo "::set-output name=diff::$OUTPUT"
26
32
27
33
- name : Comment Code Lines
34
+ continue-on-error : true
28
35
uses : marocchino/sticky-pull-request-comment@v2
29
36
with :
30
37
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
31
38
header : LOC
32
39
message : |
33
40
### Lines Of Code
34
41
35
- ${{ steps.loc.outputs.diff }}
42
+ ${{ steps.loc.outputs.diff }}
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ import _ "github.com/bool64/dev" // Include development helpers to project.
26
26
Add ` Makefile ` to your module with includes standard targets.
27
27
28
28
``` Makefile
29
- # GOLANGCI_LINT_VERSION := "v1.45 .2" # Optional configuration to pinpoint golangci-lint version.
29
+ # GOLANGCI_LINT_VERSION := "v1.46 .2" # Optional configuration to pinpoint golangci-lint version.
30
30
31
31
# The head of Makefile determines location of dev-go to include standard targets.
32
32
GO ?= go
Original file line number Diff line number Diff line change 1
- # GOLANGCI_LINT_VERSION := "v1.45 .2" # Optional configuration to pinpoint golangci-lint version.
1
+ # GOLANGCI_LINT_VERSION := "v1.46 .2" # Optional configuration to pinpoint golangci-lint version.
2
2
3
3
# The head of Makefile determines location of dev-go to include standard targets.
4
4
GO ?= go
Original file line number Diff line number Diff line change @@ -37,6 +37,8 @@ linters:
37
37
- tagliatelle
38
38
- errname
39
39
- ireturn
40
+ - exhaustruct
41
+ - nonamedreturns
40
42
41
43
issues :
42
44
exclude-use-default : false
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
3
[ -z " $GO " ] && GO=go
4
- [ -z " $GOLANGCI_LINT_VERSION " ] && GOLANGCI_LINT_VERSION=" v1.45 .2"
4
+ [ -z " $GOLANGCI_LINT_VERSION " ] && GOLANGCI_LINT_VERSION=" v1.46 .2"
5
5
6
6
# detecting GOPATH and removing trailing "/" if any
7
7
GOPATH=" $( go env GOPATH) "
Original file line number Diff line number Diff line change 24
24
- name : Count Lines Of Code
25
25
id : loc
26
26
run : |
27
- curl -sLO https://github.com/vearutop/sccdiff/releases/download/v1.0.1 /linux_amd64.tar.gz && tar xf linux_amd64.tar.gz
27
+ curl -sLO https://github.com/vearutop/sccdiff/releases/download/v1.0.2 /linux_amd64.tar.gz && tar xf linux_amd64.tar.gz && echo "b17e76bede22af0206b4918d3b3c4e7357f2a21b57f8de9e7c9dc0eb56b676c0 sccdiff" | shasum -c
28
28
OUTPUT=$(cd pr && ../sccdiff -basedir ../base)
29
29
echo "${OUTPUT}"
30
30
OUTPUT="${OUTPUT//$'\n'/%0A}"
Original file line number Diff line number Diff line change 27
27
28
28
with :
29
29
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
30
- version : v1.45 .2
30
+ version : v1.46 .2
31
31
32
32
# Optional: working directory, useful for monorepos
33
33
# working-directory: somedir
You can’t perform that action at this time.
0 commit comments