]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
CodingStyle: add python and javascript/typescript 20186/head
authorJoao Eduardo Luis <joao@suse.de>
Tue, 30 Jan 2018 15:19:53 +0000 (15:19 +0000)
committerJoao Eduardo Luis <joao@suse.de>
Wed, 11 Apr 2018 13:45:36 +0000 (14:45 +0100)
As we are rapidly expanding our code base beyond C++ and C, it is a good
idea to enforce coding styles for other languages.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
CodingStyle

index 05c63b6a4a4b68efb74357318edcdc9b79186480..d3d21e1d553f14456b9abb939ab1d552ab0a419c 100644 (file)
@@ -129,3 +129,27 @@ type conversions.
 * Other C++ Features > Avoid Default Arguments:
 
     They obscure the interface.
+
+
+Python code
+-----------
+
+For new python code, PEP-8 should be observed:
+
+    https://www.python.org/dev/peps/pep-0008/
+
+Existing code can be refactored to adhere to PEP-8, and cleanups are welcome.
+
+
+JavaScript / TypeScript
+-----------------------
+
+For Angular code, we follow the official Angular style guide:
+
+    https://angular.io/guide/styleguide
+
+To check whether your code is conformant with the style guide, we suggest
+using TSLint with Codelyzer:
+
+    https://www.npmjs.com/package/codelyzer
+