Ignore comments within String constants
Open
bug
- Dominant language
- Kotlin
- Stars
- 101
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
This code is too simple.
https://github.com/diffplug/selfie/blob/6c3d0ee489152ff87aff5251b05e75314491ad3c/selfie-lib/src/commonMain/kotlin/com/diffplug/selfie/guts/CommentTracker.kt#L51-L54
https://github.com/diffplug/selfie/blob/6c3d0ee489152ff87aff5251b05e75314491ad3c/selfie-lib/src/commonMain/kotlin/com/diffplug/selfie/guts/SourceFile.kt#L83-L87
For example:
```java
class Test {
@Test public void example() {
expectSelfie("underTest").toBe("""
This is a string constant
// selfieonce
The comment above is not really a comment.
We effectively have a "forbidden value" that can't be inside inline snapshots.
""")
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.