Closed Bug 1740799 Opened 3 years ago Closed 2 years ago

Format kotlin using ktlint

Categories

(GeckoView :: General, task, P3)

Unspecified
All
task

Tracking

(firefox109 fixed)

RESOLVED FIXED
109 Branch
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.

Automatically generated running

./mach lint -l android-format --fix

Assignee: nobody → agi
Status: NEW → ASSIGNED
Priority: -- → P3
Severity: -- → N/A
Assignee: agi → nobody
Status: ASSIGNED → NEW

I want this, so I take this.

Assignee: nobody → m_kato

Add ktlint-disable comment then reformat Kotlin code.

sed -i  -e 's/^\(import .*\.\*\)/\1 \/\/ ktlint-disable no-wildcard-imports/g'

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

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

Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/19211084d916 Format our Kolitin code. r=geckoview-reviewers,owlish https://hg.mozilla.org/integration/autoland/rev/2078ec02a313 Format Kotlin code using ktlint. r=geckoview-reviewers,owlish,linter-reviewers,sylvestre https://hg.mozilla.org/integration/autoland/rev/dabc0ae241c7 Add android-format lint test. r=nalexander,linter-reviewers,sylvestre
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: