Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Latest commit

 

History

History
110 lines (71 loc) · 5.13 KB

CONTRIBUTING.md

File metadata and controls

110 lines (71 loc) · 5.13 KB

🦄 Contributing to Very Good Dart CLI

This CONTRIBUTING file is for a developer that wants to modify or contribute to the Very Good Dart CLI template. If you are interested in solely generating a project using Very Good Dart CLI, please refer to the README file.

Opening an issue

We highly recommend creating an issue 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.

When reporting a bug, please use the built-in Bug Report 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.

Developing for Very Good Dart CLI

To develop for Very Good Dart CLI you will need to become familiar with Very Good Ventures processes and conventions:

Setting up your local development environment

  1. Install a valid Dart SDK in your local environment. If you have Flutter installed you'll have the Dart SDK. Compatible Flutter SDK versions with Very Good Dart CLI can be found within the Flutter release archive, ensure it has a Dart version compatible with Very Good Dart CLI's Dart version constraint.

  2. Install Mason in your local environment:

# 🎯 Activate Mason from https://pub.dev
dart pub global activate mason_cli

💡 Note: If you're not familiar with Mason, read its documentation or watch our Mason Demonstration.

  1. Get all bricks in Very Good Dart CLI's mason.yaml:
# 📂 Get all bricks in Very Good Dart CLI (from project root):
mason get
  1. Generate the template locally:
# 🧱 Generate a project using the local Very Good Dart CLI version
mason make very_good_dart_cli --config-path brick/config.json --output-dir output --watch

This will generate a project using Very Good Dart CLI under output with the variables specified by the configuration file. When any file under __brick__ is changed the project will be regenerated.

Creating a Pull Request

Before creating a Pull Request please:

  1. Fork the GitHub repository and create your branch from main:
# 🪵 Branch from `main`
git branch <branch-name>
git checkout <branch-name>

Where <branch-name> is an appropriate name describing your change.

  1. Get all bricks in Very Good Dart CLI's mason.yaml:
# 📂 Get all bricks in Very Good Dart CLI (from project root):
mason get
  1. Generate the template locally:
# 🧱 Generate a project using the local Very Good Dart CLI brick (from project root)
mason make very_good_dart_cli  --config-path brick/config.json --output-dir output
  1. Add tests! Pull Requests without 100% test coverage will not be merged. If you're unsure on how to do so watch our Testing Fundamentals Course.
# 📊 Generate coverage report (from output/test_cli)
dart test -j 4 --coverage=coverage --platform="vm"
dart pub global run coverage:format_coverage --lcov --check-ignore --in=coverage --out=coverage/lcov.info --package="." --report-on="lib"

# 🕸️ Generate a readable HTML website (from output/test_cli)
genhtml -o coverage/html coverage/lcov.info

# 👀 Open the coverage report HTML website (from output/test_cli)
open coverage/html/index.html
  1. Ensure the generated project is well formatted:
# 🧼 Run Dart's formatter (from output/test_cli)
dart format lib test --set-exit-if-changed
  1. Ensure the generated project has no analysis issues:
# 🔍 Run Dart's analyzer (from output/test_cli)
dart analyze --fatal-infos --fatal-warnings .

💡 Note: Our repositories use Very Good Analysis.

  1. Ensure you have a meaningful semantic commit message.

  2. Create the Pull Request with a meaningful description, linking to the original issue where possible.

  3. Verify that all [status checks](https://github.com/VeryGoodOpenSource/very_good_dart_cli /actions/) are passing for your Pull Request once they have been approved to run by a maintainer.

💡 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.