Skip to content

Commit 711ee5c

Browse files
committed
Updated CONTRIBUTING to include pre-commit
1 parent cdec6d1 commit 711ee5c

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

CONTRIBUTING.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,26 +38,36 @@ To verify that your cloning of the GitHub repository work as expected open a ter
3838
```sh
3939
pytest -v
4040
```
41+
4142
This will run the entire unit test suite. You can also run this to verify that you haven't broken anything in the code.
4243

4344
👉 **Tip!** You can run individual tests by selecting the path to the Python file and the method
45+
4446
```sh
4547
pytest test/test_interface.py::test_version_update_pypi
4648
```
4749

4850
### Developing & Debugging 🐞️
4951

52+
❗️ Before you start developing, open a terminal inside `fortls` and run:
53+
54+
```sh
55+
pre-commit install
56+
```
57+
58+
This will ensure that all you commits meet the formatting standards of the project.
59+
60+
----
61+
5062
You can now start writing code! Your local `fortls` version will be updated with every code change you make, so you can use your normal code editor to checkout the `fortls` features that you have implemented.
5163
It is however considerably easier to create compact unittests to check if your changes have worked.
5264

5365
A `fortls` test normally involves writing a Python function which sends a JSONRPC request to the server and then test checks for the correct server response.
5466
Often times small bits of Fortran source code also have to be submited to be used by the test.
5567
You can find varisous test examples in the `tests` directory.
5668

57-
5869
👉 **Tip!** You can attach a debugger to the main `fortls` source code during unittesting which should allow you to pause, break, step into, etc. while testing, thus making it easier to find mistakes.
5970

60-
6171
### Merging
6272

6373
To merge your changes to the main `fortls` repository push your branch on GitHub and open a [Pull Request](https://github.com/gnikit/fortls/pulls). Ping `@gnikit` to review your PR.

0 commit comments

Comments
 (0)