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: CONTRIBUTING.md
+10-19Lines changed: 10 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -34,29 +34,20 @@ on WSL with Ubuntu, the command seems to be:
34
34
35
35
astyle --options=.astylerc src/*.cpp
36
36
37
-
#### Linting
37
+
Astyle can also be used within VSCode as an extension. Install the "Astyle" extension (author: Chieh Yu). Then go to settings (the "Manage" wheel on the bottom left, then click on "settings"). Under "Extensions", click on "Astyle Configuration". Within that, you can set the location of the astylerc file. Click on "Edit in settings.json". Modify the file so it has the following line:
For *C++* code make sure to use a static code checker like
40
-
[cpplint](https://github.com/cpplint/cpplint) to check the code for
41
-
any style issues before submitting. For *Python*,
42
-
[flake8](https://flake8.pycqa.org/en/latest/) is a good option. Both
43
-
of these may by installed using pip.
44
+
This should then allow you to format the code using the defaults that we have set in the astyle file. This can be done with (Ctrl-Shift-I for Linux, Alt-Shift-F for Windows) and upon saving the file - this reformats the whole file to put it into the astyle format.
44
45
45
-
To install `cpplint`
46
+
#### Linting
46
47
47
-
```sh
48
-
# depending on your system one of these lines applies
49
-
pip install --user cpplint
50
-
pip install cpplint
51
-
python3 -m pip cpplint
52
-
python3 -m pip --user cpplint
53
-
```
48
+
For *Python*,
49
+
[flake8](https://flake8.pycqa.org/en/latest/) is a good option. This may by installed using pip.
54
50
55
-
Using a linter in an editor is a good supplement, but not a replacement for the
56
-
static linters. The linter in the 'atom' editor requires that you install the
57
-
`linter` and `gcc-linter` packages. Atom also has additional packages
58
-
`whitespaces` and `tabs-to-spaces` to automatically remove whitespaces at the
0 commit comments