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

Evaluating invalid maven scope as "Compile" #1033

Merged
merged 3 commits into from
Mar 15, 2024

Conversation

RushabhBhansali
Copy link
Contributor

Summary:

Currently maven detector is failing for invalid <scope> in maven dependency file. However, these dependencies are valid as per maven cli and evaluated as "Compile". Component Detector matches the maven's behavior to evaluate these "invalid" scope as "Compile"

#858

Testing:

  • local testing
  • updated unit test for invalid dependency

@RushabhBhansali RushabhBhansali requested a review from a team as a code owner March 14, 2024 23:19
Copy link

codecov bot commented Mar 14, 2024

Codecov Report

Attention: Patch coverage is 84.61538% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 75.4%. Comparing base (fb464ca) to head (3d37f1e).

Files Patch % Lines
...Detection.Detectors/maven/MavenParsingUtilities.cs 85.7% 0 Missing and 1 partial ⚠️
...rs/maven/MavenStyleDependencyGraphParserService.cs 50.0% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1033   +/-   ##
=====================================
  Coverage   75.4%   75.4%           
=====================================
  Files        236     236           
  Lines      10412   10417    +5     
  Branches    1041    1042    +1     
=====================================
+ Hits        7855    7859    +4     
  Misses      2267    2267           
- Partials     290     291    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@grvillic grvillic linked an issue Mar 14, 2024 that may be closed by this pull request
Copy link
Contributor

@grvillic grvillic left a comment

Choose a reason for hiding this comment

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

We need to bump the detector versions that use this parsing utility since we are generating a different dependency graph than before.

@grvillic grvillic self-requested a review March 14, 2024 23:47
Copy link

github-actions bot commented Mar 14, 2024

👋 Hi! It looks like you modified some files in the Detectors folder.
You may need to bump the detector versions if any of the following scenarios apply:

  • The detector detects more or fewer components than before
  • The detector generates different parent/child graph relationships than before
  • The detector generates different devDependencies values than before

If none of the above scenarios apply, feel free to ignore this comment 🙂

@RushabhBhansali RushabhBhansali force-pushed the users/rbhansali/maven-scope-error-fix branch from ee9f2ec to 3d37f1e Compare March 14, 2024 23:55
@RushabhBhansali RushabhBhansali merged commit 9a600c8 into main Mar 15, 2024
26 checks passed
@RushabhBhansali RushabhBhansali deleted the users/rbhansali/maven-scope-error-fix branch March 15, 2024 03:54
@cobya cobya added type:bug Bug fix of existing functionality detector:maven The Maven detector labels Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
detector:maven The Maven detector type:bug Bug fix of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue while mapping DependencyScope from maven dependency tree
3 participants