Skip to content

Fix path inclusion behavior#224

Merged
drdavella merged 1 commit intomainfrom
fix-path-include
Jan 26, 2024
Merged

Fix path inclusion behavior#224
drdavella merged 1 commit intomainfrom
fix-path-include

Conversation

@drdavella
Copy link
Copy Markdown
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

@sonarqubecloud
Copy link
Copy Markdown

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

@codecov
Copy link
Copy Markdown

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
@drdavella drdavella deleted the fix-path-include branch January 26, 2024 16:38

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
Copy Markdown
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
Copy Markdown
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