Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
When you submit code changes, your submissions are understood to be under the same MIT that covers the project. By contributing to this project, you agree that your contributions will be licensed under its MIT.
In your bug report, please provide the following:
- A quick summary and/or background
- Steps to reproduce
- Be specific!
- Give sample code if you can.
- What you expected would happen
- What actually happens
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
Please post code and output as text (using proper markup). Additional screenshots to help contextualize behavior are ok.
- Fork/clone the repository.
- Create your branch from
main
if you plan to implement new functionality or change existing code significantly. - Implement your change and add tests for it.
- Ensure the test suite passes.
- Ensure the code complies with our coding guidelines (see below).
- Send that pull request!
Please make sure you have set up your username and email address for use with Git. Strings such as silly nick name <root@localhost>
looks bad in the commit history of a project.
Our documentation is build with VitePress, for set up a local environment to contribute follow these steps:
- You'll need
node
(we recommend using nvm) andnpm
for set up the environment.- Using
nvm
you can executenvm use
(reads .nvmrc file) in the project root directory and follow the instructions to use the correctnode
version.
- Using
- Install dependencies with
npm ci
. - Run local development server with
npm run docs:dev
. - Implement your changes.
- Before submitting your Pull Request run
npm run docs:build
to ensure everything works.
To change the configuration for the project we use the .env
file if you would like to know what variables should be there use the following command:
cp .env.example .env
Run tests from the library:
# using make
make test
# using bashunit itself
./bashunit tests/**/*_test.sh
Run the test with a watcher for development: this will require to have installed fswatcher
# you have to install `watch` for your OS
make test/watch
- Linux
- Ubuntu latest
- Alpine latest
- Windows latest
- MacOS latest
docker run --rm -it -v "$(pwd)":/project -w /project ubuntu:latest \
sh -c "apt-get update && \
apt-get install -y bash make shellcheck git curl perl && make test"
make test/alpine
# or
docker run --rm -it -v "$(pwd)":/project -w /project alpine:latest \
sh -c "apk add bash make shellcheck git && make test"
To contribute to this repository you must have ShellCheck installed on your local machine or IDE, since it is the static code analyzer that is being used in continuous integration pipelines.
Installation: https://github.com/koalaman/shellcheck#installing
# using make
make sa
# using ShellCheck itself
shellcheck ./**/**/*.sh -C
To contribute to this repository, consider installing editorconfig-checker to check all project files regarding the .editorconfig
to ensure we all fulfill the standard.
Installation: https://github.com/editorconfig-checker/editorconfig-checker#installation
To run it, use the following command:
# using make
make lint
# using editorconfig-checker itself
ec -config .editorconfig
This command will be executed on the CI to ensure the project's quality standards.
To install the pre-commit of the project with the following command:
Please note that you will need to have ShellCheck and editorconfig-checker installed on your computer. See above how to install in your local.
make pre_commit/install
Shell Guide by Google Conventions.
For us the documentation it's really important, we are a small group, and we want to maintain this project for long, to do that we will need your help.
If you want to change something related to the architecture or apply a change that it's a decision on how the library works please use ADR otherwise we will request you to do so on the PR.