Skip to content

Commit 48f509a

Browse files
authored
[Msc Bug & Documentation Fixes]: Fixed up Code Example File and Updated README (#78)
* Fixed no trailing line in bad.py and updated README with better instructions and links to PyLint. * More formatting fixes, * And more formatting fixes,
1 parent 1bb83ed commit 48f509a

File tree

2 files changed

+27
-7
lines changed

2 files changed

+27
-7
lines changed

README.md

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,42 @@
33
This is Exercism's automated analyzer for the Python track exercises.
44
It is based on and uses [PyLint][pylint-github].
55

6-
It is run from a docker container using `./bin/run-in-docker.sh $EXERCISM $PATH_TO_FILES $PATH_FOR_OUTPUT` and will read the source code from `$PATH_TO_FILES` and write a text file with an analysis to `$PATH_FOR_OUTPUT`.
6+
It is run from a docker container using `./bin/run-in-docker.sh <exercise-slug> <path/to/solution/files/> <path/for/output/file/>`.
7+
It will read the source code from `<path/to/solution/files/>` and write a `.json` file with an analysis to `<path/for/output/file/>`.
8+
Please note `<path/to/solution/files/>` & `<path/for/output/file/>` need to be **_relative_** to the location of this repo in your environment.
79

8-
For example:
10+
For example, from the `python-analyzer/` (project root) directory:
911

1012
```bash
1113
./bin/run-in-docker.sh two_fer ~/solution-238382y7sds7fsadfasj23j/ ~/solution-238382y7sds7fsadfasj23j/output/
1214
```
1315

14-
Unit tests also require [docker][docker] and can be run locally or from within GitHub via [codespaces][codespaces]:
16+
Or if you also have the Python content repo cloned alongside this repo and have a solution saved in the stub file.
17+
From the `python-analyzer/` (project root) directory you can run:
1518

1619
```bash
17-
18-
#run from the python-analyzer (project root) directory.
19-
./bin/run-tests-in-docker.sh
20+
./bin/run-in-docker.sh two_fer ../python/exercises/practice/two-fer/ ../python/exercises/practice/two-fer/
2021
```
2122

23+
24+
## Running the Tests for the Analyzer
25+
26+
Unit tests require [docker][docker] and can be run locally or from within GitHub via [codespaces][codespaces]:
27+
28+
1. Build the analyzer image from the Dockerfile
29+
2. Open a terminal in the root of your copy/local copy of this project.
30+
3. From the `python-analyzer/` (project root) directory run:
31+
```bash
32+
./bin/run-tests-in-docker.sh
33+
```
34+
35+
36+
> [!NOTE]
37+
> The PyLint portion of the Analyzer will respect the `# pylint: disable=<rule_id>`, `# pylint: disable-next=<rule_id>`, and `# pylint: disable=all` directives from within code files, but it is recommended that you use them sparingly.
38+
>
39+
> For more details, see [PyLint message control](https://pylint.pycqa.org/en/latest/user_guide/messages/message_control.html#block-disables).
40+
41+
2242
[pylint-github]: https://github.com/pylint-dev/pylint
2343
[docker]: https://www.docker.com/
2444
[codespaces]: https://github.com/features/codespaces

lib/common/pylint_data/messages/disallowed-name/bad.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ def foo(): # [disallowed-name]
33

44
x = 15 # [disallowed-name]
55
y = 12 # [disallowed-name]
6-
result = x + y
6+
result = x + y

0 commit comments

Comments
 (0)