From e6d9a9dac2bdc5f21eb13f9374a2f3e4e0daf8ff Mon Sep 17 00:00:00 2001 From: Thibault Francois Date: Mon, 7 Mar 2022 13:25:48 +0000 Subject: [PATCH] [IMP] CLI: adapt cloc doc to new behavior since https://github.com/odoo/odoo/pull/85854 cloc also count stylesheet file and frontend file in imported module closes odoo/documentation#1734 X-original-commit: d2de65a15a213539327419304cf63d3c58943e7c Signed-off-by: Antoine Vandevenne (anv) --- content/developer/misc/other/cmdline.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/content/developer/misc/other/cmdline.rst b/content/developer/misc/other/cmdline.rst index 8cce77dde..3567dbf0a 100644 --- a/content/developer/misc/other/cmdline.rst +++ b/content/developer/misc/other/cmdline.rst @@ -729,7 +729,7 @@ Cloc .. program:: odoo-bin cloc Odoo Cloc is a tool to count the number of relevant lines written in -Python, Javascript or XML. This can be used as a rough metric for pricing +Python, Javascript, CSS, SCSS, or XML. This can be used as a rough metric for pricing maintenance of extra modules. Command-line options @@ -807,14 +807,15 @@ With the :option:`--database` option Odoo Cloc counts the lines in each file of extra installed modules in a given database. In addition, it counts the Python lines of server actions and custom computed fields that have been directly created in the database or -imported. +imported. Finally, it counts the lines of code of Javascript, CSS, and SCSS files, +and of QWeb views from imported modules. Some files are excluded from the count by default: - The manifest (:file:`__manifest__.py` or :file:`__openerp__.py`) - The contents of the folder :file:`static/lib` - The tests defined in the folder :file:`tests` and :file:`static/tests` -- The migrations scripts defined in the folder :file:`migrations` +- The migrations scripts defined in the folder :file:`migrations` and `upgrades` - The XML files declared in the ``demo`` or ``demo_xml`` sections of the manifest For special cases, a list of files that should be ignored by Odoo Cloc can be defined @@ -826,6 +827,7 @@ per module. This is specified by the ``cloc_exclude`` entry of the manifest: "lib/common.py", # exclude a single file "data/*.xml", # exclude all XML files in a specific folder "example/**/*", # exclude all files in a folder hierarchy recursively + "**/*.scss", # exclude all scss file from the module ] | The pattern ``**/*`` can be used to ignore an entire module. This can be useful