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

Improve exception message #4823

Merged
merged 4 commits into from Jun 1, 2022

Conversation

VitalyVPinchuk
Copy link
Contributor

@VitalyVPinchuk VitalyVPinchuk commented May 9, 2022

For #4615
Report detailed location of an error using first stack trace element.

Analyzing /Users/vvp/IdeaProjects/detekt/detekt-core/build/resources/test/cases/Test.kt led to an exception.
Location: AnalyzerSpec.kt => io.gitlab.arturbosch.detekt.core.FaultyRule => visitKtFile => 132.
The original exception message was: Deliberately triggered error.
Running detekt '1.20.0' on Java '1.8.0_332-b08' on OS 'Mac OS X'
If the exception message does not help, please feel free to create an issue on our GitHub page.

Report detailed location of an error.
@codecov
Copy link

codecov bot commented May 9, 2022

Codecov Report

Merging #4823 (dc43d05) into main (faa985d) will increase coverage by 0.02%.
The diff coverage is 75.00%.

❗ Current head dc43d05 differs from pull request most recent head b4740a2. Consider uploading reports for the commit b4740a2 to get more accurate results

@@             Coverage Diff              @@
##               main    #4823      +/-   ##
============================================
+ Coverage     84.71%   84.74%   +0.02%     
  Complexity     3431     3431              
============================================
  Files           491      491              
  Lines         11267    11274       +7     
  Branches       2075     2075              
============================================
+ Hits           9545     9554       +9     
  Misses          673      673              
+ Partials       1049     1047       -2     
Impacted Files Coverage Δ
...otlin/io/gitlab/arturbosch/detekt/core/Analyzer.kt 81.52% <75.00%> (-0.30%) ⬇️
...lab/arturbosch/detekt/rules/style/VarCouldBeVal.kt 81.55% <0.00%> (+1.16%) ⬆️
...turbosch/detekt/rules/complexity/NamedArguments.kt 83.33% <0.00%> (+1.19%) ⬆️
...lab/arturbosch/detekt/rules/style/UnusedImports.kt 89.87% <0.00%> (+2.53%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update faa985d...b4740a2. Read the comment docs.

Copy link
Member

@schalkms schalkms left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! I like this addition.

Copy link
Member

@schalkms schalkms left a comment

Choose a reason for hiding this comment

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

Thanks for improving the test coverage. Please see my comment below.

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.

Thank you very much to track this one :). This will help a lot.

@schalkms schalkms merged commit fe03b6d into detekt:main Jun 1, 2022
@VitalyVPinchuk VitalyVPinchuk deleted the Improve_exception_message branch June 3, 2022 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants