-
Notifications
You must be signed in to change notification settings - Fork 730
Fix annotation default target warnings in enum constructors #602
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
base: main
Are you sure you want to change the base?
Changes from all commits
1f29a21
a435fab
6d679ee
3b4153c
c8548d5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -22,8 +22,8 @@ import androidx.annotation.DrawableRes | |||||||||
| import com.vrem.wifianalyzer.R | ||||||||||
|
|
||||||||||
| enum class Strength( | ||||||||||
| @DrawableRes val imageResource: Int, | ||||||||||
| @ColorRes val colorResource: Int, | ||||||||||
| @param:DrawableRes val imageResource: Int, | ||||||||||
| @param:ColorRes val colorResource: Int, | ||||||||||
|
Comment on lines
+25
to
+26
|
||||||||||
| @param:DrawableRes val imageResource: Int, | |
| @param:ColorRes val colorResource: Int, | |
| @param:DrawableRes @get:DrawableRes val imageResource: Int, | |
| @param:ColorRes @get:ColorRes val colorResource: Int, |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -32,7 +32,7 @@ private val extras = listOf("SAE", "EAP_SUITE_B_192", "OWE") | |||||
| private val regex = Regex("[^A-Z0-9_]") | ||||||
|
|
||||||
| enum class Security( | ||||||
| @DrawableRes val imageResource: Int, | ||||||
| @param:DrawableRes val imageResource: Int, | ||||||
|
||||||
| val extras: List<String> = listOf(), | ||||||
| ) { | ||||||
| NONE(R.drawable.ic_lock_open), | ||||||
|
|
@@ -47,7 +47,7 @@ typealias SecurityTypeId = Int | |||||
|
|
||||||
| enum class WiFiSecurityType( | ||||||
| val securityTypeId: SecurityTypeId, | ||||||
| @StringRes val textResource: Int, | ||||||
| @param:StringRes val textResource: Int, | ||||||
|
||||||
| @param:StringRes val textResource: Int, | |
| @param:StringRes @get:StringRes val textResource: Int, |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -28,8 +28,8 @@ typealias WiFiStandardId = Int | |||||||||
|
|
||||||||||
| enum class WiFiStandard( | ||||||||||
| val wiFiStandardId: WiFiStandardId, | ||||||||||
| @StringRes val fullResource: Int, | ||||||||||
| @StringRes val valueResource: Int, | ||||||||||
| @param:StringRes val fullResource: Int, | ||||||||||
| @param:StringRes val valueResource: Int, | ||||||||||
|
Comment on lines
+31
to
+32
|
||||||||||
| @param:StringRes val fullResource: Int, | |
| @param:StringRes val valueResource: Int, | |
| @get:StringRes val fullResource: Int, | |
| @get:StringRes val valueResource: Int, |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -35,7 +35,7 @@ internal val calculateCenterUsingCenter0: CalculateCenter = { _, center0, _ -> c | |||||
| internal val calculateCenterUsingCenter1: CalculateCenter = { _, _, center1 -> center1 } | ||||||
|
|
||||||
| enum class WiFiWidth( | ||||||
| @StringRes val textResource: Int, | ||||||
| @param:StringRes val textResource: Int, | ||||||
|
||||||
| @param:StringRes val textResource: Int, | |
| @param:StringRes @get:StringRes val textResource: Int, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@param:StringResapplies the annotation only to the constructor parameter; since this is avalconstructor property, the generatedtextResourceproperty/getter will no longer be annotated as a@StringRes. If this value is read elsewhere (e.g., passed intogetString(...)), you likely want the annotation on the property as well (use@get:StringResor@field:StringRes, or add both use-site targets explicitly).