Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit419bf43

Browse files
authored
Merge branch 'master' into go-factory-lint
2 parentsbb4065b +4384969 commit419bf43

File tree

6 files changed

+68
-8
lines changed

6 files changed

+68
-8
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name:Check Documentation
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
8+
doc:
9+
name:Build documentation
10+
runs-on:ubuntu-latest
11+
env:
12+
GO_VERSION:'1.21'
13+
NODE_VERSION:'20.x'
14+
CGO_ENABLED:0
15+
16+
steps:
17+
-name:Check out code
18+
uses:actions/checkout@v4
19+
with:
20+
fetch-depth:0
21+
22+
-name:Set up Go ${{ env.GO_VERSION }}
23+
uses:actions/setup-go@v4
24+
with:
25+
go-version:${{ env.GO_VERSION }}
26+
27+
-name:Cache Go modules
28+
uses:actions/cache@v3
29+
with:
30+
# In order:
31+
# * Module download cache
32+
# * Build cache (Linux)
33+
path:|
34+
~/go/pkg/mod
35+
~/.cache/go-build
36+
key:docs-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
37+
restore-keys:|
38+
docs-${{ runner.os }}-go-
39+
40+
-run:go mod download
41+
42+
-name:Use Node.js ${{ env.NODE_VERSION }}
43+
uses:actions/setup-node@v4
44+
with:
45+
node-version:${{ env.NODE_VERSION }}
46+
cache:npm
47+
cache-dependency-path:docs/package-lock.json
48+
49+
-run:npm install --legacy-peer-deps
50+
working-directory:./docs
51+
52+
-name:Build Documentation
53+
run:npm run build
54+
working-directory:./docs

‎.golangci.reference.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,10 @@ linters-settings:
205205
rules:
206206
# Name of a rule.
207207
main:
208+
# Used to determine the package matching priority.
209+
# There are three different modes: `original`, `strict`, and `lax`.
210+
# Default: "original"
211+
list-mode:lax
208212
# List of file globs that will match this list of settings to compare against.
209213
# Default: $all
210214
files:

‎go.mod‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ require (
1313
github.com/BurntSushi/tomlv1.3.2
1414
github.com/Djarvur/go-err113v0.0.0-20210108212216-aea10b59be24
1515
github.com/GaijinEntertainment/go-exhaustruct/v3v3.1.0
16-
github.com/OpenPeeDeeP/depguard/v2v2.1.0
16+
github.com/OpenPeeDeeP/depguard/v2v2.2.0
1717
github.com/alecthomas/go-check-sumtypev0.1.3
1818
github.com/alexkohler/nakedret/v2v2.0.2
1919
github.com/alexkohler/preallocv1.0.0

‎go.sum‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎pkg/config/linters_settings.go‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,10 @@ type DepGuardSettings struct {
290290
}
291291

292292
typeDepGuardListstruct {
293-
Files []string`mapstructure:"files"`
294-
Allow []string`mapstructure:"allow"`
295-
Deny []DepGuardDeny`mapstructure:"deny"`
293+
ListModestring`mapstructure:"list-mode"`
294+
Files []string`mapstructure:"files"`
295+
Allow []string`mapstructure:"allow"`
296+
Deny []DepGuardDeny`mapstructure:"deny"`
296297
}
297298

298299
typeDepGuardDenystruct {

‎pkg/golinters/depguard.go‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ func NewDepguard(settings *config.DepGuardSettings) *goanalysis.Linter {
1515
ifsettings!=nil {
1616
fors,rule:=rangesettings.Rules {
1717
list:=&depguard.List{
18-
Files:rule.Files,
19-
Allow:rule.Allow,
18+
ListMode:rule.ListMode,
19+
Files:rule.Files,
20+
Allow:rule.Allow,
2021
}
2122

2223
// because of bug with Viper parsing (split on dot) we use a list of struct instead of a map.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp