-
Notifications
You must be signed in to change notification settings - Fork 1.3k
For #26844: Update ktlint to 0.47.0. #26846
Conversation
Hmm.. given how large the log is for the failing trailing comma lint, I think we probably want to just go with adding a baseline as well. |
9ddccf1
to
28f46e9
Compare
app/src/main/java/org/mozilla/fenix/compose/cfr/CFRPopupFullscreenLayout.kt
Show resolved
Hide resolved
.editorconfig
Outdated
ij_kotlin_allow_trailing_comma=true | ||
|
||
ktlint_disabled_rules=import-ordering |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a new line to EOF
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to take this opportunity to automatically insert a new line to EOF?
It is as simple as adding insert_final_newline = true
in this editorconfig file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, let's do that. We'll have to update that for AC and Focus.
.editorconfig
Outdated
ij_kotlin_allow_trailing_comma=true | ||
|
||
ktlint_disabled_rules=import-ordering |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also move this back to where it's associated comment are on line 2-3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thank you for noticing this, I inserted the new rules in a wrong place by mistake.
@@ -70,7 +70,7 @@ private data class PopupHorizontalBounds( | |||
* @param action Optional other composable to show just below the popup text. | |||
*/ | |||
@SuppressLint("ViewConstructor") // Intended to be used only in code, don't need a View constructor | |||
internal class CFRPopupFullScreenLayout( | |||
internal class CFRPopupFullscreenLayout( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an aside thought, but do we know why the ktlint in CI didn't complain and block the initial merge when the file name rule failed for this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the changelog it seems the rule has been added in 0.46.0. (It was later modified in 0.47.0 to allow different naming for files with just a single top-level declaration of type function - especially in the case of extension functions).
I do remember similar warnings about file names, but that could have been from lint or IDE (?)
…nt_disabled_rules.
…nform to filename rule.
59b83c7
to
0abd30b
Compare
… end of each file. This automatically adds a new line at EOF when there is none.
Pull Request checklist
QA
To download an APK when reviewing a PR (after all CI tasks finished running):
Checks
at the top of the PR page.firefoxci-taskcluster
group on the left to expand all tasks.build-debug
task.View task in Taskcluster
in the newDETAILS
section.GitHub Automation
Fixes #26844