Skip to content

Commit

Permalink
docs: update CONTRIBUTING.md and RULES.md
Browse files Browse the repository at this point in the history
  • Loading branch information
oxyroid committed Jan 13, 2024
1 parent f9e8f35 commit a0625fa
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 39 deletions.
35 changes: 5 additions & 30 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,42 +17,17 @@ If you want to contribute to this repository, follow these steps:

Create a new branch from the `master` branch or checkout existing branches.

4. **Branch Naming Rules**

If you want to code in new branch, use the following naming conventions:
- Screen feature branch: `feature_{module-name}`
- Bug fix branch: `fix_{keyword}`
- Migrate platform branch: `{target-platform}_migrate`
- Other branch: `build_{keyword}`

5. **Coding in Your Branch**
4. **Coding in Your Branch**

Start coding in your branch and make the necessary changes.

6. **Check for Warnings and Errors**

Ensure that there are no warnings or errors in your code.

7. **Commit Rules**

Follow this format for your commits: "lower-case", "space after the colon", "end with a period".
Use this format: `{catalog}: {description}.`.

Examples:
- `feat: new screen feature.`
- `fix: bug fix.`
- `docs: markdown files or comments update.`
- `build: gradle files or project structure update.`
- `upgrade (master only): release new version.`
- `style: code style or naming update.`
- etc.

8. **Push Your Code**
5. **Push Your Code**

Once your code is ready, push it to your branch.

9. **Make a Pull Request**
6. **Make a Pull Request**

If your staged code is complete and error-free, you can create a pull request to the `MASTER` branch.

Following these guidelines will help streamline the contribution process. Thank you for your contribution!
Following these guidelines will help streamline the contribution process.
Thank you for your contribution!
23 changes: 14 additions & 9 deletions RULES.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
# Rules

1. Do not import-on-demand (star-import).
2. All composable functions should be restartable and skippable.
3. Do not use List/Map/Set as parameters for composable functions. Instead, consider using stable wrapper
or immutable data structures.
4. If you want to change the visibility of the system bars, you can do so by calling
1. Never use Java, use Kotlin always.
2. Do not import-on-demand (star-import).
3. All composable functions without return types should be restartable and skippable.
4. Do not use List/Map/Set and other unstable collections as parameters for composable functions.
Instead, consider using stable wrapper
or immutable data structures with immutable/stable elements.
5. If you want to change the visibility of the system bars, you can do so by calling
`Helper#statusBarsVisibility` or `Helper#navigationBarsVisibility`.
5. If you want to create a new string resource, you can do so by creating it in the i18n module and
6. If you want to create a new string resource, you can do so by creating it in the i18n module and
then accessing it using `import <package>.i18n.R.string`.
6. If you wish to apply additional dependencies, consider using version catalogs.
7. Never use AndroidViewModel, use context in UI layer or Data layer.
8. Never use Painter to inflate drawable resources, use `ImageVector.vectorResource` instead.
7. If you wish to apply additional dependencies, consider using version catalogs.
8. Never use AndroidViewModel, use context in UI layer only.
9. Never use view-based XML, you can use view in AndroidView composable only.
10. Never use Painter to inflate drawable resources, use `ImageVector.vectorResource` instead.
11. If you wanna to add some libraries, please make sure they are located in MavenCentral, google or
jitpack repository. And jar library is not allowed as well.

0 comments on commit a0625fa

Please sign in to comment.