1

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?

2
  • 2
    IIRC the cloc function was introduced with Odoo 12 or 13 and was never backported. To get a reasonably good value try to isolate your custom modules in a folder and use the typical cloc tools for your OS like cloc which can be used with many OS. Commented Mar 16, 2023 at 16:49
  • @CZoellner, I also tried with Odoo13, but no luck. Commented Nov 23, 2023 at 9:57

1 Answer 1

0

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.