Skip to content

Improve exception message#4823

Merged
schalkms merged 4 commits into
detekt:mainfrom
VitalyVPinchuk:Improve_exception_message
Jun 1, 2022
Merged

Improve exception message#4823
schalkms merged 4 commits into
detekt:mainfrom
VitalyVPinchuk:Improve_exception_message

Conversation

@VitalyVPinchuk

@VitalyVPinchuk VitalyVPinchuk commented May 9, 2022

Copy link
Copy Markdown
Contributor

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

codecov Bot commented May 9, 2022

Copy link
Copy Markdown

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.

@schalkms schalkms left a comment

Copy link
Copy Markdown
Member

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.

Comment thread detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/Analyzer.kt Outdated

@schalkms schalkms left a comment

Copy link
Copy Markdown
Member

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.

Comment thread detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/Analyzer.kt Outdated
Comment thread detekt-core/src/test/kotlin/io/gitlab/arturbosch/detekt/core/AnalyzerSpec.kt Outdated

@BraisGabin BraisGabin left a comment

Copy link
Copy Markdown
Member

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.

Comment thread detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/Analyzer.kt Outdated
@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.

4 participants