Commit Graph

14 Commits

Author SHA1 Message Date
Stephanos Ioannidis 9b1a0e70bc editorconfig: Improve verbosity
This commit adds missing `indent_size` configurations for some file
types.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-04-28 08:55:39 -04:00
Stephanos Ioannidis 3a7cf87821 editorconfig: Add C++ indentation style
This commit adds the indentation style for the C++ source and header
files.

Note that the C++ indentation style has been configured to match that
of the C files because the C++ source files we currently have in the
Zephyr repository follow the style we enforce for the C files.

In the future, it may be preferable to follow the indentation style
recommended by one of the common C++ style guides, such as the Google
C++ Style Guide which recommends 2 spaces for indentation.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-04-28 08:55:39 -04:00
Stephanos Ioannidis ef9c4f76cc editorconfig: Add linker script indentation style
This commit adds the indentation style for the linker script files.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-04-28 08:55:39 -04:00
Stephanos Ioannidis 380bf3ad04 editorconfig: Add reStructuredText indentation style
This commit adds the reStructuredText indentation style.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-04-28 08:55:39 -04:00
Stephanos Ioannidis 5d8f1de3bf editorconfig: Update commit message max. line length to 75
This commit updates the maximum line length for the commit messages
from 72 to 75, in order to align with the checkpatch and gitlint
policies.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-04-28 08:55:39 -04:00
Stephanos Ioannidis 9c25009185 editorconfig: Update maximum line length to 100
This commit updates the maximum line length from 80 to 100 as per the
GitHub issue #30426 ("Enforce all checkpatch warnings and move to 100
characters per line").

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-04-28 08:55:39 -04:00
Henrik Brix Andersen 736fcbec59 editorconfig: indent Kconfig files with tabs
Configure editors for indenting Kconfig* files with tabs.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-07-08 21:30:38 -04:00
Henrik Brix Andersen 48f43b57f5 editorconfig: use 72 characters line width git commit messages
Configure editors for wrapping lines at 72 characters line width for Git
commit messages.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-06-22 14:51:56 -04:00
Mikkel Jakobsen 85e49433df editorconfig: add rules for device tree files
Rules follow linux coding standard, i.e using tab and tab size 8

Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@prevas.dk>
2020-04-27 08:11:52 -05:00
Mikkel Jakobsen 8bbca5aa5d editorconfig: add yaml file extension variant
This commit adds *.yaml files to the yaml editorconfig section.

Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@prevas.dk>
2020-03-25 16:16:01 -04:00
Stephanos Ioannidis 2c6c855e42 editorconfig: Add assembly code file spec
This commit adds the editorconfig spec for assembly code files (*.S).

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-03-18 12:27:04 -04:00
Christian Taedcke 169f4865e4 editorconfig: Set max_line_length to 80
This way editors like emacs can highlight lines that are too long.

Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
2020-02-27 12:57:23 +02:00
Ulf Magnusson 3a8db5549a editorconfig: Set insert_final_newline true
This is what checkpatch.pl expects, and GitHub's file viewer flags a
missing trailing newline too.

Note that this is different from a blank line at the end of the file. It
just says whether the last line must end in a newline.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-04-10 14:15:38 +02:00
Carlos Stuart 0088175450 editorconfig: basic EditorConfig configuration
EditorConfig (https://editorconfig.org) is a widely supported
configuration tool that helps to ensure better consistency amongst
developers by auto-configuring an editor to match the original/intended
style i.e. tab-width etc.

This configuration covers many of the common file formats used in
zephyr.

The configuration was derived by looking at existing files and
ascertaining what configuration they currently use.

This is the top-most EditorConfig file meaning this is the root of all
other EditorConfigs, however sub-directories can set their own up if
they wish to override this.

This has proven especially useful when viewing uncrustified C source
code where the tab-width should be 8 to get proper alignment but many
editors use a tab-width of 4.

Lots of editors support this natively and those that do not probably
have a plugin or extension.

Tested by opening and saving various files to ensure no changes
occurred.

Signed-off-by: Carlos Stuart <carlosstuart1970@gmail.com>
2019-02-07 08:15:23 -05:00