Skip to content

Add relative file path to classdescription #477

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

Merged
merged 5 commits into from
Apr 3, 2025

Conversation

micheleorselli
Copy link
Member

@micheleorselli micheleorselli commented Apr 1, 2025

This depends on #476. Here a $filePath attribute is added to ClassDescription and is populated during the parsing process. That should enable adding the information relative to the file path when building a violation (needed in #474)

Copy link

codecov bot commented Apr 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.20%. Comparing base (c61405a) to head (4276493).
Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #477      +/-   ##
============================================
+ Coverage     95.16%   95.20%   +0.03%     
- Complexity      629      632       +3     
============================================
  Files            72       72              
  Lines          1655     1668      +13     
============================================
+ Hits           1575     1588      +13     
  Misses           80       80              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@@ -70,10 +74,11 @@ public function __construct(
$this->enum = $enum;
}

public static function getBuilder(string $FQCN): ClassDescriptionBuilder
public static function getBuilder(string $FQCN, string $relativeFilePath): ClassDescriptionBuilder

Choose a reason for hiding this comment

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

Why everywhere we have filePath and here relativeFilePath?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch! Updating it

@micheleorselli micheleorselli changed the base branch from refactor_violations to main April 3, 2025 07:20
@micheleorselli micheleorselli force-pushed the add_relative_file_path_to_classdescription branch from db56c8b to 4bee331 Compare April 3, 2025 07:30
Copy link
Member

@AlessandroMinoccheri AlessandroMinoccheri left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@micheleorselli micheleorselli merged commit e94fb42 into main Apr 3, 2025
34 checks passed
@micheleorselli micheleorselli deleted the add_relative_file_path_to_classdescription branch April 18, 2025 12:41
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