Since 8817762d7b, build fails with any
features enabled..
error[E0308]: mismatched types
--> src/main.rs:95:30
|
95 | match_output(format, &languages);
| ^^^^^^^^^^
| |
| expected struct `tokei::Languages`, found reference
| help: consider removing the borrow: `languages`
|
= note: expected type `tokei::Languages`
found type `&tokei::Languages`
Problem is that when no features enabled, match_output() doesn't need
to "eat" `tokei::Languages`, but in real version of match_output it
must not be borrowed.
Fixes: https://github.com/Aaronepower/tokei/issues/177
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* Fixed parsing corner cases
* Changed storage of comments and quotes from `Vec` to static slices.
* Added tracing for debugging single files. Not recommended for use on
multiple files
* Updated log
* bump ignore to 0.3
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* bump rayon to 0.9
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* bump handlebars to 0.29
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* bump hex to 0.3
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* bump lazy_static to 1
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* Support "filenames" key for Makefile-style languages
* Remove debugging statement
* Add CMake
* Cleaner docs and tests
* Add scons, handle languages with no extensions
* fixed `--languages` option always conflicting with input
As defined in `cli.yml`, `--languages` conflicts with `<input>`,
but if `<input>` has default value, `--languages` will always conflict,
even if no inputs were specified.
Computation of the default value for `<input>` is now moved to `src/main.rs`,
because it cannot be specified in `cli.yml` along with `--languages`.
I suspect this bug was introduced in commit b7a892f475, when default
value for `<input>` was added.
* input option is now optional in cli.yml
* fix: Exit gracefully instead of panicking when trying to use features
* removed an unnecessary empty line
* Added logging of any errors encountered writing to stderr.
* only add regular files to path list
This fixes multiple issues. Before this commit, a directory with
a known file extension in its name would be added to the list of
"files" to open and read from. Another issue occurred with broken
symbolic links being added to the files list.
* add test to ensure directories not treated as file
* replace `unwrap()` with `rs_error!`
Modification on comments:
Batch - Add ::
Lisp - Comments can be nested (www.rosettacode.org/wiki/Comments#Common_Lisp)
Python - Reverted to hash, based on comment thread from pull #59 as
string has a return value
Changes to the quotes
Assembly - Uses ' ' or " "
Bash - Uses ' ' or " "
Batch - They don't use quotes for strings
Cold Fusion - Uses ' ' or " "
D - Uses " " or
Dart - Uses " " or ' ' or """ """ or ''' '''
Forth - Uses " " but new, doesn't have a preset
Fortrans - Use " " or ' '
Idris - Uses " " or """ """
Julia - Uses " " or """ """
Kotlin - Uses " " or """ """
Moustache - Uses " " or ' '
Nim - Uses " " or """ """
Pascal - Uses ' '
Perl - Uses " " or ' '
Php - Uses " " or ' '
Python - Uses " " or ' ' or """ """ or ''' '''
Ruby - Uses " " or ' '
Sass - Uses " " or ' '
Sql - Uses ' '
Toml - Uses " " or ' ' or """ """ or ''' '''
Typescript - Uses " " or ' ' or
Vimscript - Uses " " or ' '
Yaml - Uses " " or ' '
Zsh - Uses " " or ' '
* Made a series of modifications to the comments:
Clojure - Removed #
Forth - ( Comment) style comments need a space after the opening paren
Haskell - Has nested comments
Idris - Has nested comments
Jai - Has nested block comments
Julia - Has nested block comments
Kotlin - Has nested block comments
Pascal - Pascal should be multiline from { or (* to } or *)
Perl - Perl5 and earlier for multiline comments need =pod to =cut.
Python - Python can use """ or ''' for comments
Swift - Has nested block comments
Tests weren't updated to include the correct number of parameters when has_trailing_comments was updated (c5750f9).
nested=true uses the original, pre-change codepath for the tests.
- Added possible values for `--sort` `[files, total, blanks, code, comments]`
- Added support for the following languages
- FORTRAN Legacy
- FORTRAN Modern
- Julia