wakatime / wakatime-cli

Command line interface used by all WakaTime text editor plugins
https://wakatime.com/plugins
BSD 3-Clause "New" or "Revised" License
296 stars 41 forks source link

Behavior when `hide_project_names` and `exclude` are both true #1129

Closed ArtofBugs closed 1 day ago

ArtofBugs commented 1 day ago

In my .wakatime.cfg right now, I have both exclude = true to exclude all projects (along with a list of specific folders to include under the include key) and hide_project_names = true. I would expect that any folders not in the include list would be ignored, but right now anytime I open any folder in vscode and edit a file, a .wakatime-project file is created and times for the project appear on my dashboard. Is this intended behavior? I didn't see anything about this behavior in the docs.

gandarez commented 1 day ago

@ArtofBugs exclude accepts a list of regular expressions and does not accept "true" as global variable to ignore everything.

https://github.com/wakatime/wakatime-cli/blob/develop/USAGE.md#settings-section

ArtofBugs commented 1 day ago

Ohh ok, that would explain things. I saw that bools were accepted in the example config table (the one you linked) so I assumed true worked too. Thanks!

ArtofBugs commented 1 day ago

Confirmed it works correctly with regex instead of true; closing :) Thanks for the quick reply!

alanhamlett commented 1 day ago

We should treat true as .* same as other bool/list configs?

gandarez commented 1 day ago

Implemented by https://github.com/wakatime/wakatime-cli/pull/1130 and will be released soon.

gandarez commented 1 day ago

Released on v1.105.2