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

New config hide_dependencies #1156

Merged
merged 2 commits into from
Jan 11, 2025
Merged

Conversation

alanhamlett
Copy link
Member

@alanhamlett alanhamlett commented Jan 6, 2025

Adds cli param --hide-dependencies and ~/.wakatime.cfg config settings.hide_dependencies. When true or a list of regex patterns that matches the current entity file path, imports/libraries/dependencies aren't sent to the api.

@alanhamlett alanhamlett requested a review from gandarez January 6, 2025 23:06
@gandarez gandarez force-pushed the feature/hide-imports-config branch from c33a68b to 324b88f Compare January 10, 2025 12:07
@gandarez
Copy link
Member

@alanhamlett we could also make it by project and maybe branch? If certain restricted projects needs to get dependencies hidden or some branches, like master/main.

Fix sanitization, add hide_dependencies setting
@gandarez gandarez force-pushed the feature/hide-imports-config branch from 324b88f to 10d8d04 Compare January 11, 2025 01:15
@alanhamlett
Copy link
Member Author

@alanhamlett we could also make it by project and maybe branch? If certain restricted projects needs to get dependencies hidden or some branches, like master/main.

Just by entity file path, because that equals project normally. I don't think anyone needs to hide dependencies for a branch in a project while sending for another branch. Even with a monorepo they would want to hide dependencies based on folder path of the files being edited.

@gandarez
Copy link
Member

Fair enough, let's get it released and collect some feedbacks.

@alanhamlett alanhamlett merged commit f9bf8d8 into develop Jan 11, 2025
21 checks passed
@alanhamlett alanhamlett deleted the feature/hide-imports-config branch January 11, 2025 02:20
Copy link

codecov bot commented Jan 11, 2025

Codecov Report

Attention: Patch coverage is 86.25000% with 11 lines in your changes missing coverage. Please review.

Project coverage is 63.02%. Comparing base (43ab913) to head (10d8d04).
Report is 3 commits behind head on develop.

Files with missing lines Patch % Lines
cmd/params/params.go 58.82% 6 Missing and 1 partial ⚠️
pkg/heartbeat/sanitize.go 88.88% 2 Missing and 2 partials ⚠️
@@             Coverage Diff             @@
##           develop    #1156      +/-   ##
===========================================
+ Coverage    62.99%   63.02%   +0.03%     
===========================================
  Files          386      386              
  Lines        16923    16972      +49     
===========================================
+ Hits         10660    10696      +36     
- Misses        5690     5700      +10     
- Partials       573      576       +3     
Flag Coverage Δ
unittests 63.02% <86.25%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cmd/fileexperts/fileexperts.go 63.00% <100.00%> (+0.37%) ⬆️
cmd/heartbeat/heartbeat.go 76.77% <100.00%> (+0.09%) ⬆️
cmd/offline/offline.go 73.85% <100.00%> (+0.17%) ⬆️
pkg/deps/deps.go 88.28% <100.00%> (+0.55%) ⬆️
pkg/project/project.go 93.30% <100.00%> (+0.05%) ⬆️
pkg/heartbeat/sanitize.go 94.59% <88.88%> (-5.41%) ⬇️
cmd/params/params.go 80.89% <58.82%> (-0.48%) ⬇️

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

Successfully merging this pull request may close these issues.

2 participants