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

C# has two different names when changing output formats #975

Open
cglong opened this issue Mar 3, 2023 · 1 comment
Open

C# has two different names when changing output formats #975

cglong opened this issue Mar 3, 2023 · 1 comment

Comments

@cglong
Copy link

cglong commented Mar 3, 2023

When running tokei .\test.cs --output json and formatting the output, I noticed this:

{
  "C#": {
    "blanks": 1,
    "children": {},
    "code": 8,
    "comments": 0,
    "inaccurate": false,
    "reports": [
      {
        "name": ".\\test.cs",
        "stats": {
          "blanks": 1,
          "blobs": {},
          "code": 8,
          "comments": 0
        }
      }
    ]
  },
  "Total": {
    "blanks": 1,
    "children": {
      "CSharp": [
        {
          "name": ".\\test.cs",
          "stats": {
            "blanks": 1,
            "blobs": {},
            "code": 8,
            "comments": 0
          }
        }
      ]
    },
    "code": 8,
    "comments": 0,
    "inaccurate": false,
    "reports": []
  }
}

Note that C# is called C# at the top level, but when part of Total, it's called CSharp 🙂

@XAMPPRocky
Copy link
Owner

Thank you for your issue! That's a nice catch. The fix should be straightforward, to have LanguageType always use the human friendly variant when possible.

I don't have time to work on it right now but I would be able to accept a PR if anyone is interested

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

2 participants