Fri, 03 Jun 2022 20:06:08 +0200
Added tag v1.4 for changeset be2084398c37
1 cline
2 _________________________________________
3 Copyright (C) 2018 Mike Becker
5 Contents:
6 1) About ................................................................... 12
7 2) Build instructions ...................................................... 24
8 3) Usage example ........................................................... 39
9 4) License ................................................................. 48
12 1) About ______________________________________________________________________
14 cline is a command line tool that counts code lines in your project folder. It
15 is designed to recursively find any source file matching specific rules and
16 count the line breaks within that file. You may specify file suffixes to include
17 or exclude as well as regular expressions for code lines that shall be excluded
18 (e.g. to exclude comments). By default a heuristic algorithm skips binary files.
19 You may configure the restrictiveness of this algorithm with command line
20 options.
22 Type cline --help for further information.
24 2) Build instructions _________________________________________________________
26 If you checked out the sources from version control, you firstly need to run
27 ./prebuild.sh
28 This requires autotools installed on your system and creates a build dir.
30 In release version you can skip the first task and just run
31 ./configure && make
33 After building you get a system wide install with
34 sudo make install
36 To enable a debug build, configure with
37 ./configure --enable-debug
39 3) Example usage ______________________________________________________________
41 You can test cline right away with the cline project files. Just type:
42 cline -rms .c,.h --exclude-cstyle-comments
44 This will find any .c or .h file recursively in the cline project folder and
45 won't display other files (-m option). It will also skip comments when counting
46 lines.
48 4) License ____________________________________________________________________
50 Copyright 2018 Mike Becker. All rights reserved.
52 Redistribution and use in source and binary forms, with or without
53 modification, are permitted provided that the following conditions are met:
55 1. Redistributions of source code must retain the above copyright
56 notice, this list of conditions and the following disclaimer.
58 2. Redistributions in binary form must reproduce the above copyright
59 notice, this list of conditions and the following disclaimer in the
60 documentation and/or other materials provided with the distribution.
62 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
63 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
64 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
65 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
66 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
67 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
68 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
69 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
70 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
71 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.