Skip to content
This repository was archived by the owner on Sep 29, 2023. It is now read-only.

Commit 31d545b

Browse files
Prepare for merging in sigstore-verifier (#74)
* Prepare for merging in sigstore-verifier Keeping old code around for now, moving under its own directory. Signed-off-by: Hayden Blauzvern <hblauzvern@google.com> * FIx test Signed-off-by: Hayden Blauzvern <hblauzvern@google.com> --------- Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
1 parent ab0aaf7 commit 31d545b

17 files changed

+22
-189
lines changed

.github/dependabot.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ updates:
1919
directory: "/"
2020
schedule:
2121
interval: daily
22-
open-pull-requests-limit: 10
22+
- package-ecosystem: gomod
23+
directory: "./old-sigstore-go"
24+
schedule:
25+
interval: daily
2326
- package-ecosystem: github-actions
2427
directory: "/"
2528
schedule:
2629
interval: daily
27-
open-pull-requests-limit: 10

.github/workflows/test.yml .github/workflows/test-old.yml

+8-10
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,18 @@ jobs:
4141
with:
4242
go-version: ${{ matrix.go-version }}
4343
check-latest: true
44-
45-
- name: Cache Modules
46-
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
47-
with:
48-
path: ~/go/pkg/mod
49-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
50-
restore-keys: |
51-
${{ runner.os }}-go-
44+
go-version-file: 'old-sigstore-go/go.mod'
45+
cache-dependency-path: 'old-sigstore-go/go.sum'
5246

5347
- name: Build
54-
run: go build -v ./...
48+
run: |
49+
cd old-sigstore-go
50+
go build -v ./...
5551
5652
- name: Test
57-
run: go test -v ./...
53+
run: |
54+
cd old-sigstore-go
55+
go test -v ./...
5856
5957
- name: Ensure no files were modified as a result of the build
6058
run: git update-index --refresh && git diff-index --quiet HEAD -- || git diff --exit-code

.github/workflows/verify.yml .github/workflows/verify-old.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,6 @@ jobs:
5353
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
5454
timeout-minutes: 5
5555
with:
56-
version: v1.51
56+
version: v1.54
57+
working-directory: old-sigstore-go
5758
only-new-issues: true

.golangci.yml

+8-176
Original file line numberDiff line numberDiff line change
@@ -24,180 +24,12 @@ issues:
2424
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
2525
max-same-issues: 0
2626
linters:
27-
disable-all: true
2827
enable:
29-
- asasalint
30-
- asciicheck
31-
- bidichk
32-
- bodyclose
33-
- contextcheck
34-
- decorder
35-
- depguard
36-
- dogsled
37-
- dupl
38-
- durationcheck
39-
- errcheck
40-
- errchkjson
41-
- errname
42-
- execinquery
43-
- goconst
44-
- gocritic
45-
- gocyclo
46-
- godox
47-
- gofmt
48-
- gofumpt
49-
- goheader
50-
- goimports
51-
- gomoddirectives
52-
- gomodguard
53-
- goprintffuncname
54-
- gosec
55-
- gosimple
56-
- govet
57-
- grouper
58-
- importas
59-
- ineffassign
60-
- loggercheck
61-
- makezero
62-
- misspell
63-
- nakedret
64-
- nolintlint
65-
- nosprintfhostport
66-
- prealloc
67-
- predeclared
68-
- promlinter
69-
- reassign
70-
- revive
71-
- staticcheck
72-
- stylecheck
73-
- tenv
74-
- testableexamples
75-
- typecheck
76-
- unconvert
77-
- unparam
78-
- unused
79-
- usestdlibvars
80-
- whitespace
81-
linters-settings:
82-
godox:
83-
keywords:
84-
- BUG
85-
- FIXME
86-
- HACK
87-
errcheck:
88-
check-type-assertions: true
89-
check-blank: true
90-
gocritic:
91-
enabled-checks:
92-
# Diagnostic
93-
- appendAssign
94-
- argOrder
95-
- badCall
96-
- badCond
97-
- badLock
98-
- badRegexp
99-
- builtinShadowDecl
100-
- caseOrder
101-
- codegenComment
102-
- commentedOutCode
103-
- deferInLoop
104-
- deprecatedComment
105-
- dupArg
106-
- dupBranchBody
107-
- dupCase
108-
- dupSubExpr
109-
- emptyDecl
110-
- evalOrder
111-
- exitAfterDefer
112-
- externalErrorReassign
113-
- filepathJoin
114-
- flagDeref
115-
- flagName
116-
- mapKey
117-
- nilValReturn
118-
- offBy1
119-
- regexpPattern
120-
- returnAfterHttpError
121-
- sloppyReassign
122-
- sloppyTypeAssert
123-
- sortSlice
124-
- sprintfQuotedString
125-
- sqlQuery
126-
- syncMapLoadAndDelete
127-
- truncateCmp
128-
- unnecessaryDefer
129-
- weakCond
130-
131-
# Performance
132-
- appendCombine
133-
- equalFold
134-
- hugeParam
135-
- indexAlloc
136-
- preferDecodeRune
137-
- preferFprint
138-
- preferStringWriter
139-
- preferWriteByte
140-
- rangeExprCopy
141-
- rangeValCopy
142-
- sliceClear
143-
- stringXbytes
144-
145-
# Style
146-
- assignOp
147-
- boolExprSimplify
148-
- captLocal
149-
- commentFormatting
150-
- commentedOutImport
151-
- defaultCaseOrder
152-
- deferUnlambda
153-
- docStub
154-
- dupImport
155-
- elseif
156-
- emptyFallthrough
157-
- emptyStringTest
158-
- exposedSyncMutex
159-
- hexLiteral
160-
- httpNoBody
161-
- ifElseChain
162-
- ioutilDeprecated
163-
- methodExprCall
164-
- newDeref
165-
- octalLiteral
166-
- preferFilepathJoin
167-
- redundantSprint
168-
- regexpMust
169-
- regexpSimplify
170-
- ruleguard
171-
- singleCaseSwitch
172-
- sloppyLen
173-
- stringConcatSimplify
174-
- switchTrue
175-
- timeExprSimplify
176-
- tooManyResultsChecker
177-
- typeAssertChain
178-
- typeDefFirst
179-
- typeSwitchVar
180-
- underef
181-
- unlabelStmt
182-
- unlambda
183-
- unslice
184-
- valSwap
185-
- whyNoLint
186-
- wrapperFunc
187-
- yodaStyleExpr
188-
189-
# Opinionated
190-
- builtinShadow
191-
- importShadow
192-
- initClause
193-
- nestingReduce
194-
- paramTypeCombine
195-
- ptrToRefParam
196-
- typeUnparen
197-
- unnamedResult
198-
- unnecessaryBlock
199-
nolintlint:
200-
# Enable to ensure that nolint directives are all used. Default is true.
201-
allow-unused: false
202-
# Enable to require nolint directives to mention the specific linter being suppressed. Default is false.
203-
require-specific: true
28+
- unused
29+
- errcheck
30+
- gofmt
31+
- goimports
32+
- gosec
33+
- gocritic
34+
- misspell
35+
- revive

go.mod old-sigstore-go/go.mod

File renamed without changes.

go.sum old-sigstore-go/go.sum

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)