Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Kotlin Ktlint
root = true

[*.{kt,kts}]

ktlint_code_style = android_studio

ktlint_standard_no-wildcard-imports = disabled
ktlint_standard_no-empty-first-line-in-class-body = disabled
ktlint_standard_no-line-break-before-assignment = disabled
ktlint_standard_multiline-expression-wrapping = disabled
ktlint_standard_string-template-indent = disabled
ktlint_standard_trailing-comma-on-call-site = disabled
ktlint_standard_trailing-comma-on-declaration-site = disabled
ktlint_standard_no-empty-first-line-in-method-block = disabled
ktlint_standard_expression-body-wrapping = disabled
ktlint_standard_function-signature = disabled
ktlint_standard_spacing-between-declarations-with-annotations = disabled

max_line_length = 130
17 changes: 17 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,23 @@ concurrency:

jobs:

ktlint:
runs-on: ubuntu-latest

steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Install ktlint
run: curl -sSLO https://github.com/pinterest/ktlint/releases/download/1.7.1/ktlint && chmod a+x ktlint

- name: Run ktlint
run: ./ktlint 'src/**/*.kt' --baseline=config/ktlint/baseline.xml

instrumentation-tests:
if: github.event.pull_request.draft == false
runs-on: [ self-hosted, Android ]
Expand Down
12 changes: 12 additions & 0 deletions EmojiComponents/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jlleitschuh.gradle.ktlint.reporter.ReporterType

plugins {
id("com.android.library")
alias(core.plugins.kotlin.android)
Expand Down Expand Up @@ -37,6 +39,16 @@ android {
}
}

ktlint {
version.set("1.7.1")
android.set(true)
ignoreFailures.set(false)
reporters {
reporter(ReporterType.PLAIN)
}
baseline.set(file("${projectDir}/config/ktlint/baseline.xml"))
}

dependencies {
implementation(project(":Core:Avatar"))
implementation(project(":Core:Compose:Margin"))
Expand Down
170 changes: 170 additions & 0 deletions EmojiComponents/config/ktlint/baseline.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<baseline version="1.0">
<file name="build.gradle.kts">
<error line="49" column="25" source="standard:string-template" />
</file>
<file name="src/main/java/com/infomaniak/emojicomponents/components/AddReactionChip.kt">
<error line="40" column="14" source="standard:function-naming" />
<error line="75" column="13" source="standard:function-naming" />
</file>
<file name="src/main/java/com/infomaniak/emojicomponents/components/EmojiReactionDetails.kt">
<error line="73" column="5" source="standard:function-naming" />
<error line="159" column="1" source="standard:no-blank-line-before-rbrace" />
<error line="163" column="13" source="standard:function-naming" />
<error line="175" column="13" source="standard:function-naming" />
<error line="192" column="13" source="standard:function-naming" />
</file>
<file name="src/main/java/com/infomaniak/emojicomponents/components/EmojiReactions.kt">
<error line="39" column="5" source="standard:function-naming" />
<error line="76" column="5" source="standard:class-signature" />
<error line="77" column="5" source="standard:class-signature" />
<error line="77" column="40" source="standard:class-signature" />
<error line="95" column="13" source="standard:function-naming" />
</file>
<file name="src/main/java/com/infomaniak/emojicomponents/components/ReactionChip.kt">
<error line="39" column="14" source="standard:function-naming" />
<error line="83" column="5" source="standard:class-signature" />
<error line="84" column="5" source="standard:class-signature" />
<error line="84" column="28" source="standard:class-signature" />
<error line="105" column="13" source="standard:function-naming" />
</file>
<file name="src/main/java/com/infomaniak/emojicomponents/icons/FaceSmileRoundPlus.kt">
<error line="3" column="1" source="standard:import-ordering" />
<error line="32" column="1" source="standard:indent" />
<error line="33" column="1" source="standard:indent" />
<error line="34" column="1" source="standard:indent" />
<error line="35" column="1" source="standard:indent" />
<error line="36" column="1" source="standard:indent" />
<error line="37" column="1" source="standard:indent" />
<error line="38" column="1" source="standard:indent" />
<error line="39" column="1" source="standard:indent" />
<error line="40" column="1" source="standard:indent" />
<error line="41" column="1" source="standard:indent" />
<error line="42" column="1" source="standard:indent" />
<error line="43" column="1" source="standard:indent" />
<error line="44" column="1" source="standard:indent" />
<error line="45" column="1" source="standard:indent" />
<error line="46" column="1" source="standard:indent" />
<error line="47" column="1" source="standard:indent" />
<error line="48" column="1" source="standard:indent" />
<error line="49" column="1" source="standard:indent" />
<error line="50" column="1" source="standard:indent" />
<error line="51" column="1" source="standard:indent" />
<error line="52" column="1" source="standard:indent" />
<error line="53" column="1" source="standard:indent" />
<error line="54" column="1" source="standard:indent" />
<error line="55" column="1" source="standard:indent" />
<error line="56" column="1" source="standard:indent" />
<error line="57" column="1" source="standard:indent" />
<error line="58" column="1" source="standard:indent" />
<error line="59" column="1" source="standard:indent" />
<error line="60" column="1" source="standard:indent" />
<error line="61" column="1" source="standard:indent" />
<error line="62" column="1" source="standard:indent" />
<error line="63" column="1" source="standard:indent" />
<error line="64" column="1" source="standard:indent" />
<error line="65" column="1" source="standard:indent" />
<error line="66" column="1" source="standard:indent" />
<error line="67" column="1" source="standard:indent" />
<error line="68" column="1" source="standard:indent" />
<error line="69" column="1" source="standard:indent" />
<error line="70" column="1" source="standard:indent" />
<error line="71" column="1" source="standard:indent" />
<error line="72" column="1" source="standard:indent" />
<error line="73" column="1" source="standard:indent" />
<error line="74" column="1" source="standard:indent" />
<error line="75" column="1" source="standard:indent" />
<error line="76" column="1" source="standard:indent" />
<error line="77" column="1" source="standard:indent" />
<error line="78" column="1" source="standard:indent" />
<error line="79" column="1" source="standard:indent" />
<error line="80" column="1" source="standard:indent" />
<error line="81" column="1" source="standard:indent" />
<error line="82" column="1" source="standard:indent" />
<error line="83" column="1" source="standard:indent" />
<error line="84" column="1" source="standard:indent" />
<error line="85" column="1" source="standard:indent" />
<error line="86" column="1" source="standard:indent" />
<error line="87" column="1" source="standard:indent" />
<error line="88" column="1" source="standard:indent" />
<error line="89" column="1" source="standard:indent" />
<error line="90" column="1" source="standard:indent" />
<error line="91" column="1" source="standard:indent" />
<error line="92" column="1" source="standard:indent" />
<error line="93" column="1" source="standard:indent" />
<error line="94" column="1" source="standard:indent" />
<error line="95" column="1" source="standard:indent" />
<error line="96" column="1" source="standard:indent" />
<error line="97" column="1" source="standard:indent" />
<error line="98" column="1" source="standard:indent" />
<error line="99" column="1" source="standard:indent" />
<error line="100" column="1" source="standard:indent" />
<error line="101" column="1" source="standard:indent" />
<error line="102" column="1" source="standard:indent" />
<error line="103" column="1" source="standard:indent" />
<error line="104" column="1" source="standard:indent" />
<error line="105" column="1" source="standard:indent" />
<error line="106" column="1" source="standard:indent" />
<error line="107" column="1" source="standard:indent" />
<error line="108" column="1" source="standard:indent" />
<error line="109" column="1" source="standard:indent" />
<error line="110" column="1" source="standard:indent" />
<error line="111" column="1" source="standard:indent" />
<error line="112" column="1" source="standard:indent" />
<error line="113" column="1" source="standard:indent" />
<error line="114" column="1" source="standard:indent" />
<error line="115" column="1" source="standard:indent" />
<error line="116" column="1" source="standard:indent" />
<error line="117" column="1" source="standard:indent" />
<error line="118" column="1" source="standard:indent" />
<error line="119" column="1" source="standard:indent" />
<error line="120" column="1" source="standard:indent" />
<error line="121" column="1" source="standard:indent" />
<error line="122" column="1" source="standard:indent" />
<error line="123" column="1" source="standard:indent" />
<error line="124" column="1" source="standard:indent" />
<error line="125" column="1" source="standard:indent" />
<error line="126" column="1" source="standard:indent" />
<error line="127" column="1" source="standard:indent" />
<error line="128" column="1" source="standard:indent" />
<error line="129" column="1" source="standard:indent" />
<error line="130" column="1" source="standard:indent" />
<error line="131" column="1" source="standard:indent" />
<error line="132" column="1" source="standard:indent" />
<error line="133" column="1" source="standard:indent" />
<error line="134" column="1" source="standard:indent" />
<error line="135" column="1" source="standard:indent" />
<error line="136" column="1" source="standard:indent" />
<error line="137" column="1" source="standard:indent" />
<error line="138" column="1" source="standard:indent" />
<error line="139" column="1" source="standard:indent" />
<error line="140" column="1" source="standard:indent" />
<error line="141" column="1" source="standard:indent" />
<error line="142" column="1" source="standard:indent" />
<error line="143" column="1" source="standard:indent" />
<error line="144" column="1" source="standard:indent" />
<error line="145" column="1" source="standard:indent" />
<error line="146" column="1" source="standard:indent" />
<error line="147" column="1" source="standard:indent" />
<error line="148" column="1" source="standard:indent" />
<error line="149" column="1" source="standard:indent" />
<error line="150" column="1" source="standard:indent" />
<error line="151" column="1" source="standard:indent" />
<error line="152" column="1" source="standard:indent" />
<error line="156" column="13" source="standard:backing-property-naming" />
<error line="160" column="13" source="standard:function-naming" />
</file>
<file name="src/main/java/com/infomaniak/emojicomponents/views/EmojiReactionsView.kt">
<error line="47" column="5" source="standard:class-signature" />
<error line="48" column="5" source="standard:class-signature" />
<error line="49" column="5" source="standard:class-signature" />
<error line="49" column="27" source="standard:class-signature" />
<error line="50" column="5" source="standard:class-signature" />
<error line="75" column="81" source="standard:function-expression-body" />
<error line="79" column="80" source="standard:function-expression-body" />
<error line="84" column="75" source="standard:function-expression-body" />
<error line="148" column="70" source="standard:function-expression-body" />
<error line="149" column="16" source="standard:keyword-spacing" />
<error line="157" column="131" source="standard:max-line-length" />
</file>
</baseline>
12 changes: 12 additions & 0 deletions HtmlCleaner/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jlleitschuh.gradle.ktlint.reporter.ReporterType

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

Expand Down Expand Up @@ -28,6 +30,16 @@ android {
}
}

ktlint {
version.set("1.7.1")
android.set(true)
ignoreFailures.set(false)
reporters {
reporter(ReporterType.PLAIN)
}
baseline.set(file("${projectDir}/config/ktlint/baseline.xml"))
}

dependencies {
api libs.jsoup
}
17 changes: 17 additions & 0 deletions HtmlCleaner/config/ktlint/baseline.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<baseline version="1.0">
<file name="src/main/java/com/infomaniak/html/cleaner/BodyCleaner.kt">
<error line="104" column="1" source="standard:indent" />
<error line="104" column="17" source="standard:chain-wrapping" />
<error line="105" column="1" source="standard:indent" />
<error line="105" column="17" source="standard:chain-wrapping" />
</file>
<file name="src/main/java/com/infomaniak/html/cleaner/HeadCleaner.kt">
<error line="47" column="5" source="standard:class-signature" />
<error line="48" column="5" source="standard:class-signature" />
<error line="48" column="38" source="standard:class-signature" />
</file>
<file name="src/main/java/com/infomaniak/html/cleaner/HtmlSanitizer.kt">
<error line="38" column="21" source="standard:property-naming" />
</file>
</baseline>
12 changes: 12 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jlleitschuh.gradle.ktlint.reporter.ReporterType

plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.dagger.hilt)
Expand Down Expand Up @@ -101,6 +103,16 @@ kotlin {
}
}

ktlint {
version.set("1.7.1")
android.set(true)
ignoreFailures.set(false)
reporters {
reporter(ReporterType.PLAIN)
}
baseline.set(file("${projectDir}/config/ktlint/baseline.xml"))
}

dependencies {
implementation(project(":Core"))
implementation(project(":Core:Auth"))
Expand Down
Loading