Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output is not sorted with --sort option #1210

Open
1hakusai1 opened this issue Dec 12, 2024 · 0 comments
Open

Output is not sorted with --sort option #1210

1hakusai1 opened this issue Dec 12, 2024 · 0 comments

Comments

@1hakusai1
Copy link

1hakusai1 commented Dec 12, 2024

version: 13.0.0-alpha.7

Steps to reproduce

# run tokei in this repository itself
cargo run -- --sort code
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 Language              Files        Lines         Code     Comments       Blanks
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 JSON                      1         2044         2044            0            0
 TOML                      3          126          105            5           16
 Shell                     1           49           38            1           10
 BASH                      4           48           30           10            8
─────────────────────────────────────────────────────────────────────────────────
 Rust                     24         4574         3851          138          585
 |- Markdown              14          394            5          335           54
 (Total)                             4968         3856          473          639
─────────────────────────────────────────────────────────────────────────────────
 HTML                      1           12            9            1            2
 |- JavaScript             1           15           11            4            0
 (Total)                               27           20            5            2
─────────────────────────────────────────────────────────────────────────────────
 Markdown                  5         1723            0         1384          339
 |- BASH                   1            3            3            0            0
 |- JSON                   1           46           46            0            0
 |- Rust                   1            7            4            3            0
 |- Shell                  1           16           14            0            2
 (Total)                             1795           67         1387          341
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 Total                    39         9057         6160         1881         1016
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Languages which have no child are listed first. In this example, I think the correct order is Rust -> JSON -> TOML ..., but I’m not sure if this behavior is as expected.

If this is a bug, I will create my own PR to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant