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

Alter failure behavior in the case of unrecognized lines #116

Closed
wants to merge 1 commit into from

Conversation

nonvirtualthunk
Copy link

  • Previous behavior would throw an IllegalArgumentException when a line outside of the expected range was encountered. This makes sense, but prevents the plugin from operating with non-Java JVM languages that are sometimes forced to include source lines outside the expected range. The example motivating this change is the case of functions that Kotlin inlines, which result in source line numbers that are higher than the number of lines in the source file.
  • The new behavior here is to simply log an error to standard error in that event, and not update coverage. This does mean that such unusual lines will not get included properly in coverage, but that seems a better outcome than runtime failure.

- Previous behavior would throw an `IllegalArgumentException` when a line outside of the expected range was encountered. This makes sense, but prevents the plugin from operating with non-Java JVM languages that are sometimes forced to include source lines outside the expected range. The example motivating this change is the case of functions that Kotlin inlines, which result in source line numbers that are higher than the number of lines in the source file.
- The new behavior here is to simply log an error to standard error in that event, and not update coverage. This does mean that such unusual lines will not get included properly in coverage, but that seems a better outcome than runtime failure.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 97.914% when pulling bc8d78a on nonvirtualthunk:kotlin-fix into 0a4b0e6 on trautonen:master.

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.

None yet

2 participants