Skip to content

Commit 13d4f47

Browse files
author
Matthias Koeppe
committed
Add whitespace policy
1 parent 3443b24 commit 13d4f47

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Diff for: src/doc/en/developer/coding_basics.rst

+20
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,26 @@ all Python/Cython code that is included with Sage should adhere to the
2727
style conventions discussed in this chapter.
2828

2929

30+
.. _section-coding-general:
31+
32+
General Code Style
33+
==================
34+
35+
Use spaces instead of tabs for indentation. The only exception is for
36+
makefiles, in which tabs have a syntactic meaning different from
37+
spaces.
38+
39+
Do not add trailing whitespace.
40+
41+
Sage provides editor configuration for Emacs, using the file
42+
``.dir-locals.el``, to use spaces instead of tabs. Regarding trailing
43+
whitespace, see https://www.emacswiki.org/emacs/DeletingWhitespace
44+
for various solutions.
45+
46+
If you use another editor, we recommend to configure it so you do not
47+
add tabs to files.
48+
49+
3050
.. _section-coding-python:
3151

3252
Python Code Style

0 commit comments

Comments
 (0)