Browse Source

Adds linter support

pull/2/head
Your Name 4 years ago
parent
commit
9d021dac57
  1. 15
      makefile-installation.md

15
makefile-installation.md

@ -23,7 +23,7 @@ So if you do not want to use the version 12.0 as Lokavaluto does, change it in t
For Lokavaluto's addons, you can chose the branch in the Makefile after the comment ```Change Addons' version here```. If you wan to change the branch after the installation, you can rerun the installation or switch branch in the git folder using ```git checkout branch_name``` For Lokavaluto's addons, you can chose the branch in the Makefile after the comment ```Change Addons' version here```. If you wan to change the branch after the installation, you can rerun the installation or switch branch in the git folder using ```git checkout branch_name```
```Makefile ```Makefile
.PHONY: odoo python3 pip3 postgre general-dependencies dependencies rtlcss addons run npm aptpost runodoo runfirefox initodoo
.PHONY: odoo python3 pip3 postgre general-dependencies dependencies rtlcss addons run npm aptpost runodoo runfirefox initodoo lintinstall
SHELL := /bin/bash SHELL := /bin/bash
@ -55,7 +55,7 @@ aptpost:
# make install # make install
install: odoo postgre dependencies addons initodoo
install: odoo postgre dependencies addons initodoo lintinstall
@echo -e "Installation : ok \n" @echo -e "Installation : ok \n"
.ONESHELL: .ONESHELL:
@ -93,6 +93,9 @@ initodoo:
cd ./odoo cd ./odoo
python3 odoo-bin --addons-path=addons,../lokavaluto-addons -i base,l10n_fr -d $$USER --stop-after-init python3 odoo-bin --addons-path=addons,../lokavaluto-addons -i base,l10n_fr -d $$USER --stop-after-init
lintinstall:
pip3 install pylint-odoo
# make run # make run
.ONESHELL: .ONESHELL:
@ -108,6 +111,10 @@ runodoo:
runfirefox: runfirefox:
firefox http://localhost:8069?debug= & firefox http://localhost:8069?debug= &
# make lint
lint:
pylint --load-plugins=pylint_odoo -d all -e odoolint lokavaluto-addons/*
``` ```
### Installation ### Installation
@ -155,3 +162,7 @@ Install it by clicking on the ```Install Button```
Wait for the module to install and check the result. Wait for the module to install and check the result.
![result](images/result.png) ![result](images/result.png)
## Lint
Use the official Odoo linter: [https://github.com/OCA/pylint-odoo](https://github.com/OCA/pylint-odoo)
```make lint```
Loading…
Cancel
Save