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

Remove ability to create AnalysisResult by passing source code and filename #7255

Merged
merged 3 commits into from May 7, 2024

Conversation

3flex
Copy link
Member

@3flex 3flex commented May 3, 2024

Calling detekt from production code should only ever pass a KtFile or a Path (from which a KtFile can be created).

Creating KtFile from text directly is only required from tests.

This is a breaking change for detekt-intellij-plugin, but a quick look at the source in that project suggests it will be a simple update.

Waiting on merge of:

Copy link

codecov bot commented May 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.79%. Comparing base (5b83dc3) to head (5d2e929).

❗ Current head 5d2e929 differs from pull request most recent head 38c3ae8. Consider uploading reports for the commit 38c3ae8 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7255      +/-   ##
============================================
+ Coverage     84.74%   84.79%   +0.04%     
- Complexity     3996     3998       +2     
============================================
  Files           577      577              
  Lines         12126    12119       -7     
  Branches       2484     2483       -1     
============================================
  Hits          10276    10276              
+ Misses          623      616       -7     
  Partials       1227     1227              

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

Copy link
Member

@BraisGabin BraisGabin left a comment

Choose a reason for hiding this comment

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

Ok, this have a lot of sense. While I was reviewing this PRs I was thinking "Why do we need this in our production code?". It was generating noise and it's great to move it so only the tests uses it.

…lename

Calling detekt from production code should only ever pass a KtFile or a
Path (from which a KtFile can be created).

Creating KtFile from text directly is only required from tests.
@3flex 3flex marked this pull request as ready for review May 7, 2024 06:35
@3flex 3flex enabled auto-merge (squash) May 7, 2024 06:35
@detekt-ci
Copy link
Collaborator

Warnings
⚠️ It looks like this PR contains functional changes without a corresponding test.

Generated by 🚫 dangerJS against 38c3ae8

@3flex 3flex merged commit f1b1bb1 into detekt:main May 7, 2024
21 checks passed
@3flex 3flex deleted the location-9 branch May 7, 2024 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api breaking change Marker for breaking changes which should be highlighted in the changelog core parser test-utils tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants