From 9d021dac57a212801bc3a7ec7c8914a14c697bc2 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 30 Jan 2021 22:33:59 +0100 Subject: [PATCH] Adds linter support --- makefile-installation.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/makefile-installation.md b/makefile-installation.md index de90f78..c5c0597 100644 --- a/makefile-installation.md +++ b/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``` ```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 @@ -55,7 +55,7 @@ aptpost: # make install -install: odoo postgre dependencies addons initodoo +install: odoo postgre dependencies addons initodoo lintinstall @echo -e "Installation : ok \n" .ONESHELL: @@ -93,6 +93,9 @@ initodoo: cd ./odoo python3 odoo-bin --addons-path=addons,../lokavaluto-addons -i base,l10n_fr -d $$USER --stop-after-init +lintinstall: + pip3 install pylint-odoo + # make run .ONESHELL: @@ -108,6 +111,10 @@ runodoo: runfirefox: firefox http://localhost:8069?debug= & + +# make lint +lint: + pylint --load-plugins=pylint_odoo -d all -e odoolint lokavaluto-addons/* ``` ### Installation @@ -155,3 +162,7 @@ Install it by clicking on the ```Install Button``` Wait for the module to install and check the result. ![result](images/result.png) + +## Lint +Use the official Odoo linter: [https://github.com/OCA/pylint-odoo](https://github.com/OCA/pylint-odoo) +```make lint``` \ No newline at end of file