Package: sloccount Version: 2.26-5.2 Severity: wishlist Tags: patch Dear Maintainer,
Here is a patch to add support for counting SLOC in Go files. it is inspired from the patch to add javascript support, as Go has a syntax very similar to C. -- System Information: Debian Release: 12.6 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'oldstable-security'), (500, 'stable'), (500, 'oldstable'), (1, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 6.1.0-21-amd64 (SMP w/32 CPU threads; PREEMPT) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_GB.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages sloccount depends on: ii libc6 2.36-9+deb12u7 ii perl 5.36.0-7+deb12u1 sloccount recommends no packages. Versions of packages sloccount suggests: pn doc-base <none> -- no debconf information
Description: add go support Author: Nicolas Peugnet <nico...@club1.fr> --- sloccount-2.26.orig/break_filelist +++ sloccount-2.26/break_filelist @@ -174,6 +174,7 @@ $noisy = 0; # Set to 1 if you # freeze is extremely rare and even more rare in source code directories. "f77" => "fortran", "F77" => "fortran", "f90" => "f90", "F90" => "f90", + "go" => "go", "cob" => "cobol", "cbl" => "cobol", "COB" => "cobol", "CBL" => "cobol", # Yes, people do create wokka.CBL files "p" => "pascal", "pas" => "pascal", "pp" => "pascal", "dpr" => "pascal", --- /dev/null +++ sloccount-2.26/go_count @@ -0,0 +1,27 @@ +#!/bin/sh +# +# This is part of SLOCCount, a toolsuite that counts +# source lines of code (SLOC). +# Copyright (C) 2001-2004 David A. Wheeler. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# To contact David A. Wheeler, see his website at: +# http://www.dwheeler.com. +# +# + +c_count $@ + --- sloccount-2.26.orig/makefile +++ sloccount-2.26/makefile @@ -107,6 +107,7 @@ EXECUTABLES= \ generic_count \ get_sloc \ get_sloc_details \ + go_count \ haskell_count \ javascript_count \ lex_count \