CommonsApplication migrate to kotlin & some lint fixes (#5879)

* convert to kotlin

Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>

* use lateinit instead of nullable types

Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>

* instance property access fix

Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>

* refactor constants name with uppercased ones

Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>

* remove unused

Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>

* fix imports in test

Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>

* use mockk for kotlin to fix tests

Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>

---------

Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
This commit is contained in:
Parneet Singh 2024-10-26 19:49:34 +05:30 committed by GitHub
parent 7c58891892
commit bc065c8792
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 436 additions and 445 deletions

View file

@ -32,7 +32,7 @@ class ThanksClient
revisionId.toString(), // Rev
null, // Log
csrfTokenClient.getTokenBlocking(), // Token
CommonsApplication.getInstance().userAgent, // Source
CommonsApplication.instance.userAgent, // Source
).map { mwThankPostResponse ->
mwThankPostResponse.result?.success == 1
}