With pylint being run in the CI, passing it is required now.
- name: Install test prerequsites
run: |
- sudo apt-get install -y -qq php-codesniffer
+ sudo apt-get install -y -qq php-codesniffer pylint
sudo pip3 install behave
- name: PHP linting
run: phpcs --report-width=120 .
+ - name: Python linting
+ run: |
+ pylint nominatim
+
- name: PHP unit tests
run: phpunit ./
working-directory: test/php
add_test(NAME phpcs
COMMAND phpcs --report-width=120 --colors lib website utils
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
+
+ add_test(NAME pylint
+ COMMAND pylint3 nominatim
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
endif()
#-----------------------------------------------------------------------------
* for PHP variables use CamelCase with a prefixing letter indicating the type
(i - integer, f - float, a - array, s - string, o - object)
-The coding style is enforced with PHPCS and can be tested with:
+The coding style is enforced with PHPCS and pylint. It can be tested with:
```
- phpcs --report-width=120 --colors .
+phpcs --report-width=120 --colors .
+pylint3 nominatim
```
## Testing
* [behave test framework](https://behave.readthedocs.io) >= 1.2.5
* [phpunit](https://phpunit.de) >= 7.3
* [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer)
+* [Pylint](https://pylint.org/)
The documentation is built with mkdocs:
```sh
sudo apt install php-cgi phpunit php-codesniffer \
- python3-pip python3-setuptools python3-dev
+ python3-pip python3-setuptools python3-dev pylint3
pip3 install --user behave mkdocs
```