Navigation Menu

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

Assert end source locations #5116

Merged
merged 3 commits into from Jul 23, 2022
Merged

Assert end source locations #5116

merged 3 commits into from Jul 23, 2022

Conversation

BraisGabin
Copy link
Member

@BraisGabin BraisGabin commented Jul 23, 2022

I need this refactor to finish: #5058

The idea behind this PR is in the comment: https://github.com/detekt/detekt/pull/5058/files#r927045468


All the changes made outside FindingsAssertions.kt where done using the "fix deprecation" feature.

@@ -6,7 +6,7 @@ import io.gitlab.arturbosch.detekt.api.TextLocation
import org.assertj.core.api.AbstractAssert
import org.assertj.core.api.AbstractListAssert
import org.assertj.core.util.CheckReturnValue
import java.util.Objects
import java.util.*
Copy link
Contributor

Choose a reason for hiding this comment

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

I did not even realize that we allow wildcard imports. I would have expected that some check would have failed

Copy link
Member Author

Choose a reason for hiding this comment

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

our current configuration:

  WildcardImport:
    active: true
    excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
    excludeImports:
      - 'java.util.*'

This case hit both excludes. I'm going to change this for us.

@codecov
Copy link

codecov bot commented Jul 23, 2022

Codecov Report

Merging #5116 (6245074) into main (855065b) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main    #5116   +/-   ##
=========================================
  Coverage     84.91%   84.91%           
  Complexity     3614     3614           
=========================================
  Files           502      502           
  Lines         11887    11887           
  Branches       2237     2237           
=========================================
  Hits          10094    10094           
  Misses          690      690           
  Partials       1103     1103           

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 855065b...6245074. Read the comment docs.

@BraisGabin BraisGabin merged commit e4a2bf5 into main Jul 23, 2022
@BraisGabin BraisGabin deleted the assert-end-source-locations branch July 23, 2022 14:34
VitalyVPinchuk pushed a commit to VitalyVPinchuk/detekt that referenced this pull request Jul 25, 2022
* Add option to assert end source locations

* Don't use hasSourceLocations

* Don't use hasSourceLocation
@cortinico cortinico added this to the 1.22.0 milestone Jul 30, 2022
@cortinico cortinico added the housekeeping Marker for housekeeping tasks and refactorings label Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api formatting housekeeping Marker for housekeeping tasks and refactorings rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants