Skip to content

Violation can now contain a reference to the file path #478

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 2 commits into from
Apr 5, 2025

Conversation

micheleorselli
Copy link
Member

@micheleorselli micheleorselli commented Apr 3, 2025

This is the last step to unblock #474.
Now all rules populate the field $filePath, which can be used when generating the output.

Copy link

codecov bot commented Apr 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.28%. Comparing base (e94fb42) to head (fb82d01).

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #478      +/-   ##
============================================
+ Coverage     95.20%   95.28%   +0.08%     
- Complexity      632      633       +1     
============================================
  Files            72       72              
  Lines          1668     1698      +30     
============================================
+ Hits           1588     1618      +30     
  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.

private string $error;

public function __construct(string $fqcn, string $error, ?int $line = null)
public function __construct(string $fqcn, string $error, ?int $line = null, ?string $filePath = null)
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe we could make this construct private?

Copy link
Member Author

Choose a reason for hiding this comment

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

doable, will tackle in a separate PR 🙇

@micheleorselli micheleorselli merged commit e247850 into main Apr 5, 2025
34 checks passed
@micheleorselli micheleorselli deleted the adds_filepath_to_violation 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