Format kotlin using ktlint
Categories
(GeckoView :: General, task, P3)
Tracking
(firefox109 fixed)
Tracking | Status | |
---|---|---|
firefox109 | --- | fixed |
People
(Reporter: agi, Assigned: m_kato)
References
(Blocks 1 open bug)
Details
Attachments
(5 files)
Similar to Bug 1571899, we can use ktlint via spotless to format our kotlin code.
Reporter | ||
Comment 1•3 years ago
|
||
Automatically generated running
./mach lint -l android-format --fix
Updated•3 years ago
|
Reporter | ||
Comment 2•3 years ago
|
||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 4•2 years ago
|
||
Add ktlint-disable comment then reformat Kotlin code.
sed -i -e 's/^\(import .*\.\*\)/\1 \/\/ ktlint-disable no-wildcard-imports/g'
Assignee | ||
Comment 5•2 years ago
|
||
Android-component and Fenix use ktlint, so mozilla-central should use same
tools via spotless.
This is from https://phabricator.services.mozilla.com/D131018
Depends on D161556
Assignee | ||
Comment 6•2 years ago
|
||
To run unit test for android-format lint, we have to add another simple Gradle
project. It is runs with specific parameter (androidFormatLintTest
), so
./mach build
etc doesn't run it.
Also type:global
's lint doesn't have any test framework, so I will add it.
Depends on D161557
Comment 8•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/19211084d916
https://hg.mozilla.org/mozilla-central/rev/2078ec02a313
https://hg.mozilla.org/mozilla-central/rev/dabc0ae241c7
Description
•