How to get count of line of codes in Odoo 11?

264 Views Asked by At

I am trying to get the total count of lines of codes in my custom modules. it tried the below command.

./odoo-bin cloc --conf=odoo11.conf -d odoo10

Here odoo.conf addons path to default addons and custom addons.

But I am getting the below error:

Unknow command 'cloc'

How to solve this?

1

There are 1 best solutions below

0
Paxmees On

The cloc tool is in the odoo starting from version 13.

You can use it or even version 16 to count your code. You cant install v11 modules to the newer Odoo base. So you have to use cloc tool by the path.

The -v is for verbose output. It lists all counted files.

./odoo-bin cloc -v -p /path/to_modules/module

It can count all the modules together as well.

./odoo-bin cloc -p /path/to_modules