[IMP] developer/howtos: encourage linters more

There have been complaints of newbies not setting up their linters
therefore let's emphasize their use/setup more in the tutorial and hope
for the best.

Part-of: odoo/documentation#1146
This commit is contained in:
Tiffany Chang (tic) 2021-09-14 14:14:56 +00:00 committed by Antoine Vandevenne (anv)
parent 7d9e8af153
commit c1b8e7f7a1
2 changed files with 15 additions and 3 deletions

View File

@ -337,6 +337,18 @@ For Python, we use PEP8 with these options ignored:
For JavaScript, we use ESLint and you can find a `configuration file example here`_.
If you do not know how to set up a linter:
- `Here is an explanation of how to set up a Python linter in VSCode <https://code.visualstudio.com/docs/python/linting>`_. There are multiple
linter options you are free to choose from, but `Flake8 <https://pypi.org/project/flake8/>`_ is a popular choice.
- To setup ESLint in VSCode, you must download the `ESLint extension`_ and follow its instructions
for installing ESLint. Don't forget to create and set up the `.eslintrc` file to follow the
configuration file mentioned above.
- Another useful VSCode plugin is `Trailing Spaces`_ to quickly notice trailing spaces while
you're working.
.. _Trailing Spaces: https://marketplace.visualstudio.com/items?itemName=shardulm94.trailing-spaces
.. _ESLint extension: https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
.. _configuration file example here: https://github.com/odoo/odoo/wiki/Javascript-coding-guidelines#use-a-linter
.. _VSCode: https://code.visualstudio.com/
.. _VSCodium: https://vscodium.com/

View File

@ -18,9 +18,9 @@ to improve the quality of the Odoo Apps code.
.. exercise:: Polish your code.
Refactor your code to respect the coding guidelines. Don't forget to respect the module
structure, the variable names, the method name convention, the model attribute order and the
xml ids.
Refactor your code to respect the coding guidelines. Don't forget to run your linter and
respect the module structure, the variable names, the method name convention, the model
attribute order and the xml ids.
Your first Pull Request (PR)
============================