Pull request: 2276 no golangci
Merge in DNS/adguard-home from 2276-no-golangci to master Updates #2276. Squashed commit of the following: commit 81a5a62716b8c57e8575cf149938cd941660b6f5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Dec 8 16:59:19 2020 +0300 all: fix Makefile commit a8f2546803a3986f1292b45921c27409366bc04a Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Dec 8 16:11:09 2020 +0300 all: remove golangci-yaml, add new linters
This commit is contained in:
26
HACKING.md
26
HACKING.md
@@ -1,9 +1,9 @@
|
||||
# *AdGuardHome* Developer Guidelines
|
||||
|
||||
As of **2020-11-27**, this document is a work-in-progress, but should still be
|
||||
followed. Some of the rules aren't enforced as thoroughly or remain broken in
|
||||
old code, but this is still the place to find out about what we **want** our
|
||||
code to look like.
|
||||
As of **December 2020**, this document is partially a work-in-progress, but
|
||||
should still be followed. Some of the rules aren't enforced as thoroughly or
|
||||
remain broken in old code, but this is still the place to find out about what we
|
||||
**want** our code to look like.
|
||||
|
||||
The rules are mostly sorted in the alphabetical order.
|
||||
|
||||
@@ -32,6 +32,11 @@ The rules are mostly sorted in the alphabetical order.
|
||||
|
||||
## *Go*
|
||||
|
||||
> Not Golang, not GO, not GOLANG, not GoLang. It is Go in natural language,
|
||||
> golang for others.
|
||||
|
||||
— [@rakyll](https://twitter.com/rakyll/status/1229850223184269312)
|
||||
|
||||
### Code And Naming
|
||||
|
||||
* Avoid `goto`.
|
||||
@@ -141,6 +146,19 @@ The rules are mostly sorted in the alphabetical order.
|
||||
|
||||
* **TODO(a.garipov):** Define our *Markdown* conventions.
|
||||
|
||||
## Shell Scripting
|
||||
|
||||
* Avoid bashisms, prefer *POSIX* features only.
|
||||
|
||||
* Prefer `'raw strings'` to `"double quoted strings"` whenever possible.
|
||||
|
||||
* Put spaces within `$( cmd )`, `$(( expr ))`, and `{ cmd; }`.
|
||||
|
||||
* Use `set -e -f -u` and also `set -x` in verbose mode.
|
||||
|
||||
* Use the `"$var"` form instead of the `$var` form, unless word splitting is
|
||||
required.
|
||||
|
||||
## Text, Including Comments
|
||||
|
||||
* End sentences with appropriate punctuation.
|
||||
|
||||
Reference in New Issue
Block a user