mirror of
https://github.com/MontFerret/ferret.git
synced 2025-08-15 20:02:56 +02:00
Merge branch 'master' into cleanup/fix-naming-convention
This commit is contained in:
@@ -18,10 +18,14 @@ addons:
|
|||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
|
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
|
||||||
|
- go get -u github.com/mgechev/revive
|
||||||
- sudo curl -o /usr/local/lib/antlr-4.7.1-complete.jar https://www.antlr.org/download/antlr-4.7.1-complete.jar
|
- sudo curl -o /usr/local/lib/antlr-4.7.1-complete.jar https://www.antlr.org/download/antlr-4.7.1-complete.jar
|
||||||
- export CLASSPATH=".:/usr/local/lib/antlr-4.7.1-complete.jar:$CLASSPATH"
|
- export CLASSPATH=".:/usr/local/lib/antlr-4.7.1-complete.jar:$CLASSPATH"
|
||||||
- mkdir $HOME/travis-bin
|
- mkdir $HOME/travis-bin
|
||||||
- echo -e '#!/bin/bash\njava -jar /usr/local/lib/antlr-4.7.1-complete.jar "$@"' > $HOME/travis-bin/antlr4
|
- echo -e '#!/bin/bash\njava -jar /usr/local/lib/antlr-4.7.1-complete.jar "$@"' > $HOME/travis-bin/antlr4
|
||||||
- echo -e '#!/bin/bash\njava org.antlr.v4.gui.TestRig "$@"' > $HOME/travis-bin/grun
|
- echo -e '#!/bin/bash\njava org.antlr.v4.gui.TestRig "$@"' > $HOME/travis-bin/grun
|
||||||
- chmod +x $HOME/travis-bin/*
|
- chmod +x $HOME/travis-bin/*
|
||||||
- export PATH=$PATH:$HOME/travis-bin
|
- export PATH=$PATH:$HOME/travis-bin
|
||||||
|
|
||||||
|
script:
|
||||||
|
- revive -config revive.toml -formatter friendly -exclude ./pkg/parser/fql/... ./...
|
||||||
|
70
Gopkg.lock
generated
70
Gopkg.lock
generated
@@ -1,6 +1,41 @@
|
|||||||
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
|
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
|
||||||
|
|
||||||
|
|
||||||
|
[[projects]]
|
||||||
|
branch = "master"
|
||||||
|
digest = "1:b464fe4a2262c37c82c16ff76dd77ae8efb85036d2f6b13b428a3e63bce3d562"
|
||||||
|
name = "github.com/MontFerret/ferret"
|
||||||
|
packages = [
|
||||||
|
"cli",
|
||||||
|
"cli/browser",
|
||||||
|
"pkg/compiler",
|
||||||
|
"pkg/parser",
|
||||||
|
"pkg/parser/fql",
|
||||||
|
"pkg/runtime",
|
||||||
|
"pkg/runtime/collections",
|
||||||
|
"pkg/runtime/core",
|
||||||
|
"pkg/runtime/expressions",
|
||||||
|
"pkg/runtime/expressions/clauses",
|
||||||
|
"pkg/runtime/expressions/literals",
|
||||||
|
"pkg/runtime/expressions/operators",
|
||||||
|
"pkg/runtime/logging",
|
||||||
|
"pkg/runtime/values",
|
||||||
|
"pkg/stdlib",
|
||||||
|
"pkg/stdlib/collections",
|
||||||
|
"pkg/stdlib/html",
|
||||||
|
"pkg/stdlib/html/driver",
|
||||||
|
"pkg/stdlib/html/driver/common",
|
||||||
|
"pkg/stdlib/html/driver/dynamic",
|
||||||
|
"pkg/stdlib/html/driver/dynamic/eval",
|
||||||
|
"pkg/stdlib/html/driver/dynamic/events",
|
||||||
|
"pkg/stdlib/html/driver/static",
|
||||||
|
"pkg/stdlib/strings",
|
||||||
|
"pkg/stdlib/types",
|
||||||
|
"pkg/stdlib/utils",
|
||||||
|
]
|
||||||
|
pruneopts = "UT"
|
||||||
|
revision = "51d794d6c1b3cbc5e4d3a654000a601f974b0288"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
digest = "1:a62f6ed230a8cd138a9efbe718e7d0b0294f139266f5f55cd942769a9aac8de2"
|
digest = "1:a62f6ed230a8cd138a9efbe718e7d0b0294f139266f5f55cd942769a9aac8de2"
|
||||||
name = "github.com/PuerkitoBio/goquery"
|
name = "github.com/PuerkitoBio/goquery"
|
||||||
@@ -137,14 +172,6 @@
|
|||||||
revision = "a96e63847dc3c67d17befa69c303767e2f84e54f"
|
revision = "a96e63847dc3c67d17befa69c303767e2f84e54f"
|
||||||
version = "v2.1"
|
version = "v2.1"
|
||||||
|
|
||||||
[[projects]]
|
|
||||||
branch = "master"
|
|
||||||
digest = "1:f7aa53146bf79462509d4ce136826ebbd64907e4679e1b04e62758da6b68e589"
|
|
||||||
name = "github.com/orcaman/concurrent-map"
|
|
||||||
packages = ["."]
|
|
||||||
pruneopts = "UT"
|
|
||||||
revision = "b28018939af9022337862b94a463abb18abb3e0e"
|
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
digest = "1:40e195917a951a8bf867cd05de2a46aaf1806c50cf92eebf4c16f78cd196f747"
|
digest = "1:40e195917a951a8bf867cd05de2a46aaf1806c50cf92eebf4c16f78cd196f747"
|
||||||
name = "github.com/pkg/errors"
|
name = "github.com/pkg/errors"
|
||||||
@@ -221,6 +248,32 @@
|
|||||||
analyzer-name = "dep"
|
analyzer-name = "dep"
|
||||||
analyzer-version = 1
|
analyzer-version = 1
|
||||||
input-imports = [
|
input-imports = [
|
||||||
|
"github.com/MontFerret/ferret/cli",
|
||||||
|
"github.com/MontFerret/ferret/cli/browser",
|
||||||
|
"github.com/MontFerret/ferret/pkg/compiler",
|
||||||
|
"github.com/MontFerret/ferret/pkg/parser",
|
||||||
|
"github.com/MontFerret/ferret/pkg/parser/fql",
|
||||||
|
"github.com/MontFerret/ferret/pkg/runtime",
|
||||||
|
"github.com/MontFerret/ferret/pkg/runtime/collections",
|
||||||
|
"github.com/MontFerret/ferret/pkg/runtime/core",
|
||||||
|
"github.com/MontFerret/ferret/pkg/runtime/expressions",
|
||||||
|
"github.com/MontFerret/ferret/pkg/runtime/expressions/clauses",
|
||||||
|
"github.com/MontFerret/ferret/pkg/runtime/expressions/literals",
|
||||||
|
"github.com/MontFerret/ferret/pkg/runtime/expressions/operators",
|
||||||
|
"github.com/MontFerret/ferret/pkg/runtime/logging",
|
||||||
|
"github.com/MontFerret/ferret/pkg/runtime/values",
|
||||||
|
"github.com/MontFerret/ferret/pkg/stdlib",
|
||||||
|
"github.com/MontFerret/ferret/pkg/stdlib/collections",
|
||||||
|
"github.com/MontFerret/ferret/pkg/stdlib/html",
|
||||||
|
"github.com/MontFerret/ferret/pkg/stdlib/html/driver",
|
||||||
|
"github.com/MontFerret/ferret/pkg/stdlib/html/driver/common",
|
||||||
|
"github.com/MontFerret/ferret/pkg/stdlib/html/driver/dynamic",
|
||||||
|
"github.com/MontFerret/ferret/pkg/stdlib/html/driver/dynamic/eval",
|
||||||
|
"github.com/MontFerret/ferret/pkg/stdlib/html/driver/dynamic/events",
|
||||||
|
"github.com/MontFerret/ferret/pkg/stdlib/html/driver/static",
|
||||||
|
"github.com/MontFerret/ferret/pkg/stdlib/strings",
|
||||||
|
"github.com/MontFerret/ferret/pkg/stdlib/types",
|
||||||
|
"github.com/MontFerret/ferret/pkg/stdlib/utils",
|
||||||
"github.com/PuerkitoBio/goquery",
|
"github.com/PuerkitoBio/goquery",
|
||||||
"github.com/antlr/antlr4/runtime/Go/antlr",
|
"github.com/antlr/antlr4/runtime/Go/antlr",
|
||||||
"github.com/chzyer/readline",
|
"github.com/chzyer/readline",
|
||||||
@@ -236,7 +289,6 @@
|
|||||||
"github.com/mafredri/cdp/rpcc",
|
"github.com/mafredri/cdp/rpcc",
|
||||||
"github.com/mafredri/cdp/session",
|
"github.com/mafredri/cdp/session",
|
||||||
"github.com/natefinch/lumberjack",
|
"github.com/natefinch/lumberjack",
|
||||||
"github.com/orcaman/concurrent-map",
|
|
||||||
"github.com/pkg/errors",
|
"github.com/pkg/errors",
|
||||||
"github.com/rs/zerolog",
|
"github.com/rs/zerolog",
|
||||||
"github.com/sethgrid/pester",
|
"github.com/sethgrid/pester",
|
||||||
|
8
Makefile
8
Makefile
@@ -32,12 +32,12 @@ doc:
|
|||||||
fmt:
|
fmt:
|
||||||
go fmt ${DIR_CLI}/... ${DIR_PKG}/...
|
go fmt ${DIR_CLI}/... ${DIR_PKG}/...
|
||||||
|
|
||||||
# https://github.com/golang/lint
|
# https://github.com/mgechev/revive
|
||||||
# go get github.com/golang/lint/golint
|
# go get github.com/mgechev/revive
|
||||||
lint:
|
lint:
|
||||||
golint ${DIR_CLI}/... ${DIR_PKG}/...
|
revive -config ../revive.toml -formatter friendly -exclude ./pkg/parser/fql/... ./...
|
||||||
|
|
||||||
# http://godoc.org/code.google.com/p/go.tools/cmd/vet
|
# http://godoc.org/code.google.com/p/go.tools/cmd/vet
|
||||||
# go get code.google.com/p/go.tools/cmd/vet
|
# go get code.google.com/p/go.tools/cmd/vet
|
||||||
vet:
|
vet:
|
||||||
go vet ${DIR_CLI}/... ${DIR_PKG}/...
|
go vet ${DIR_CLI}/... ${DIR_PKG}/...
|
||||||
|
32
revive.toml
Normal file
32
revive.toml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
ignoreGeneratedHeader = true
|
||||||
|
severity = "error"
|
||||||
|
confidence = 0.8
|
||||||
|
errorCode = 1
|
||||||
|
warningCode = 0
|
||||||
|
|
||||||
|
[rule.package-comments]
|
||||||
|
severity = "warning"
|
||||||
|
[rule.exported]
|
||||||
|
severity = "warning"
|
||||||
|
[rule.blank-imports]
|
||||||
|
[rule.context-as-argument]
|
||||||
|
[rule.context-keys-type]
|
||||||
|
[rule.dot-imports]
|
||||||
|
[rule.error-return]
|
||||||
|
[rule.error-strings]
|
||||||
|
[rule.error-naming]
|
||||||
|
[rule.if-return]
|
||||||
|
[rule.increment-decrement]
|
||||||
|
[rule.var-naming]
|
||||||
|
[rule.var-declaration]
|
||||||
|
[rule.range]
|
||||||
|
[rule.receiver-naming]
|
||||||
|
[rule.time-naming]
|
||||||
|
[rule.unexported-return]
|
||||||
|
[rule.indent-error-flow]
|
||||||
|
[rule.errorf]
|
||||||
|
[rule.empty-block]
|
||||||
|
[rule.superfluous-else]
|
||||||
|
[rule.unused-parameter]
|
||||||
|
[rule.unreachable-code]
|
||||||
|
[rule.redefines-builtin-id]
|
Reference in New Issue
Block a user