Skip to content

Commit 4091980

Browse files
authored
Merge pull request #524 from countable-web/linting-documentation
Move Linting section to Contributing
2 parents c3dae77 + d484733 commit 4091980

1 file changed

Lines changed: 26 additions & 25 deletions

File tree

README.md

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,19 @@ _The API writes objects "atomically", meaning only one database row can be edite
165165

166166
## Contributing
167167

168-
To work on a feature locally, configure your editor to use the `black` code style for Python, and the `prettier` style for Javascript, HTML and CSS. Use the local `.pretterrc` file. If you ever have coding style problems, you can fix them by running:
168+
To work on a feature locally, configure your editor to use the `black` code style for Python, and the `prettier` style for Javascript, HTML and CSS. Use the local `.pretterrc` file.
169169

170-
```
170+
### Linting
171171

172-
docker-compose exec frontend yarn lint --fix
172+
#### Frontend
173+
174+
If you ever have coding style problems, you can fix them by running:
173175

176+
```
177+
docker-compose exec frontend yarn lint --fix
174178
```
175179

176-
Vscode settings for automatic linting
180+
These are the Vscode settings for automatic linting
177181
```
178182
"eslint.validate": [
179183
{
@@ -195,6 +199,24 @@ Vscode settings for automatic linting
195199
"editor.fontSize": 16,
196200
"terminal.integrated.scrollback": 50000
197201
```
202+
#### Backend
203+
204+
We use pylint to detect linting errors in Python. Disclaimer: pylint is only used to detect errors an does not automatically fix them. Linting fixes have to be manually applied by the developer.
205+
206+
Check linting for the entire backend project
207+
```
208+
docker-compose exec web sh pylint.sh
209+
```
210+
211+
Check linting for an entire folder
212+
```
213+
docker-compose exec web sh pylint.sh <folder_name>
214+
```
215+
216+
Check linting for a specific file
217+
```
218+
docker-compose exec web sh pylint.sh <folder_name>/<file_name>/
219+
```
198220

199221
### Example, add a new database field.
200222

@@ -308,27 +330,6 @@ Running a coverage test will create a `coverage.xml` file which indicates which
308330
309331
For more information about tests, run `docker-compose exec web python manage.py help test`
310332
311-
## Linting
312-
313-
### Python
314-
315-
We use pylint to detect linting errors in Python. Disclaimer: pylint is only used to detect errors an does not automatically fix them. Linting fixes have to be manually applied by the developer.
316-
317-
Check linting for the entire backend project
318-
```
319-
docker-compose exec web sh pylint.sh
320-
```
321-
322-
Check linting for an entire folder
323-
```
324-
docker-compose exec web sh pylint.sh <folder_name>
325-
```
326-
327-
Check linting for a specific file
328-
```
329-
docker-compose exec web sh pylint.sh <folder_name>/<file_name>/
330-
```
331-
332333
### Notifications
333334
334335
The system sends users notifications weekly, including:

0 commit comments

Comments
 (0)