Lennart Poettering
ce4801c42b
doc: readd vanished ```
...
This disappeared in 1e8f5f79e1
, let's
restore it.
2023-10-11 11:41:56 +02:00
Yu Watanabe
ec88da9146
docs: fix typo
2023-08-01 15:53:32 +09:00
Zbigniew Jędrzejewski-Szmek
da89046643
tree-wide: "<n>bit" → "<n>-bit"
...
In some places, "<n> bits" is used when more appropriate.
2023-07-02 11:10:12 +01:00
Lennart Poettering
2499d32022
docs: document threading situation in coding style
2023-06-23 10:05:16 +02:00
Lennart Poettering
4d26b2277a
doc: say in CODING_STYLE that AT_EMPTY_PATH should be implied on openat() style APIs (and NULL path is OK)
...
As discussed here:
https://github.com/systemd/systemd/pull/27397#issuecomment-1521630044
2023-04-25 14:05:08 +02:00
Dmitry V. Levin
ba1ca5ef26
CODING_STYLE: note that 'unsigned' form is preferred over 'unsigned int'
2023-03-08 21:17:23 +00:00
Zbigniew Jędrzejewski-Szmek
1e8f5f79e1
docs/CODING_STYLE: add sentence about redirection operators
2023-02-06 09:19:04 +01:00
Dmitry V. Levin
5c7a4f21dd
docs, man: consistently use comma after "For example"
2023-01-23 22:52:34 +00:00
Dmitry V. Levin
e347d53ace
docs: fix grammar a bit
2023-01-23 22:52:34 +00:00
Dmitry V. Levin
d8b67e05fb
docs: fix a few typos
2023-01-23 22:52:34 +00:00
Lennart Poettering
f591cf66f0
doc: document how we expect empty lines to be used
2023-01-17 21:26:13 +01:00
Sam James
4e11b54b31
CODING_STYLE: fix 'better' typo
2023-01-06 14:03:19 +01:00
Lennart Poettering
bbb71e5c98
CODING_STYLE: fix header level
2022-09-08 16:13:07 +02:00
Lennart Poettering
e8a587dca2
docs: Some CODING_STYLE additions
2022-09-07 10:05:46 +02:00
Lennart Poettering
e109541fe6
docs: suggests people use path_extract_filename() + path_extract_directory()
2022-08-23 15:10:15 +02:00
Yu Watanabe
74223cbe14
tree-wide: fix typo
2022-06-10 08:26:08 +09:00
Zbigniew Jędrzejewski-Szmek
a5b28b7721
CODING_STYLE: say that inet_ntop() is a no no
2022-06-06 09:52:52 +02:00
Lennart Poettering
e28770e367
docs: document how we usually define enums
2022-03-14 19:10:11 +00:00
Lennart Poettering
40f55f6998
docs: document we use C11 with GNU extensions now
...
Follow-up for: #22711
2022-03-14 18:43:49 +00:00
bearhoney
d0515a289a
Update CODING_STYLE.md
...
Fixed typo.
2022-02-07 10:46:22 +00:00
Erik Sjölund
f223fd6add
docs: fix typos and improve language
...
Fix typos and improve the language by
adding a few commas and a missing word.
2022-01-26 22:35:33 +00:00
Lennart Poettering
947796eac3
docs: mention RET_NERRNO() in CODING_STYLE.md
2021-11-16 08:04:09 +01:00
Emily Gonyer
be7148ebed
Change gendered terms to be gender-neutral ( #21325 )
...
Some typos are also fixed.
2021-11-12 16:09:56 +01:00
Zbigniew Jędrzejewski-Szmek
9214f2999b
CODING_STYLE: allow joined variable declarations and function calls
...
… but only for a single variable.
The guidelines already allowed declaring variables at the point of
initialization. But not making a function call to do that. Let's allow that
now. The existing style of declaring and initializing seperate is still
allowed, and whatever makes most sense should be used.
2021-11-03 10:30:36 +01:00
Lennart Poettering
e3bde91293
doc: document that alloca_safe() and friends are the APIs to use
2021-10-14 15:57:52 +02:00
Zbigniew Jędrzejewski-Szmek
0aff7b7584
docs: add spdx tags to all .md files
...
I have no idea if this is going to cause rendering problems, and it is fairly
hard to check. So let's just merge this, and if it github markdown processor
doesn't like it, revert.
2021-09-27 09:19:02 +02:00
Anders Wenhaug
4dbad977ff
docs: add coding style example
...
Add example of how to structure else-blocks following a multiline block.
2021-06-24 10:06:40 +09:00
Zbigniew Jędrzejewski-Szmek
756755d0fc
docs: update coding style a bit
...
Say that r should be declared at the top of the function.
Don't say that fixed buffers result in truncation, right after saying that they
must only be used if size is known.
Adjust order of examples to be consistent.
2021-06-11 18:45:31 +01:00
Štěpán Němec
6ae11e1220
docs/CODING_STYLE: fix some typos
2021-06-10 15:29:28 +01:00
Luca Boccassi
2ecce1f1a8
docs: add ARCHITECTURE.md with code map
...
Initial and coarse version of a code map, useful for people getting
started and looking at the repository for the first time.
2021-06-03 22:14:19 +02:00
Zbigniew Jędrzejewski-Szmek
bcef0f33cc
docs: more markup
2021-03-11 14:43:16 +01:00
Lennart Poettering
b775b1828d
docs: document not to use FILENAME_MAX in our codebase
...
It's a weird thing. Let's explain why.
2021-03-08 22:47:44 +01:00
Anita Zhang
800d0802e4
docs: update coding style for return (void) func(...)
...
Seems that people think it's useful for brevity so make it explicit in
the CODING_STYLE.
2020-10-27 00:20:17 -07:00
Lennart Poettering
cf33b70765
docs: some coding style updates
...
Primarily:
1. Mention that we prefer if return parameters carry "ret_" as prefix in
their name
2. Clarify that debug-level logging is always OK, and irrelevant to when
deciding whether a function is logging or non-logging.
2020-10-19 15:30:11 +02:00
Luca Boccassi
7489ccc350
coding style: document how to break a function declaration
2020-08-20 13:19:28 +02:00
Joerg Behrmann
c90b6abc91
docs: spelling fixes
2020-08-04 12:39:03 +02:00
Tomer Shechner
c1495f8e9d
fix typo
...
I was thoroughly reading your nice coding style page and found out that you guys missed an 's'.
😁
2020-07-07 10:50:36 +09:00
Zbigniew Jędrzejewski-Szmek
38b38500c6
tree-wide: use "hostname" spelling everywhere
...
It's not that I think that "hostname" is vastly superior to "host name". Quite
the opposite — the difference is small, and in some context the two-word version
does fit better. But in the tree, there are ~200 occurrences of the first, and
>1600 of the other, and consistent spelling is more important than any particular
spelling choice.
2020-04-21 16:58:04 +02:00
Lennart Poettering
ff2c2d0850
docs: make sure there's only one # markdown header in each file
...
@bertob wants us to be strict here, and only have one "#" header per
markdown file, and use "##" (or "###", …) for all others. Interestingly,
we mostly got this right already, but this fixes a few cases where this
wasn't correct.
2019-12-13 11:56:08 +01:00
Tobias Bernard
b41a3f66c9
docs: make it pretty
...
Add custom Jekyll theme, logo, webfont and .gitignore
FIXME: the markdown files have some H1 headers which need to be replaced
with H2
2019-12-11 17:04:20 +01:00
Lennart Poettering
4cdca0af11
docs: place all our markdown docs in rough categories
2019-12-11 10:53:00 +01:00
Simon Schricker
2d1b928109
docs: fix typo
2019-07-30 08:44:05 +02:00
Michael Prokop
d238709c14
docs: fix typos and duplicate words
...
s/and and/and/
s/explicity/explicitly/
s/that that/that/
s/the the/the/
s/is is/it is/
s/overriden/overridden/
2019-06-27 10:43:21 +02:00
Lennart Poettering
b5bd7a29f9
some CODING_STYLE additions
2019-06-25 10:56:15 +02:00
Lennart Poettering
b4f12824a0
CODING_STYLE: rename "Others" section to "Code Organization and Semantics"
...
This is a bit of a grabbag, but it's the best I could come up with
without having lots of single-item sections.
2019-04-12 17:01:05 +02:00
Lennart Poettering
4467d39315
CODING_STYLE: split out section about runtime behaviour
2019-04-12 16:59:48 +02:00
Lennart Poettering
78e5b4d7ee
CODING_STYLE: add section about C constructs use
2019-04-12 16:53:27 +02:00
Lennart Poettering
3b75e079a8
CODING_STYLE: split out section about deadlocks
2019-04-12 16:50:24 +02:00
Lennart Poettering
96f6cfbf62
CODING_STYLE: split out section about logging
2019-04-12 16:49:02 +02:00
Lennart Poettering
5638076135
CODING_STYLE: export section about exporting symbols
2019-04-12 16:45:03 +02:00