You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classCredentials(auth:String) {
val gitHubUserName:Stringval gitHubAuthToken:Stringinit {
val splitAuth = auth.split(":")
if (splitAuth.size !=2) {
"""Incorrect value is passed with 'auth' property. | It should contain user and auth-token separated by a colon (':'). | This option is needed to extend the limit of requests.""".trimMargin() logAndExit 8
}
gitHubUserName = splitAuth[0]
gitHubAuthToken = splitAuth[1]
}
}
Now diktat suggests to move property assignments outside of the init block, but a local variable is used for this assignments, so this refactoring is too complicated. Diktat should not emit a warning in this case.
Environment information
diktat version: 0.4.2
The text was updated successfully, but these errors were encountered:
Describe the bug
Now diktat suggests to move property assignments outside of the init block, but a local variable is used for this assignments, so this refactoring is too complicated. Diktat should not emit a warning in this case.
Environment information
The text was updated successfully, but these errors were encountered: