Pull request 1804: newline-lint
Merge in DNS/adguard-home from newline-lint to master Squashed commit of the following: commit 2fc0b662b9ac9d954275c5ebe8c140be4cd365be Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Apr 6 14:16:14 2023 +0300 client: rm line commit 10246727179a84094edd17fad5cd6f0a5c38b821 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Apr 6 13:51:06 2023 +0300 all: add newline lint
This commit is contained in:
parent
61b4043775
commit
f553eee842
|
@ -3,4 +3,4 @@
|
||||||
"rules": {
|
"rules": {
|
||||||
"no-debugger":"warn",
|
"no-debugger":"warn",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"timeUpdated": "2023-03-29T00:10:35.167Z",
|
"timeUpdated": "2023-04-06T10:46:09.881Z",
|
||||||
"categories": {
|
"categories": {
|
||||||
"0": "audio_video_player",
|
"0": "audio_video_player",
|
||||||
"1": "comments",
|
"1": "comments",
|
||||||
|
@ -24192,4 +24192,4 @@
|
||||||
"3gppnetwork.org": "3gpp",
|
"3gppnetwork.org": "3gpp",
|
||||||
"3gpp.org": "3gpp"
|
"3gpp.org": "3gpp"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,4 +19,4 @@ END {
|
||||||
print addrs[i] ":" port
|
print addrs[i] ":" port
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,4 +10,4 @@ END {
|
||||||
} else {
|
} else {
|
||||||
print "http://" host ":" port
|
print "http://" host ":" port
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,4 +35,4 @@
|
||||||
1.3.5.7 domain4 domain4.alias
|
1.3.5.7 domain4 domain4.alias
|
||||||
7.5.3.1 domain4.alias domain4
|
7.5.3.1 domain4.alias domain4
|
||||||
::13 domain6 domain6.alias
|
::13 domain6 domain6.alias
|
||||||
::31 domain6.alias domain6
|
::31 domain6.alias domain6
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
iface sample_name inet static
|
iface sample_name inet static
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
# parent directory. Real interface files usually contain only absolute paths.
|
# parent directory. Real interface files usually contain only absolute paths.
|
||||||
|
|
||||||
source ./testdata/ifaces
|
source ./testdata/ifaces
|
||||||
source ./testdata/*
|
source ./testdata/*
|
||||||
|
|
|
@ -3,4 +3,4 @@ IP address HW type Flags HW address Mask Device
|
||||||
::ffff:ffff 0x1 0x0 ef:cd:ab:ef:cd:ab * br-lan
|
::ffff:ffff 0x1 0x0 ef:cd:ab:ef:cd:ab * br-lan
|
||||||
0.0.0.0 0x0 0x0 00:00:00:00:00:00 * unspec
|
0.0.0.0 0x0 0x0 00:00:00:00:00:00 * unspec
|
||||||
1.2.3.4.5 0x1 0x2 aa:bb:cc:dd:ee:ff * wan
|
1.2.3.4.5 0x1 0x2 aa:bb:cc:dd:ee:ff * wan
|
||||||
1.2.3.4 0x1 0x2 12:34:56:78:910 * wan
|
1.2.3.4 0x1 0x2 12:34:56:78:910 * wan
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
.DS_Store
|
|
||||||
node_modules
|
|
|
@ -21,4 +21,4 @@
|
||||||
<redoc spec-url='https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/openapi/openapi.yaml'></redoc>
|
<redoc spec-url='https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/openapi/openapi.yaml'></redoc>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"> </script>
|
<script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"> </script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -90,7 +90,7 @@ then
|
||||||
make VERBOSE="$verbose" go-os-check go-lint go-test
|
make VERBOSE="$verbose" go-os-check go-lint go-test
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$( git diff --cached --name-only -- '*.md' '*.yaml' '*.yml' )" ]
|
if [ "$( git diff --cached --name-only -- '*.md' '*.txt' '*.yaml' '*.yml' )" ]
|
||||||
then
|
then
|
||||||
make VERBOSE="$verbose" txt-lint
|
make VERBOSE="$verbose" txt-lint
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -27,6 +27,31 @@ set -f -u
|
||||||
# Source the common helpers, including not_found.
|
# Source the common helpers, including not_found.
|
||||||
. ./scripts/make/helper.sh
|
. ./scripts/make/helper.sh
|
||||||
|
|
||||||
git ls-files -- '*.md' '*.yaml' '*.yml' 'client/src/__locales/en.json'\
|
# Simple analyzers
|
||||||
|
|
||||||
|
# trailing_newlines is a simple check that makes sure that all plain-text files
|
||||||
|
# have a trailing newlines to make sure that all tools work correctly with them.
|
||||||
|
#
|
||||||
|
# TODO(a.garipov): Add to the standard skeleton project.
|
||||||
|
trailing_newlines() {
|
||||||
|
nl="$( printf "\n" )"
|
||||||
|
readonly nl
|
||||||
|
|
||||||
|
git ls-files\
|
||||||
|
':!*.png'\
|
||||||
|
':!*.tar.gz'\
|
||||||
|
':!*.zip'\
|
||||||
|
| while read -r f
|
||||||
|
do
|
||||||
|
if [ "$( tail -c -1 "$f" )" != "$nl" ]
|
||||||
|
then
|
||||||
|
printf '%s: must have a trailing newline\n' "$f"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
run_linter -e trailing_newlines
|
||||||
|
|
||||||
|
git ls-files -- '*.md' '*.txt' '*.yaml' '*.yml' 'client/src/__locales/en.json'\
|
||||||
| xargs misspell --error\
|
| xargs misspell --error\
|
||||||
| sed -e 's/^/misspell: /'
|
| sed -e 's/^/misspell: /'
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
node_modules
|
|
||||||
test/anonquerylog.json
|
|
|
@ -116,4 +116,3 @@ const main = async () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
main();
|
main();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue