uctakeoff / vscode-counter

VS Code extension: counts blank lines, comment lines, and physical lines of source code in many programming languages.
MIT License
151 stars 20 forks source link

Cannot detect js file #37

Closed HawkingLan closed 2 years ago

HawkingLan commented 4 years ago

I click count line in the Directory, it show me [VSCodeCounter] there was no target file. In this directory, there are just serveral js files. I try other usage given by doc and still not working with js file.

I execute VSCodeCounter: Check Available Language and the javascript config is aliases[JavaScript,javascript,js], extensions[.js,.es6,.mjs,.cjs,.pac], filenames:[jakefile].

I'm confused about filenames:[jakefile]. I'm not sure whether the jakefile causing js files undetectable. I don't know how to override the property filename in settings.json.

uctakeoff commented 4 years ago

If you're working on Remove Development, have you tried the method at this link?

stevof commented 3 years ago

Have you checked your .gitignore file for anything that might exclude JavaScript files?

I had a similar problem after first installing this extension today (v2.3.0). In one project it wouldn't find any JavaScript files. My coworker opened the same project, using the same branch and commit as me, and it found JavaScript files for him. It worked fine for me in another project.

But I realized we have this line in the .gitignore: **/*.js

When I removed that line, or when I unchecked the VSCode Counter: Use Gitignore setting, then it found JavaScript files. This makes sense.

It doesn't make sense why it worked for my coworker. He just installed the extension today (also v2.3.0), and did not customize any settings. He confirmed he had that same line in his .gitignore and Use Gitignore setting was checked. So maybe there's a bug here?

uctakeoff commented 3 years ago

You may find something in the debug log. If you encounter the problem, please follow the instructions below to get the debug log and let me know.