Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
22fa00199
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2022
22fa00199
Commits
314691ad
Unverified
Commit
314691ad
authored
2 years ago
by
lni
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Makefile: report all errors identified by static-check (#4182)
minor fix for various static check errors escaped from previous runs
parent
b4db4a72
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Makefile
+4
-10
4 additions, 10 deletions
Makefile
pkg/sql/plan/visit_query.go
+3
-1
3 additions, 1 deletion
pkg/sql/plan/visit_query.go
pkg/vm/engine/tae/logstore/store/file.go
+7
-4
7 additions, 4 deletions
pkg/vm/engine/tae/logstore/store/file.go
with
14 additions
and
15 deletions
Makefile
+
4
−
10
View file @
314691ad
...
...
@@ -167,10 +167,6 @@ install-static-check-tools:
@
go
install
github.com/apache/skywalking-eyes/cmd/license-eye@latest
@
go
install
honnef.co/go/tools/cmd/staticcheck@latest
# TODO: tracking https://github.com/golangci/golangci-lint/issues/2649
DIRS
=
pkg/...
\
cmd/...
EXTRA_LINTERS
=
-E
exportloopref
-E
rowserrcheck
-E
depguard
-D
unconvert
\
-E
prealloc
-E
gofmt
...
...
@@ -178,9 +174,7 @@ STATICCHECK_CHECKS=QF1001,QF1002,QF1003,QF1004,QF1005,QF1006,QF1007,QF1008,QF100
.PHONY
:
static-check
static-check
:
config cgo
@$(
CGO_OPTS
)
staticcheck
-checks
$(
STATICCHECK_CHECKS
)
./...
@$(
CGO_OPTS
)
go vet
-vettool
=
$(
which molint
)
./...
@$(
CGO_OPTS
)
license-eye
-c
.licenserc.yml header check
@
for
p
in
$(
DIRS
);
do
\
$(
CGO_OPTS
)
golangci-lint run
$(
EXTRA_LINTERS
)
$$
p
;
\
done
;
$(
CGO_OPTS
)
staticcheck
-checks
$(
STATICCHECK_CHECKS
)
./...
$(
CGO_OPTS
)
go vet
-vettool
=
`
which molint
`
./...
$(
CGO_OPTS
)
license-eye
-c
.licenserc.yml header check
$(
CGO_OPTS
)
golangci-lint run
$(
EXTRA_LINTERS
)
./...
This diff is collapsed.
Click to expand it.
pkg/sql/plan/visit_query.go
+
3
−
1
View file @
314691ad
...
...
@@ -33,7 +33,9 @@ func NewVisitQuery(qry *Query, rules []VisitRule) *VisitQuery {
func
(
vq
*
VisitQuery
)
exploreNode
(
node
*
Node
)
error
{
for
i
:=
range
node
.
Children
{
vq
.
exploreNode
(
vq
.
qry
.
Nodes
[
node
.
Children
[
i
]])
if
err
:=
vq
.
exploreNode
(
vq
.
qry
.
Nodes
[
node
.
Children
[
i
]]);
err
!=
nil
{
return
err
}
}
for
_
,
rule
:=
range
vq
.
rules
{
...
...
This diff is collapsed.
Click to expand it.
pkg/vm/engine/tae/logstore/store/file.go
+
7
−
4
View file @
314691ad
...
...
@@ -18,7 +18,6 @@ import (
"context"
"errors"
"fmt"
"io/ioutil"
"os"
"path"
"path/filepath"
...
...
@@ -108,7 +107,7 @@ func OpenRotateFile(dir, name string, mu *sync.RWMutex, rotateChecker RotateChec
postCommitFunc
:
postCommitFunc
,
}
if
!
newDir
{
files
,
err
:=
ioutil
.
ReadDir
(
dir
)
files
,
err
:=
os
.
ReadDir
(
dir
)
if
err
!=
nil
{
return
nil
,
err
}
...
...
@@ -123,14 +122,18 @@ func OpenRotateFile(dir, name string, mu *sync.RWMutex, rotateChecker RotateChec
if
err
!=
nil
{
return
nil
,
err
}
info
,
err
:=
f
.
Info
()
if
err
!=
nil
{
return
nil
,
err
}
vf
:=
&
vFile
{
RWMutex
:
&
sync
.
RWMutex
{},
File
:
file
,
version
:
version
,
commitCond
:
*
sync
.
NewCond
(
new
(
sync
.
Mutex
)),
history
:
rf
.
history
,
size
:
int
(
f
.
Size
()),
syncpos
:
int
(
f
.
Size
()),
size
:
int
(
info
.
Size
()),
syncpos
:
int
(
info
.
Size
()),
}
vf
.
vInfo
=
newVInfo
(
vf
)
// vf.ReadMeta()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment