Commit graph

277 commits

Author SHA1 Message Date
Embers-of-the-Fire f08c87a969
remove refs (#1006) 2024-05-02 18:00:50 +02:00
Clément Fournier 0f85cfe35e
Add lingua franca language (#993) 2024-05-02 17:58:45 +02:00
Beiu Alexandru Dumitru 5f755db185
fixed language names not showing when in Light mode (light background (#1048) 2024-01-09 09:14:08 +01:00
Erin Power ae77e19456 Update dependencies 2023-08-02 23:00:54 +02:00
Embers-of-the-Fire 5257078123
add --languages ouput formatter (#1007) 2023-06-08 12:24:20 +02:00
Embers-of-the-Fire 21be04cba1
Add Nuget Config, Bazel and EdgeQL Support, Fix Output Formatter (#999)
* add nuget configuration support

* fix test file

* add bazel language

* fix output format

* add languages to readme

* fix serialize

* add edgeql

* edit readme

* add test file

* fix edgedb
2023-05-24 16:38:26 +02:00
Utkarsh Gupta c4bd7ceaed
Use XDG conventions on macOS too (#989) 2023-04-26 18:43:44 +02:00
SteveLau 251283677d
fix issue944 (#945) 2022-09-11 16:25:17 +02:00
Adam Tokarski 61dd7df6fc
[issue_934] from_shebang tera function uses starts_with (#935)
This allows to cover versioning of language executables, like it can happen for Python. Currently there is python, python2 and python3. Could just add python2.7, but we should add new env item for each new Python version, like python3.4, python3.10, etc which soon may be somewhat cumbersone.
2022-08-15 09:07:59 +02:00
sceneq 3c486247fb
Fix backslash bug (#915) (#916)
* Fix backslash bug (#915)

* fix

* Update test

Co-authored-by: scenq <me>
2022-08-14 18:35:25 +02:00
Basti Ortiz 955d258692
Perf: prefer non-allocating, case-insensitive string comparisons (#905) 2022-08-14 17:35:13 +02:00
Jay Lau b3f3686fc6
input will default to the current directory (#918) 2022-08-14 17:33:41 +02:00
Max Sharnoff 067fc4487e
Summarise language before adding to total (#903) 2022-04-04 13:06:32 +02:00
5HT2 ab7bb7500b
impr: Add -R option to modify row format (#896) 2022-03-22 08:03:56 +01:00
Brad Svercl 177d32e024
Clap v3 + clippy fixes (#872)
* feat: clap migration complete

* clippy fixes

* set minimum values for input

* fix(cli): allow multiple occurences on verbose

* bump
2022-02-01 15:30:42 +01:00
LovecraftianHorror 0152709e9a
Fix panic trim_first_and_last_line_of_whitespace on bad slice indices (#865)
* Fix panic from slice end being before slice start

* Fix fallback value for end index

Co-authored-by: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com>
2021-12-20 09:07:01 +01:00
LovecraftianHorror 4a3fd427b8
Fix input output mismatch (#861)
* Fix input output mismatch

* Reduce output format breakage
2021-12-19 23:07:06 +01:00
LovecraftianHorror 452e97b921
Add blobs to the totals for jupyter (#868) 2021-12-19 23:05:19 +01:00
LovecraftianHorror cf1c64faa2
Remove deprecated aho corasick .byte_classes(false) toggle (#867) 2021-12-19 16:08:39 +01:00
Adam Lesperance 1097ecaf77
Option to reverse sort entries (#802) 2021-08-04 15:28:33 +02:00
Adam Lesperance ab8dd1bf85
Fix clippy warnings (#801) 2021-08-04 15:27:17 +02:00
QuarticCat c1397f3446
Beautify help messages (#791)
* Enable wrap_help feature of clap

* Enable `AppSettings::ColoredHelp` of clap

* Run `cargo fmt --all`

Co-authored-by: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com>
2021-06-30 16:00:04 +02:00
maru143 bec944484e
Add extensions to supported languages output (#745) 2021-05-18 07:21:16 +02:00
Rachael Wright-Munn d90631d1bc
Add Color to Tokei (#751)
* Introduce Color to Tokei

* Add minimal color documentation

* fixup! Add minimal color documentation

Co-authored-by: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com>
2021-05-18 07:18:43 +02:00
Alexandru Macovei cd7bd6d4a2
Cache embedding regexes (#730)
* Run cargo fmt and apply clippy lints from rust 1.51.0

* Rename can_perform_single_line_analisys to try_perform_single_line_analisys and streamline body

* Remove ops::Add impl for CodeStats; only AddAssign is meaningful and used

* Add embedding module to cache heuristic regexes used to detect embedded languages

* Add separate embedding tests; Not all cases can be execised with a single test

* Simplify html embedding test file_triggeringprincipal_frame_1.html until quoting issues are resolved
2021-05-09 20:15:10 +02:00
Michael Macnair 66967a1b9e
Fuzzing (#726)
* Add fuzzing support

See fuzz/README.md for details. Example bug: #725

* improve fuzz docs

* fuzzing: make relevant config part of input

Most of the config is to do with what files to parse, however
one setting - treat_doc_strings_as_comments - does impact parse_from_slice

* fuzzing: improve docs + config clarity

* fuzz/README.md: install instructions + another todo item
2021-05-09 20:05:14 +02:00
Charlie Ozinga 9f4f457a3a
Apply --compact output to --files (#722) 2021-05-09 20:00:10 +02:00
Yijun Yu e14733dac5
Add --streaming flag (#678)
* Parallelize tokei counters and subsequent processing of individual files with additional options: tokei -f --cmd <shell_script> --folder <output_folder>. Here the shell script is expected to accept three arguments: shell_script <filename> <language> <output_folder>

* change /bin/sh to /bin/bash so that the batch process runs well with bash script

* implement the --streaming option for exactly this purpose: it should print out the paths and language types of all files per line to the stdout for downstream processing in the pipe

* fixing the option struct by replacing streaming option with a function option as an extension; skipping the serialization for the extended field

* handle for_each_fn when it is None

* fixing: default for_each_fn should be None

* Adding the Streaming options for batch processing: simple => text, json => json, none => ignore

* resolving the merging conflicts

* change String to Report, and formatting the simple output to reserve enough spaces for path

* fixing the format so it does not truncate long paths

* simplifying the format for the Json output

* introduce a commented header to the simple output format

* removed the None option as it is unnessary

Co-authored-by: Yijun Yu <yijun.yu@gmail.com>
Co-authored-by: Yijun Yu <yijun.yu@huawei.com>
2021-04-30 18:37:33 +02:00
maru143 2c60aab35c
fix: typo (#734) 2021-03-11 13:55:45 +01:00
Caden Haustein 684b296aa9
Replace dirs with dirs-next (#699) 2021-01-18 06:46:13 +00:00
Alexandru Macovei 611de1fc7b
Implement compact output feature (#605) (#690) 2021-01-05 07:16:13 +00:00
Sebastian Thiel 0751e3bb83
Fix all feasible clippy issues (#687)
And the ones not deemed feasible were officialy allowed so folks running
`cargo clippy` should see no warnings.
2020-12-30 08:25:07 +00:00
Sebastian Thiel a64cfcc699
Fix for #684 (#686)
* Fix for #684

Bascially the implementation as per this instruction:

https://github.com/XAMPPRocky/tokei/pull/685#issuecomment-752112937

* refactor
2020-12-29 15:54:45 +00:00
Erin Power 34810da843 Only include children in total 2020-12-23 23:04:49 +00:00
Liwen Guo a6fa401dc4
Make --no-ignore imply all other --no-ignore- flags (#588)
* Make --no-ignore imply all other --no-ignore- flags

And add --no-ignore-dot to only disable .ignore files, matching ripgrep.

Fixes #585.

* Cosmetic code updates for consistency

* Update CLI help text in README

* Update src/utils/fs.rs

Co-authored-by: Liwen Guo <lg@livven.me>

Co-authored-by: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com>
2020-09-20 15:30:35 +02:00
Steven Tang 64bb4e10fe Add summary information to output formats 2020-08-05 17:59:36 +02:00
NickHackman f37b2db17a Export find_char_boundary hidden
Used in cli_utils for printing report totals with number formats.
2020-07-21 13:06:43 +02:00
NickHackman 3f1491e582 Added num-format option underscores
Allows printing numbers with `_`s. For example, 1_234
2020-07-21 13:06:43 +02:00
NickHackman b9b022f8c9 feat: number formatted printing
Adds commandline argument to print numbers with commas, plain, or dots.
For example, dots would result in 1.324.
2020-07-21 13:06:43 +02:00
Steven Tang 0f23e248c2
Remove duplicated 'json' from --output (#576)
Resolves #570, #571
2020-06-27 09:23:21 +02:00
Erin Power af326fd73c Fix empty tags causing panics and support markdown code identifiers to be split by , 2020-06-24 14:03:25 +02:00
Erin Power 189fe14167 Release 12.0.3
tokei@12.0.3

Generated by cargo-workspaces
2020-06-22 17:27:20 +02:00
Erin Power a8ca1af9b1 fix len 2020-06-22 16:50:17 +02:00
Erin Power e4ff3c2b5b fix panic if empty 2020-06-22 15:20:46 +02:00
Erin Power 01ec622758 fmt 2020-06-22 12:59:19 +02:00
Erin Power ef17da80ac account for \r 2020-06-22 12:59:09 +02:00
Erin Power 40b8174d98 fmt 2020-06-22 12:02:50 +02:00
Erin Power f19c21831d Update serialize output 2020-06-22 12:02:18 +02:00
Erin Power 7272d67ae1 Enabled support for svelte, vue, rubyhtml and fixed edge case 2020-06-22 10:02:15 +02:00
Erin Power 98865ad391 change files output slightly 2020-06-22 10:02:15 +02:00