Commit Graph

14 Commits

Author SHA1 Message Date
Lennart Poettering 971dfffab8 CODING_STYLE: add section about how to reference specific concepts 2019-04-12 16:28:35 +02:00
Lennart Poettering 8c9289e705 CODING_STYLE: split out bits about Formatting into its own section
(And, for now, add a section "Other" to separate the rest of the stuff)
2019-04-12 16:28:35 +02:00
Lennart Poettering 2d0dce2afe CODING_STYLE: add a section about functions not to use
Let's add sections to the document. First off, let's add one about
functions not to use.
2019-04-12 16:28:02 +02:00
Zbigniew Jędrzejewski-Szmek 3b69b18fbf CODING_STYLE: adjust indentation rules, and add note about config loading 2019-04-12 08:37:41 +02:00
Chris Morin f36712b7c3 CODING_STYLE: fix grammar mistake 2019-01-17 12:37:40 +01:00
Filipe Brandenburger c3e270f4ee docs: add a "front matter" snippet to our markdown pages
It turns out Jekyll (the engine behind GitHub Pages) requires that pages
include a "Front Matter" snippet of YAML at the top for proper rendering.

Omitting it will still render the pages, but including it opens up new
possibilities, such as using a {% for %} loop to generate index.md instead of
requiring a separate script.

I'm hoping this will also fix the issue with some of the pages (notably
CODE_OF_CONDUCT.html) not being available under systemd.io

Tested locally by rendering the website with Jekyll. Before this change, the
*.md files were kept unchanged (so not sure how that even works?!), after this
commit, proper *.html files were generated from it.
2019-01-02 14:16:34 -08:00
Zbigniew Jędrzejewski-Szmek c90ee83400 coding style: reduce text width to 109 characters
Patches are shown on github with a fixed width (no matter how wide the window
is). When line numbers are high (we have some files with 5 digit line numbers),
the diff does not fit, and horizontal scrolling must be used when viewing the
patch. This is super annoying. Let's reduce the width a bit. I think 109 is
still very wide, but at least the github issue should be alleviated.
2018-12-08 10:14:28 +01:00
Lennart Poettering c1d3483d47 docs: uppercase the title of our Markdown docs 2018-11-29 15:29:47 +01:00
nikolas b24546706e Fix a few docs typos (#10907)
Found with [codespell](https://github.com/codespell-project/codespell)
2018-11-24 04:28:39 +09:00
Zbigniew Jędrzejewski-Szmek cd7bcfa8fe CODING_STYLE: describe log & return operations 2018-11-22 10:54:38 +01:00
Zbigniew Jędrzejewski-Szmek a98dc693e4 CODING_STYLE: fix rules for STRLEN and recommend strjoina more strongly
Again, this mostly matches what is happening in the codebase already.
2018-11-20 07:27:37 +01:00
Zbigniew Jędrzejewski-Szmek a527f70a41 CODING_STYLE: clarify the rules for the src/basic & src/shared split
The rule is changed from "put in basic unless there's a reason not to" to "put
in shared unless there's a reason not to", to match the change done in previous
commit. This minimizes libbasic. See previous commit for the reasons why this
is useful.

Previously, the guideline was based on whether the files in question use
"publicly exported APIs". This distinction is not particularly relevant. Let's
consider all other programs we compile: most of them use "publicly exported
APIs", usually linking to libsystemd-shared.so for the actual code. But those
programs are not forced to be in src/basic, and the distinction whether they
happen to use 'sd-*.h' or not is of no importance. The same is true for files
in src/shared/. If we didn't have publicly exported shared objects, we'd put
everything in libsystemd-shared.so. So let's only move things out of it that we
need to. Previous guideline was not "wrong", in the sense that it created *a*
split that was functional (no code in src/shared was required in the publicly
exported shared objects), but it put more files in basic/ then necessary.

Not much changes in practice, because (as previous commit shows), moving files
between libbasic.a and libsystemd-shared.so mostly just changes compilation
order.

The list of components which cannot use libsystemd-shared.so is adjusted.
2018-11-20 07:27:37 +01:00
Felix Yan 3cc306e667 docs: Fix a typo in CODING_STYLE.md (#10630) 2018-11-03 17:38:41 +09:00
Faheel Ahmad 82143987b3 docs: Convert CODING_STYLE to Markdown
Also fix minor grammatical errors
2018-10-30 15:58:44 +05:30