uctakeoff / vscode-counter

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

How to ignore directories #6

Closed Crypto-Cat closed 5 years ago

Crypto-Cat commented 5 years ago

Hi,

I see this issue was raised and closed before but I can't seem to get VSCodeCounter to ignore directories or files. In my user and workspace settings.json files I have placed the following:

  "files.exclude": {
    "**/.git": true, // this is a default value
    "**/.DS_Store": true, // this is a default value
    "**/data/PCAP/**": true,
    "**/data/PCAP/extract_files/**": true,
    "**/data/CSV/**": true,
    "**/data/failed_code_samples/**": true
  },

  "VSCodeCounter.useGitignore": true,
  "VSCodeCounter.useFilesExclude": true

When I run VSCodeCounter it shows all the CSV/JavaScript/HTML files even though all of these directories are listed in "files.exclude" and are stored in .gitignore (although I see on the last issue about this that the .gitignore functionality wasn't actually implemented)

Any ideas what's wrong? It could very well be settings syntax but I'm struggling to find any good examples online..

Thanks, CryptoCat

uctakeoff commented 5 years ago

@Crypto-Cat It did not reproduce in my environment. Does deleting .VSCodeCounter/ solve the problem?

Crypto-Cat commented 5 years ago

Hi,

Deleting the folder does not solve it

My project structure is:

Main -> data -> PCAP -> extract_files
             -> CSV
             -> failed_code_samples

Where my .VSCodeCounter/ folder is in Main. Are my config settings correct? I've played around with a few variations.

Thanks, CryptoCat

uctakeoff commented 5 years ago

The .VSCodeCounter/ folder is created under the workspace folder.

Your settings don't seem to be wrong.

The folder specified in "files.exclude" should not be visible from Explorer. Is that so in your environment?

Is the VSCodeCounter version 1.2.0?

Crypto-Cat commented 5 years ago

Ah I'm an idiot! One of the excluded folders was showing in the workspace due to a typo, fixed now :D

Thanks!!