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

Don't unnecessarily propogate opt-in requirement #4116

Merged
merged 1 commit into from
Sep 20, 2021
Merged

Conversation

3flex
Copy link
Member

@3flex 3flex commented Sep 19, 2021

Opt-in doesn't need to be propogated in test code, or in detekt-core which is not public API.

https://kotlinlang.org/docs/opt-in-requirements.html#non-propagating-opt-in

In modules that don't expose their own API, such as applications, you can
opt in to using APIs without propagating the opt-in requirement to your
code. In this case, mark your declaration with @OptIn passing the opt-in
requirement annotation as its argument.

Opt-in doesn't need to be propogated in test code, or in detekt-core which
is not public API.

https://kotlinlang.org/docs/opt-in-requirements.html#non-propagating-opt-in

> In modules that don't expose their own API, such as applications, you can
> opt in to using APIs without propagating the opt-in requirement to your
> code. In this case, mark your declaration with @OptIn passing the opt-in
> requirement annotation as its argument.
@3flex 3flex added the housekeeping Marker for housekeeping tasks and refactorings label Sep 19, 2021
@codecov
Copy link

codecov bot commented Sep 19, 2021

Codecov Report

Merging #4116 (aacc3fe) into main (cbdb460) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##               main    #4116   +/-   ##
=========================================
  Coverage     83.51%   83.51%           
  Complexity     3186     3186           
=========================================
  Files           461      461           
  Lines          9095     9095           
  Branches       1768     1768           
=========================================
  Hits           7596     7596           
  Misses          570      570           
  Partials        929      929           
Impacted Files Coverage Δ
...rturbosch/detekt/core/settings/PropertiesFacade.kt 100.00% <100.00%> (ø)

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 cbdb460...aacc3fe. Read the comment docs.

@3flex 3flex added this to the 1.19.0 milestone Sep 20, 2021
@3flex 3flex merged commit 80401c5 into detekt:main Sep 20, 2021
@3flex 3flex deleted the optin branch September 20, 2021 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping Marker for housekeeping tasks and refactorings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants