Questions tagged [cloc]

cloc (Count Lines of Code) counts lines of code, blank lines, and comment lines in source code in many different programming languages.

cloc (Count Lines of Code) is an open source Perl program that counts lines of code, blank lines, and comment lines in source code in many different programming languages. It can also determine differences in lines of code, blank lines, and comment lines between two files or even between two directory trees.

cloc runs on a variety of operating systems, including Linux, FreeBSD, Windows and OSX.

Documentation: https://github.com/AlDanial/cloc

Cloc is available for installation through homebrew on macs: brew install cloc

50 questions
-1
votes
2 answers

How can I count words or tokens in my code?

There are all sorts of tools for counting lines of code in a source file or directory tree (e.g. cloc). There are also tools for counting words in a plain text file (wc). How would I go about counting words or tokens in my code, though? Is this…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
-1
votes
1 answer

Is it possible to run a newer version of cloc (or any package) onto an older version of ubuntu?

I have to work with ubuntu 14.04, but I need to use cloc 1.92. The highest cloc version via package update for Ubuntu is 1.6. https://packages.ubuntu.com/search?keywords=cloc I did a wget…
user5943954
  • 49
  • 2
  • 6
-1
votes
1 answer

Using scc as code counter, how to ignore multiple adjacent subfolders and recursively other folders

I am trying to use code counter software scc https://nicedoc.io/boyter/scc#user-content-sloc-cloc-and-code-scc My folder is a typical Django project --| |-- core (has subfolder: migrations) |-- app1 (has subfolder: migrations) |-- app2 (has…
Kim Stacks
  • 10,202
  • 35
  • 151
  • 282
-1
votes
5 answers

count specific things within a code in c++

can anyone help me make this more generalised and more pro? #include #include #include #include using namespace std; int main() { // open text file for input: string file_name; cout << "please enter…
ace
  • 189
  • 1
  • 1
  • 9
-2
votes
1 answer

Cloc's --force-lang-def works on ubuntu but fails on windows

I have next file structure: --root folder --Gemfile.lock --Gemfile And next language definition: Gem filter remove_matches ^\s*# filename Gemfile.lock filename Gemfile 3rd_gen_scale 2.11 On ubunutu next command: cloc…
Guru Stron
  • 102,774
  • 10
  • 95
  • 132
1 2 3
4