mirror of
https://github.com/AdguardTeam/AdGuardDNS.git
synced 2026-08-07 02:42:06 -04:00
Sync v2.8.0
This commit is contained in:
1 parent
5690301129
commit
41f7e6cb22
141 files changed
+11627
-7233
No files matched your search
+14
-1
@@ -53,4 +53,17 @@ readonly go count_flags shuffle_flags timeout_flags fuzztime_flags
|
||||
"$v_flags"\
|
||||
"$fuzztime_flags"\
|
||||
--fuzz="FuzzCloner_Clone"\
|
||||
./internal/dnsmsg/;
|
||||
./internal/dnsmsg/\
|
||||
;
|
||||
|
||||
"$go" test\
|
||||
"$count_flags"\
|
||||
"$shuffle_flags"\
|
||||
"$race_flags"\
|
||||
"$timeout_flags"\
|
||||
"$x_flags"\
|
||||
"$v_flags"\
|
||||
"$fuzztime_flags"\
|
||||
--fuzz="FuzzHumanIDParser_ParseNormalized"\
|
||||
./internal/agd/\
|
||||
;
|
||||
@@ -49,11 +49,11 @@ readonly go
|
||||
(
|
||||
cd ./internal/backendpb/
|
||||
protoc\
|
||||
--go-grpc_opt=Mbackend.proto=./backendpb\
|
||||
--go-grpc_opt=Mdns.proto=./backendpb\
|
||||
--go-grpc_opt=paths=source_relative\
|
||||
--go-grpc_out=.\
|
||||
--go_opt=Mbackend.proto=./backendpb\
|
||||
--go_opt=Mdns.proto=./backendpb\
|
||||
--go_opt=paths=source_relative\
|
||||
--go_out=.\
|
||||
./backend.proto
|
||||
./dns.proto
|
||||
)
|
||||
+20
-27
@@ -167,36 +167,29 @@ git ls-files -- 'Makefile' '*.conf' '*.go' '*.mod' '*.sh' '*.yaml' '*.yml'\
|
||||
|
||||
run_linter nilness ./... "$dnssrvmod"
|
||||
|
||||
# Do not use fieldalignment on $dnssrvmod, because ameshkov likes to place
|
||||
# struct fields in an order that he considers more readable.
|
||||
# TODO(a.garipov): Remove the grep crutch once golang/go#60509 is fixed.
|
||||
#
|
||||
# TODO(a.garipov): Remove the loop once golang/go#60509, golang/go#61574 are
|
||||
# fixed.
|
||||
(
|
||||
run_linter fieldalignment ./main.go
|
||||
run_linter -e shadow --strict ./main.go
|
||||
# TODO(a.garipov): Add a filtering function to run_linter.
|
||||
fieldalignment_output="$( fieldalignment ./... "$dnssrvmod" 2>&1 | grep -e '\.pb\.go' -v || : )"
|
||||
readonly fieldalignment_output
|
||||
|
||||
set +f
|
||||
for d in ./internal/*/ ./internal/*/*/ ./internal/*/*/*/
|
||||
do
|
||||
case "$d"
|
||||
in
|
||||
(*/testdata/*|\
|
||||
./internal/dnsserver/*|\
|
||||
./internal/backendpb/|\
|
||||
./internal/profiledb/internal/filecachepb/|\
|
||||
./internal/tools/)
|
||||
continue
|
||||
;;
|
||||
(*)
|
||||
run_linter fieldalignment "$d"
|
||||
run_linter -e shadow --strict "$d"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
)
|
||||
if [ "$fieldalignment_output" != '' ]
|
||||
then
|
||||
printf '%s\n' "$fieldalignment_output"
|
||||
|
||||
run_linter -e shadow --strict "$dnssrvmod"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# TODO(a.garipov): Remove the grep crutch once golang/go#61574 is fixed.
|
||||
shadow_output="$( shadow --strict ./... "$dnssrvmod" 2>&1 | grep -e '\.pb\.go' -v || : )"
|
||||
readonly shadow_output
|
||||
|
||||
if [ "$shadow_output" != '' ]
|
||||
then
|
||||
printf '%s\n' "$shadow_output"
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run_linter gosec --quiet ./... "$dnssrvmod"
|
||||
|
||||
|
||||
Reference in new issue
Block a user