36 lines
No EOL
1 KiB
Markdown
Executable file
36 lines
No EOL
1 KiB
Markdown
Executable file
# Contributing to Kaiteki
|
|
|
|
I'm happy about any feedback or contribution you have.
|
|
|
|
Below is some guidance to what to watch out when working with Kaiteki.
|
|
|
|
## Code style
|
|
|
|
Kaiteki has no special formatting rules and follows the standard formatting provided by `dartfmt`.
|
|
Here's only one rule though, append a comma when a parameter list gets too long.
|
|
This is because Dart's formatter will format it awkwardly.
|
|
|
|
**BAD**
|
|
```dart
|
|
const User(
|
|
{required this.id,
|
|
required this.source,
|
|
required this.joinDate,
|
|
...
|
|
this.followingCount}); // Here's a comma missing
|
|
```
|
|
|
|
**GOOD**
|
|
```dart
|
|
const User({
|
|
required this.id,
|
|
required this.source,
|
|
required this.joinDate,
|
|
...
|
|
this.followingCount, // With comma the brackets format correctly.
|
|
});
|
|
```
|
|
|
|
## Check your linter problems before submitting a pull request
|
|
|
|
Kaiteki recently adopted [`flutter_lints`](https://pub.dev/packages/flutter_lints) which provides additional linting rules which show problems ranging from missed `const`s (constant values actually improve performance!) to other suggestions. |