You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/coding-conventions.md
+37-22Lines changed: 37 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,44 @@
1
-
# Coding Conventionsand Linters
1
+
# Coding Conventions, Linters and Definitions
2
2
3
3
Some conventions on coding style and tools for the Javascript and Python in this repository.
4
4
5
5
----
6
-
## Javascript
7
6
8
-
In general the `qooxdoo` naming convention/style is followed. The [Access](http://qooxdoo.org/docs/#/core/oo_feature_summary?id=access) paragraph is the most notable. It is recommended to read the entire document.
- An introduction: https://tom-collings.medium.com/controller-service-repository-16e29a4684e5
13
+
- Example of adopted convention: https://github.com/ITISFoundation/osparc-simcore/pull/4389
9
14
10
-
Have a look at `ESLint`'s configuration files [.eslintrc.json](.eslintrc.json) and [.eslintignore](.eslintignore).
11
15
12
16
17
+
----
18
+
## General Coding Conventions
19
+
20
+
<!-- Add below this line coding agreed coding conventions and give them a number !-->
21
+
22
+
### CC1: Can I use ``TODO:``, ``FIXME:``?
23
+
24
+
We should avoid merging PRs with ``TODO:`` and ``FIXME:`` into master. One of our bots detects those and flag them as code-smells. If we still want to keep this idea/fix noted in the code, those can be rewritten as ``NOTE:`` and should be extended with a link to a github issue with more details. For a context, see [discussion here](https://github.com/ITISFoundation/osparc-simcore/pull/3380#discussion_r979893502).
25
+
26
+
27
+
### CC2: No commented code
28
+
29
+
Avoid commented code, but if you *really* want to keep it then add an explanatory `NOTE:`
30
+
```python
31
+
import os
32
+
# import bar
33
+
# x = "not very useful"
34
+
35
+
#NOTE: I need to keep this becase ...
36
+
# import foo
37
+
# x = "ok"
38
+
```
39
+
40
+
### CC3 ...
41
+
13
42
----
14
43
## Python
15
44
@@ -62,28 +91,14 @@ In short we use the following naming convention ( roughly [PEP8](https://peps.p
62
91
- Recommended inside of a ``scripts`` folder
63
92
64
93
65
-
----
66
-
## General
67
-
68
-
<!-- Add below this line coding agreed coding conventions and give them a number !-->
69
-
70
-
### CC1: Can I use ``TODO:``, ``FIXME:``?
71
-
72
-
We should avoid merging PRs with ``TODO:`` and ``FIXME:`` into master. One of our bots detects those and flag them as code-smells. If we still want to keep this idea/fix noted in the code, those can be rewritten as ``NOTE:`` and should be extended with a link to a github issue with more details. For a context, see [discussion here](https://github.com/ITISFoundation/osparc-simcore/pull/3380#discussion_r979893502).
73
94
74
95
75
-
### CC2: No commented code
96
+
----
97
+
## Javascript
76
98
77
-
Avoid commented code, but if you *really* want to keep it then add an explanatory `NOTE:`
78
-
```python
79
-
import os
80
-
# import bar
81
-
# x = "not very useful"
99
+
In general the `qooxdoo` naming convention/style is followed. The [Access](http://qooxdoo.org/docs/#/core/oo_feature_summary?id=access) paragraph is the most notable. It is recommended to read the entire document.
82
100
83
-
#NOTE: I need to keep this becase ...
84
-
# import foo
85
-
# x = "ok"
86
-
```
101
+
Have a look at `ESLint`'s configuration files [.eslintrc.json](.eslintrc.json) and [.eslintignore](.eslintignore).
0 commit comments