mirror of
https://github.com/QubesOS/qubes-doc.git
synced 2025-01-14 08:49:45 -05:00
CodingStyle changed
General guidlines: some more stuff
This commit is contained in:
parent
80336f0907
commit
27766aadad
@ -68,6 +68,9 @@ File naming conventions
|
||||
General programming style guidelines
|
||||
------------------------------------
|
||||
|
||||
- Do not try to impress wit your coding kung-fu, do not use tricks to save 2 lines of code, always prefer readability over trickiness!
|
||||
- Make sure your code compiles and builds without warnings.
|
||||
- Always first first about interfaces (e.g. function arguments, or class methods) and data structures before you start writing the actual code.
|
||||
- Use comments to explain non-trivial code fragments, or expected behavior of more complex functions, if it is not clear from their name.
|
||||
- Do **not** use comments for code fragments where it is immediately clear what the code does. E.g. avoid constructs like this:
|
||||
|
||||
@ -97,7 +100,7 @@ General programming style guidelines
|
||||
|
||||
Not sure how to do similar thing in Python... Anyone?
|
||||
|
||||
But generally, there is little excuse to keep old, unused code fragments in the code. One should really use the functionality provided by the source code management system, such as git, instead. E.g. create a special branch for storing the old, unused code -- this way you will always be able to merge this code into upstream in the future.
|
||||
> But generally, there is little excuse to keep old, unused code fragments in the code. One should really use the functionality provided by the source code management system, such as git, instead. E.g. create a special branch for storing the old, unused code -- this way you will always be able to merge this code into upstream in the future.
|
||||
|
||||
Source Code management (Git) guidelines
|
||||
---------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user