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.
* 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>
* Introduce Color to Tokei
* Add minimal color documentation
* fixup! Add minimal color documentation
Co-authored-by: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com>
* 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
* 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
* 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>
* 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>