mirror of
https://github.com/grafana/grafana.git
synced 2025-08-01 06:51:49 +08:00

* Feature: add cron setting for the ldap settings * Move ldap configuration read to special function * Introduce cron setting (no docs for it yet, pending approval) * Chore: duplicate ldap module as a service * Feature: implement active sync This is very early preliminary implementation of active sync. There is only one thing that's going right for this code - it works. Aside from that, there is no tests, error handling, docs, transactions, it's very much duplicative and etc. But this is the overall direction with architecture I'm going for * Chore: introduce login service * Chore: gradually switch to ldap service * Chore: use new approach for auth_proxy * Chore: use new approach along with refactoring * Chore: use new ldap interface for auth_proxy * Chore: improve auth_proxy and subsequently ldap * Chore: more of the refactoring bits * Chore: address comments from code review * Chore: more refactoring stuff * Chore: make linter happy * Chore: add cron dep for grafana enterprise * Chore: initialize config package var * Chore: disable gosec for now * Chore: update dependencies * Chore: remove unused module * Chore: address review comments * Chore: make linter happy
43 lines
1.2 KiB
Bash
Executable File
43 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
function exit_if_fail {
|
|
command=$@
|
|
echo "Executing '$command'"
|
|
eval $command
|
|
rc=$?
|
|
if [ $rc -ne 0 ]; then
|
|
echo "'$command' returned $rc."
|
|
exit $rc
|
|
fi
|
|
}
|
|
|
|
go get -u github.com/alecthomas/gometalinter
|
|
go get -u github.com/jgautheron/goconst/cmd/goconst
|
|
go get -u honnef.co/go/tools/cmd/staticcheck
|
|
go get -u github.com/mgechev/revive
|
|
#go get -u github.com/securego/gosec/cmd/gosec/...
|
|
go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
|
|
|
|
# use gometalinter when lints are not available in golangci or
|
|
# when gometalinter is better. Eg. goconst for gometalinter does not lint test files
|
|
# which is not desired.
|
|
exit_if_fail gometalinter --enable-gc --vendor --deadline 10m --disable-all \
|
|
--enable=goconst\
|
|
--enable=staticcheck
|
|
|
|
# use golangci-when possible
|
|
exit_if_fail golangci-lint run --deadline 10m --disable-all \
|
|
--enable=deadcode\
|
|
--enable=gofmt\
|
|
--enable=ineffassign\
|
|
--enable=structcheck\
|
|
--enable=unconvert\
|
|
--enable=varcheck
|
|
|
|
exit_if_fail go vet ./pkg/...
|
|
|
|
exit_if_fail revive -formatter stylish -config ./scripts/revive.toml
|
|
|
|
# TODO recheck the rules and leave only necessary exclusions
|
|
#exit_if_fail gosec -quiet -exclude=G104,G107,G201,G202,G204,G301,G302,G304,G402,G501,G505,G401 ./pkg/...
|