Skip to content

Commit 32a0483

Browse files
authored
docs: add contributing documentation (#141)
1 parent 3da77ad commit 32a0483

1 file changed

Lines changed: 94 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# 🦄 Contributing
2+
3+
First of all, thank you for taking the time to contribute! 🎉👍 Before you do, please carefully read this guide.
4+
5+
## Opening an issue
6+
7+
We highly recommend [creating an issue][bug_report_link] if you have found a bug, want to suggest a feature, or recommend a change. Please do not immediately open a pull request. Opening an issue first allows us to reach an agreement on a fix before you put significant effort into a pull request.
8+
9+
When reporting a bug, please use the built-in [Bug Report][bug_report_link] template and provide as much information as possible including detailed reproduction steps. Once one of the package maintainers has reviewed the issue and we reach an agreement on the fix, open a pull request.
10+
11+
## Developing
12+
13+
To develop for Formz you will need to become familiar with Very Good Ventures processes and conventions:
14+
15+
### Setting up your local development environment
16+
17+
1. Install a valid [Flutter SDK](https://docs.flutter.dev/get-started/install) in your local environment. Flutter SDK versions can be found in the [Flutter SDK archive](https://docs.flutter.dev/release/archive). Ensure it has a Dart version compatible with [Formz's Dart version constraint](https://github.com/VeryGoodOpenSource/formz/blob/main/pubspec.yaml).
18+
19+
1. Install Very Good CLI:
20+
21+
```sh
22+
dart pub global activate very_good_cli
23+
```
24+
25+
See [Very Good CLI installation](https://cli.vgv.dev/docs/overview#installing) for more information and troubleshooting if required.
26+
27+
1. Install dependencies:
28+
29+
```sh
30+
very_good packages get -r
31+
```
32+
33+
1. Run tests (from the project root):
34+
35+
```sh
36+
very_good test
37+
```
38+
39+
If some tests do not pass out of the box, please submit an [issue](https://github.com/VeryGoodOpenSource/formz/issues/new/choose).
40+
41+
42+
### Creating a Pull Request
43+
44+
1. [Fork](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) the [GitHub repository](https://github.com/VeryGoodOpenSource/formz) and create your branch from `main`:
45+
46+
```sh
47+
git checkout main
48+
git pull
49+
git checkout -b <branch-name>
50+
```
51+
52+
Where `<branch-name>` is an appropriate name describing your change.
53+
54+
1. Implement your changes, including tests. At VGV we strive for 100% test coverage, but if you're unsure on how to do so watch our [Testing Fundamentals Course](https://www.youtube.com/watch?v=M_eZg-X789w&list=PLprI2satkVdFwpxo_bjFkCxXz5RluG8FY).
55+
56+
If you still can't reach full coverage, please let us know in your PR description.
57+
58+
1. Ensure tests still pass locally:
59+
60+
```sh
61+
very_good test
62+
```
63+
64+
1. Format your code:
65+
66+
```sh
67+
dart format lib test
68+
```
69+
70+
1. Analyze your code:
71+
72+
```sh
73+
dart analyze --fatal-infos --fatal-warnings .
74+
```
75+
76+
Some analysis issues may be fixed automatically with:
77+
78+
```sh
79+
dart fix --apply
80+
```
81+
82+
💡 **Note**: Our repositories use [Very Good Analysis](https://github.com/VeryGoodOpenSource/very_good_analysis).
83+
84+
1. Ensure you have a meaningful [semantic][conventional_commits_link] commit message.
85+
86+
1. Create the Pull Request with a meaningful description, linking to the original issue where possible.
87+
88+
1. Verify that all [status checks](https://github.com/VeryGoodOpenSource/formz/actions/) are passing for your Pull Request once they have been approved to run by a maintainer.
89+
90+
💡 **Note**: While the prerequisites above must be satisfied prior to having your pull request reviewed, the reviewer(s) may ask you to complete additional work, tests, or other changes before your pull request can be accepted.
91+
92+
93+
[conventional_commits_link]: https://www.conventionalcommits.org/en/v1.0.0
94+
[bug_report_link]: https://github.com/VeryGoodOpenSource/formz/issues/new?assignees=&labels=bug&template=bug_report.md&title=fix%3A+

0 commit comments

Comments
 (0)