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

Fix path inclusion behavior #224

Merged
merged 1 commit into from
Jan 26, 2024
Merged

Fix path inclusion behavior #224

merged 1 commit into from
Jan 26, 2024

Conversation

drdavella
Copy link
Member

@drdavella drdavella commented Jan 26, 2024

Overview

Fix path inclusion behavior

Description

  • While doing some testing I discovered an issue with the behavior of --path-include
  • Included paths should always be interpreted as relative to the given directory path
  • I am going to cherry pick this into a bugfix release since I don't want to release it with the updated API changes

Copy link

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

3 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

codecov bot commented Jan 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4cc579f) 96.47% compared to head (d8b66de) 96.47%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #224   +/-   ##
=======================================
  Coverage   96.47%   96.47%           
=======================================
  Files          98       98           
  Lines        4196     4197    +1     
=======================================
+ Hits         4048     4049    +1     
  Misses        148      148           
Files Coverage Δ
src/codemodder/code_directory.py 100.00% <100.00%> (ø)
src/codemodder/codemodder.py 94.33% <100.00%> (+0.05%) ⬆️

@drdavella drdavella added this pull request to the merge queue Jan 26, 2024
Merged via the queue into main with commit cc9d387 Jan 26, 2024
15 checks passed
@drdavella drdavella deleted the fix-path-include branch January 26, 2024 16:38
@@ -42,7 +42,7 @@ def test_all_py_files_match(self, dir_structure):

def test_match_excluded(self, dir_structure):
expected = ["empty_for_testing.py", "insecure_random.py"]
files = match_files(dir_structure, ["**/tests/**", "*request.py"])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it make sense to keep one test with **/tests... ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly but with the new behavior this isn't a valid match anymore.

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.

3 participants