Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
733f2b06
Unverified
Commit
733f2b06
authored
Nov 11, 2018
by
Carl Bergquist
Committed by
GitHub
Nov 11, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14012 from mjtrangoni/fix-megacheck-issues
Fix last megacheck issues
parents
0e7b6dcf
a2275e8a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
14 deletions
+14
-14
.circleci/config.yml
+2
-1
pkg/tsdb/influxdb/influxdb.go
+4
-5
scripts/build/release_publisher/publisher_test.go
+8
-8
No files found.
.circleci/config.yml
View file @
733f2b06
...
...
@@ -85,12 +85,13 @@ jobs:
-
run
:
'
go
get
-u
github.com/tsenart/deadcode'
-
run
:
'
go
get
-u
github.com/jgautheron/goconst/cmd/goconst'
-
run
:
'
go
get
-u
github.com/gordonklaus/ineffassign'
-
run
:
'
go
get
-u
honnef.co/go/tools/cmd/megacheck'
-
run
:
'
go
get
-u
github.com/opennota/check/cmd/structcheck'
-
run
:
'
go
get
-u
github.com/mdempsky/unconvert'
-
run
:
'
go
get
-u
github.com/opennota/check/cmd/varcheck'
-
run
:
name
:
run linters
command
:
'
gometalinter
--enable-gc
--vendor
--deadline
10m
--disable-all
--enable=deadcode
--enable=goconst
--enable=ineffassign
--enable=structcheck
--enable=unconvert
--enable=varcheck
./...'
command
:
'
gometalinter
--enable-gc
--vendor
--deadline
10m
--disable-all
--enable=deadcode
--enable=goconst
--enable=ineffassign
--enable=
megacheck
--enable=
structcheck
--enable=unconvert
--enable=varcheck
./...'
-
run
:
name
:
run go vet
command
:
'
go
vet
./pkg/...'
...
...
pkg/tsdb/influxdb/influxdb.go
View file @
733f2b06
...
...
@@ -96,16 +96,15 @@ func (e *InfluxDBExecutor) Query(ctx context.Context, dsInfo *models.DataSource,
}
func
(
e
*
InfluxDBExecutor
)
getQuery
(
dsInfo
*
models
.
DataSource
,
queries
[]
*
tsdb
.
Query
,
context
*
tsdb
.
TsdbQuery
)
(
*
Query
,
error
)
{
for
_
,
v
:=
range
queries
{
query
,
err
:=
e
.
QueryParser
.
Parse
(
v
.
Model
,
dsInfo
)
// The model supports multiple queries, but right now this is only used from
// alerting so we only needed to support batch executing 1 query at a time.
if
len
(
queries
)
>
0
{
query
,
err
:=
e
.
QueryParser
.
Parse
(
queries
[
0
]
.
Model
,
dsInfo
)
if
err
!=
nil
{
return
nil
,
err
}
return
query
,
nil
}
return
nil
,
fmt
.
Errorf
(
"query request contains no queries"
)
}
...
...
scripts/build/release_publisher/publisher_test.go
View file @
733f2b06
...
...
@@ -3,19 +3,20 @@ package main
import
"testing"
func
TestPreparingReleaseFromRemote
(
t
*
testing
.
T
)
{
var
builder
releaseBuilder
versionIn
:=
"v5.2.0-beta1"
expectedVersion
:=
"5.2.0-beta1"
whatsNewUrl
:=
"https://whatsnews.foo/"
relNotesUrl
:=
"https://relnotes.foo/"
expectedArch
:=
"amd64"
expectedOs
:=
"linux"
buildArtifacts
:=
[]
buildArtifact
{{
expectedOs
,
expectedArch
,
".linux-amd64.tar.gz"
}}
var
builder
releaseBuilder
buildArtifacts
:=
[]
buildArtifact
{{
expectedOs
,
expectedArch
,
".linux-amd64.tar.gz"
}}
builder
=
releaseFromExternalContent
{
getter
:
mockHttpGetter
{},
rawVersion
:
versionIn
,
getter
:
mockHttpGetter
{},
rawVersion
:
versionIn
,
artifactConfigurations
:
buildArtifactConfigurations
,
}
...
...
@@ -50,7 +51,6 @@ func (mockHttpGetter) getContents(url string) (string, error) {
return
url
,
nil
}
func
TestPreparingReleaseFromLocal
(
t
*
testing
.
T
)
{
whatsNewUrl
:=
"https://whatsnews.foo/"
relNotesUrl
:=
"https://relnotes.foo/"
...
...
@@ -60,7 +60,7 @@ func TestPreparingReleaseFromLocal(t *testing.T) {
var
builder
releaseBuilder
testDataPath
:=
"testdata"
builder
=
releaseLocalSources
{
path
:
testDataPath
,
path
:
testDataPath
,
artifactConfigurations
:
buildArtifactConfigurations
,
}
...
...
@@ -93,7 +93,7 @@ func TestPreparingReleaseFromLocal(t *testing.T) {
expectedOs
:=
"win"
builder
=
releaseLocalSources
{
path
:
testDataPath
,
path
:
testDataPath
,
artifactConfigurations
:
[]
buildArtifact
{{
os
:
expectedOs
,
arch
:
expectedArch
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment