Skip to content

Commit

Permalink
Add compose-rules
Browse files Browse the repository at this point in the history
  • Loading branch information
syxc committed Jul 4, 2024
1 parent 2fb5a43 commit fbf5bbc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ class MainActivity : ComponentActivity() {
}

@Composable
fun GreetingView(text: String) {
fun GreetingView(text: String, modifier: Modifier = Modifier) {
Text(text = text)
}

@Preview
@Composable
fun DefaultPreview() {
private fun DefaultPreview() {
AppTheme {
}
}
3 changes: 3 additions & 0 deletions spotless/spotless.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ spotless {
"ktlint_function_naming_ignore_when_annotated_with": "Composable",
"ktlint_compose_compositionlocal-allowlist" : "disabled"
]
).customRuleSets(
// https://github.com/mrmans0n/compose-rules
["io.nlopez.compose.rules:ktlint:0.4.5"]
)
}

Expand Down

0 comments on commit fbf5bbc

Please sign in to comment.