-
-
Notifications
You must be signed in to change notification settings - Fork 769
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
Add License rule #2429
Add License rule #2429
Conversation
…with processing settings like the configuration path
081eb2c
to
acda94e
Compare
Codecov Report
@@ Coverage Diff @@
## master #2429 +/- ##
============================================
+ Coverage 82.83% 82.87% +0.03%
- Complexity 2166 2182 +16
============================================
Files 356 358 +2
Lines 6136 6194 +58
Branches 1119 1130 +11
============================================
+ Hits 5083 5133 +50
- Misses 478 480 +2
- Partials 575 581 +6
Continue to review full report at Codecov.
|
Thanks, @arturbosch for reopening this! Should I add more tests? |
@dector that sounds awesome to me! |
@arturbosch Battle-tested this rule on Mozilla Fenix app with the default template file. Works like a charm and it's so freaking fast! 😍 |
Thanks for testing! If you realize a testcase is missing, feel free to open a new PR. |
🎉 thanks @arturbosch |
Additional changes on top of #2077 :
I reused the current
FileProcessListener
extension to store the license header inside the KtFile's which is basically caching :).Instead of introducing a
Config.Location
property on the config, I went with introducing a new method for theExtension
interface.I've marked the new
SetupContext
as Unstable with the new@RequiresOptIn
api. This way we can add some more useful methods and properties later on without needing a major version.When we decide that
SetupContext
is stable, we can remove thefun init(config: Config)
function from theExtension
interface asSetupContext
provides theConfig
.ProcessingSettings
was the ideal candidate to implementSetupContext
as it has all the useful information from the cli.