-
Notifications
You must be signed in to change notification settings - Fork 464
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
Kotlin file could start with @file:...
instead of package ...
#136
Comments
This sounds like a very good reason to me to amend the default header regex for Kotlin files. I probably won't have the time and energy to make this change myself, but I'm sure we're open to PRs if @nedtwigg isn't already addressing this. But regardless, I would make a reasonable guess that he can direct you if you'd be happy to submit a PR yourself. as I think he knows the code base better than I do. :) |
You can workaround with something like this: Issue #135 is about this same issue but for the default package. |
@nedtwigg The regex would be for JUnit 5 I believe (please correct me if I'm wrong @JLLeitschuh), as I think @JLLeitschuh is submitting this issue in response to junit-team/junit5#1001. Not sure if the regex that would ultimately come out of this would count as "battle-tested", as AFAIK JUnit 5 doesn't use Kotlin much at this point in time. |
Well, I only discovered the bug because of my work on Junit5. I'd be more than happy to open an PR with a simple unit test for the regex. |
The |
Released in |
The regex for finding the top of the file (where the license should go) doesn't work when you start your file with:
The default header regex for kotlin should support starting the file with the
@file
annotation.As a note, the compiler will only let you legally put
@file:...
annotations above the package statement.The text was updated successfully, but these errors were encountered: