Commit Graph

8 Commits

Author SHA1 Message Date
Willy Tarreau
02ec3fe669 DOC: coding-style: update a few rules about pointers
It's really annoying to see that in 2020 we're still facing bugs caused
by dangling pointers in the code that result from poorly written rules
about how these pointers are supposed to be handled, set and reset. Let's
add a few supposedly obvious (but apparently not) rules about how pointers
have to be used through out the code in hope to make such bad practices
disappear (or at least have something to point the authors to after
reviewing their code).
2020-11-18 19:59:38 +01:00
Jackie Tapia
749f74c622 DOC: Use gender neutral language
This patch updates the documentation files and code comments to avoid
the use of gender specific phrasing in favor of "they" or "it".
2020-07-26 22:35:43 +02:00
Willy Tarreau
bdc62096fc DOC: minor update to coding style file
It used to still refrence includes/{types,proto,common}/, now turned
to import/ and haproxy/.
2020-07-07 16:23:11 +02:00
Ilya Shipitsin
2a950d02a9 DOC: assorted typo fixes in the documentation and Makefile
This is another round of cleanups in various docs and comments in the
Makefile.
2020-03-06 10:49:55 +01:00
Michael Prokop
4438c6061d DOC: fix typos
s/accidently/accidentally/
s/any ot these messages/any of theses messages/
s/catched/caught/
s/completly/completely/
s/convertor/converter/
s/desribing/describing/
s/developper/developer/
s/eventhough/even though/
s/exectution/execution/
s/functionnality/functionality/
s/If it receive a/If it receives a/
s/In can even/It can even/
s/informations/information/
s/it will be remove /it will be removed /
s/langage/language/
s/mentionned/mentioned/
s/negociated/negotiated/
s/Optionnaly/Optionally/
s/ouputs/outputs/
s/outweights/outweighs/
s/ressources/resources/
2019-05-25 07:34:24 +02:00
Joseph Herlant
71b4b150f2 DOC: fix a few typos in the documentation
This commit deals with a few misspells in the documentation.
2018-11-18 22:23:15 +01:00
Willy Tarreau
8f1b35b383 DOC: update coding-style to reference checkpatch.pl
Running the Linux kernel's checkpatch.pl is actually quite efficient
at spotting style issues and even sometimes bugs. The doc now suggests
how to use it to avoid the warnings that are specific to Linux's stricter
rules.

It properly reports errors like the following ones that were found on
real submissions so it should improve the situation for everyone :

ERROR: "foo * bar" should be "foo *bar"
+static char * tcpcheck_get_step_comment(struct check *, int);

ERROR: do not use assignment in if condition
+                       if ((comment = tcpcheck_get_step_comment(check, step)))

WARNING: trailing semicolon indicates no statements, indent implies otherwise
+                       if (elem->data && elem->free);
+                               elem->free(elem->data);

ERROR: do not initialise statics to 0 or NULL
+static struct lru64_head *ssl_ctx_lru_tree = NULL;

ERROR: space required after that ',' (ctx:VxV)
+           !X509_gmtime_adj(X509_get_notAfter(newcrt),(long)60*60*24*365))
                                                      ^
WARNING: space prohibited between function name and open parenthesis '('
+       else if (EVP_PKEY_type (capkey->type) == EVP_PKEY_RSA)

ERROR: trailing statements should be on next line
+       if (cacert) X509_free(cacert);

ERROR: space prohibited after that open parenthesis '('
+                                       !(         (srv_op_state == SRV_ST_STOPPED)
2015-09-21 16:45:45 +02:00
Willy Tarreau
7f051b39d2 DOC: add a coding-style file
This will help newcomers adapt to existing (or desired) style and will
save them some time.
2011-12-30 17:33:27 +01:00