-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https: //github.com/XAMPPRocky/tokei/issues/875 Close: #37954
- Loading branch information
1 parent
22f6123
commit 008cf4d
Showing
2 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
srcpkgs/tokei/patches/067fc4487ef2a8f53c29124b0aa3e9e793bfaadc.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Upstream: yes | ||
|
||
From 067fc4487ef2a8f53c29124b0aa3e9e793bfaadc Mon Sep 17 00:00:00 2001 | ||
From: Max Sharnoff <[email protected]> | ||
Date: Mon, 4 Apr 2022 12:06:32 +0100 | ||
Subject: [PATCH] Summarise language before adding to total (#903) | ||
|
||
--- | ||
src/language/languages.rs | 3 ++- | ||
1 file changed, 2 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/src/language/languages.rs b/src/language/languages.rs | ||
index 141cae28..2b0fc584 100644 | ||
--- a/src/language/languages.rs | ||
+++ b/src/language/languages.rs | ||
@@ -102,7 +102,8 @@ impl Languages { | ||
#[must_use] | ||
pub fn total(self: &Languages) -> Language { | ||
let mut total = Language::new(); | ||
- for (ty, language) in self { | ||
+ for (ty, l) in self { | ||
+ let language = l.summarise(); | ||
total.comments += language.comments; | ||
total.blanks += language.blanks; | ||
total.code += language.code; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
# Template file for 'tokei' | ||
pkgname=tokei | ||
version=12.1.2 | ||
revision=2 | ||
revision=3 | ||
build_style=cargo | ||
configure_args="--features all" | ||
short_desc="Count lines of code" | ||
maintainer="Jan Christian Grünhage <[email protected]>" | ||
license="Apache-2.0, MIT" | ||
homepage="https://github.com/XAMPPRocky/tokei" | ||
distfiles="https://github.com/XAMPPRocky/tokei/archive/v${version}.tar.gz" | ||
distfiles="https://github.com/XAMPPRocky/tokei/archive/v$version.tar.gz" | ||
checksum=81ef14ab8eaa70a68249a299f26f26eba22f342fb8e22fca463b08080f436e50 | ||
|
||
# on i686 LLVM has problems with compiling doctests | ||
|