https://github.com/zackteo/cloc
Cpp lines of code tool
https://github.com/zackteo/cloc
Last synced: 10 months ago
JSON representation
Cpp lines of code tool
- Host: GitHub
- URL: https://github.com/zackteo/cloc
- Owner: zackteo
- License: other
- Created: 2021-05-07T03:07:11.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-07T03:30:56.000Z (about 5 years ago)
- Last Synced: 2025-03-06T02:23:25.829Z (over 1 year ago)
- Language: Clojure
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# cloc
A Clojure program used to analyse C++ (and Ruby projects), outputting number of Files, Total lines of text, Lines of Code, Comments and Blanks.
Count all files with extension c, cpp, cc. Toggle to include header files
## Usage
Create an executable with
``` sh
lein bin
```
if that does not work you can run the commands below by replace `cloc` with `lein run`
``` sh
cloc --help
```
``` sh
cloc --lang cpp
```
``` sh
cloc --lang ruby
```
## Assumptions
For multi-line comments, similar to ruby where `=begin` and `=end` should strictly be the only thing on the line. We are not accounting for the case where there is code after the end of a multi-line comment region
```cpp
/*
questionable multi-line comment
*/ int x = 3;
```
## License
Copyright © 2021 zackteo
This program and the accompanying materials are made available under the
terms of the Eclipse Public License 2.0 which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the Eclipse
Public License, v. 2.0 are satisfied: GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or (at your
option) any later version, with the GNU Classpath Exception which is available
at https://www.gnu.org/software/classpath/license.html.