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