summaryrefslogtreecommitdiffstats
path: root/docs/CODING_STYLE.md (follow)
Commit message (Collapse)AuthorAgeFilesLines
* man: document preference for secure_getenv() in coding styleLennart Poettering2024-10-141-0/+8
|
* docs/CODING_STYLE: document that we nowadays prefer (const char*) for func ↵Mike Yuan2024-07-021-1/+13
| | | | | | ret type Addresses https://github.com/systemd/systemd/pull/33567#discussion_r1662818225
* CODING_STYLE: document "reterr_" return parametersLennart Poettering2024-06-131-14/+48
| | | | | | | In some recent PRs (e.g. #32628) I started to systematically name return parameters that shall only be initialized on failure (because they carry additional error meta information, such as the line/column number of parse failures or so). Let's make this official in the coding style.
* Merge pull request #31648 from neighbourhoodie/review-contentZbigniew Jędrzejewski-Szmek2024-04-171-1/+1
|\ | | | | | | I did the merge manually to resolve a trivial conflict.
| * docs/CODING_STYLE: remove whitespacehulkoba2024-03-271-1/+1
| |
* | docs: Add Tests section to coding style docDaan De Meyer2024-04-101-0/+10
|/
* docs/CODING_STYLE: fix typo (CLONE_VORK -> VFORK)Mike Yuan2024-02-241-1/+1
|
* Revert "docs: use collections to structure the data"Zbigniew Jędrzejewski-Szmek2024-02-231-0/+782
| | | | | | | | | This reverts commit 5e8ff010a1436d33bbf3c108335af6e0b4ff7a2a. This broke all the URLs, we can't have that. (And actually, we probably don't _want_ to make the change either. It's nicer to have all the pages in one directory, so one doesn't have to figure out to which collection the page belongs.)
* docs: use collections to structure the datahulkoba2024-02-221-782/+0
|
* doc: readd vanished ```Lennart Poettering2023-10-111-0/+1
| | | | | This disappeared in 1e8f5f79e1b6ae2b4115df280c626b71c54a5bb6, let's restore it.
* docs: fix typoYu Watanabe2023-08-011-1/+1
|
* tree-wide: "<n>bit" → "<n>-bit"Zbigniew Jędrzejewski-Szmek2023-07-021-1/+1
| | | | In some places, "<n> bits" is used when more appropriate.
* docs: document threading situation in coding styleLennart Poettering2023-06-231-0/+29
|
* doc: say in CODING_STYLE that AT_EMPTY_PATH should be implied on openat() ↵Lennart Poettering2023-04-251-0/+9
| | | | | | | | style APIs (and NULL path is OK) As discussed here: https://github.com/systemd/systemd/pull/27397#issuecomment-1521630044
* CODING_STYLE: note that 'unsigned' form is preferred over 'unsigned int'Dmitry V. Levin2023-03-081-1/+1
|
* docs/CODING_STYLE: add sentence about redirection operatorsZbigniew Jędrzejewski-Szmek2023-02-061-2/+5
|
* docs, man: consistently use comma after "For example"Dmitry V. Levin2023-01-231-1/+1
|
* docs: fix grammar a bitDmitry V. Levin2023-01-231-2/+2
|
* docs: fix a few typosDmitry V. Levin2023-01-231-1/+1
|
* doc: document how we expect empty lines to be usedLennart Poettering2023-01-171-2/+16
|
* CODING_STYLE: fix 'better' typoSam James2023-01-061-1/+1
|
* CODING_STYLE: fix header levelLennart Poettering2022-09-081-1/+1
|
* docs: Some CODING_STYLE additionsLennart Poettering2022-09-071-0/+38
|
* docs: suggests people use path_extract_filename() + path_extract_directory()Lennart Poettering2022-08-231-5/+5
|
* tree-wide: fix typoYu Watanabe2022-06-101-1/+1
|
* CODING_STYLE: say that inet_ntop() is a no noZbigniew Jędrzejewski-Szmek2022-06-061-0/+5
|
* docs: document how we usually define enumsLennart Poettering2022-03-141-0/+40
|
* docs: document we use C11 with GNU extensions nowLennart Poettering2022-03-141-1/+15
| | | | Follow-up for: #22711
* Update CODING_STYLE.mdbearhoney2022-02-071-1/+1
| | | Fixed typo.
* docs: fix typos and improve languageErik Sjölund2022-01-261-1/+1
| | | | | Fix typos and improve the language by adding a few commas and a missing word.
* docs: mention RET_NERRNO() in CODING_STYLE.mdLennart Poettering2021-11-161-0/+19
|
* Change gendered terms to be gender-neutral (#21325)Emily Gonyer2021-11-121-1/+1
| | | Some typos are also fixed.
* CODING_STYLE: allow joined variable declarations and function callsZbigniew Jędrzejewski-Szmek2021-11-031-9/+18
| | | | | | | | | … 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.
* doc: document that alloca_safe() and friends are the APIs to useLennart Poettering2021-10-141-11/+19
|
* docs: add spdx tags to all .md filesZbigniew Jędrzejewski-Szmek2021-09-271-0/+1
| | | | | | 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.
* docs: add coding style exampleAnders Wenhaug2021-06-241-0/+8
| | | | Add example of how to structure else-blocks following a multiline block.
* docs: update coding style a bitZbigniew Jędrzejewski-Szmek2021-06-111-13/+20
| | | | | | | | | 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.
* docs/CODING_STYLE: fix some typosŠtěpán Němec2021-06-101-4/+4
|
* docs: add ARCHITECTURE.md with code mapLuca Boccassi2021-06-031-25/+0
| | | | | Initial and coarse version of a code map, useful for people getting started and looking at the repository for the first time.
* docs: more markupZbigniew Jędrzejewski-Szmek2021-03-111-5/+5
|
* docs: document not to use FILENAME_MAX in our codebaseLennart Poettering2021-03-081-0/+6
| | | | It's a weird thing. Let's explain why.
* docs: update coding style for `return (void) func(...)`Anita Zhang2020-10-271-0/+8
| | | | | Seems that people think it's useful for brevity so make it explicit in the CODING_STYLE.
* docs: some coding style updatesLennart Poettering2020-10-191-8/+33
| | | | | | | | | | 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.
* coding style: document how to break a function declarationLuca Boccassi2020-08-201-0/+11
|
* docs: spelling fixesJoerg Behrmann2020-08-041-2/+2
|
* fix typoTomer Shechner2020-07-071-1/+1
| | | | | I was thoroughly reading your nice coding style page and found out that you guys missed an 's'. 😁
* tree-wide: use "hostname" spelling everywhereZbigniew Jędrzejewski-Szmek2020-04-211-1/+1
| | | | | | | | 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.
* docs: make sure there's only one # markdown header in each fileLennart Poettering2019-12-131-1/+1
| | | | | | | @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.
* docs: make it prettyTobias Bernard2019-12-111-0/+1
| | | | | | | Add custom Jekyll theme, logo, webfont and .gitignore FIXME: the markdown files have some H1 headers which need to be replaced with H2
* docs: place all our markdown docs in rough categoriesLennart Poettering2019-12-111-0/+1
|