Skip to content

Commit 04b04cb

Browse files
committed
docs: updating contributing guide
1 parent 79a700c commit 04b04cb

File tree

2 files changed

+18
-24
lines changed

2 files changed

+18
-24
lines changed

.github/CONTRIBUTING.md

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,19 @@ The latest changes are always in master branch, so please make your Pull Request
88

99
## 🚩 Development Requirements
1010

11-
To set up your local development environment, you'll need the following:
12-
13-
- **Operating System**: macOS Monterey+ or Linux.
14-
15-
- Docker Version 26.0.0 or newer. Installation guides:
11+
Before you begin, you will need to set up your local development environment. Here is what you'll need:
1612

13+
- **Operating System**: macOS Monterey+, Linux, or Windows with WSL2.
14+
- **Docker**: Version 26.0.0 or newer. Installation guides:
1715
- [Docker on Ubuntu 22.04](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-22-04)
1816
- [Docker Desktop on Mac](https://docs.docker.com/desktop/install/mac-install/)
19-
2017
- **Homebrew** (macOS only): Install via [brew.sh](https://brew.sh/).
2118

22-
- [Pre-commit](https://pre-commit.com)
23-
24-
(Optional): Automates the running of git pre-commit hooks.
25-
26-
- Installation: `brew install pre-commit`
27-
28-
- [Commitizen](https://commitizen-tools.github.io/commitizen/#macos)
29-
30-
(Optional): Assists in formatting git commits.
19+
### → Optional Tools
3120

21+
- [Pre-commit](https://pre-commit.com) — Automates the running of git pre-commit hooks.
22+
- Installation: `brew install pre-commit` and `make hooks`
23+
- [Commitizen](https://commitizen-tools.github.io/commitizen/#macos) — Assists in formatting git commits.
3224
- Installation: `brew install commitizen`
3325

3426
<br>
@@ -90,6 +82,8 @@ $ make ssh
9082
$ make down
9183
```
9284

85+
By default, phpunit and phpstan commands will be ran against docker environment.
86+
9387
<br>
9488

9589
## ⚡️ Continuous Integration with GitHub Actions
@@ -161,7 +155,7 @@ $ make lint-composer
161155

162156
We use [`yamllint`](https://github.com/adrienverge/yamllint) to enforce coding standards in YAML files.
163157

164-
If you do not have `yamllint` installed yet, run
158+
(Optional) If you do not have `yamllint` installed yet, run:
165159

166160
```bash
167161
$ brew install yamllint
@@ -175,6 +169,8 @@ To lint yaml files run:
175169
$ make lint-yaml
176170
```
177171

172+
by default, [`cytopia/yamllint`](https://github.com/cytopia/docker-yamllint) Docker image will be used to run linter.
173+
178174
### → PHP CS Fixer
179175

180176
We use [`friendsofphp/php-cs-fixer`](https://github.com/FriendsOfPHP/PHP-CS-Fixer) together with [`wayofdev/php-cs-fixer-config`](https://github.com/wayofdev/php-cs-fixer-config) to enforce coding standards in PHP files.

Makefile

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,11 @@ BUILDER_WIRED ?= $(BUILDER_PARAMS) --network project.$(COMPOSE_PROJECT_NAME) $(S
2525
# Shorthand envsubst command, executed through build-deps
2626
ENVSUBST ?= $(BUILDER) envsubst
2727

28-
# Commitizen docker image
29-
CZ_RUNNER ?= docker run --rm -it --name commitizen \
30-
--platform linux/amd64 \
31-
--entrypoint /bin/sh \
32-
-v ~/.gitconfig:/root/.gitconfig \
33-
-v $(shell pwd):/app \
34-
commitizen/commitizen:latest
28+
# Yamllint docker image
29+
YAML_LINT_RUNNER ?= docker run --rm $$(tty -s && echo "-it" || echo) \
30+
-v $(PWD):/data \
31+
cytopia/yamllint:latest \
32+
-f colored .
3533

3634
PHIVE_RUNNER ?= $(DOCKER_COMPOSE) run --rm --no-deps app
3735

@@ -174,7 +172,7 @@ lint: lint-yaml lint-php lint-stan ## Runs all linting commands
174172
.PHONY: lint
175173

176174
lint-yaml: ## Lints yaml files inside project
177-
yamllint .
175+
@$(YAML_LINT_RUNNER)
178176
.PHONY: lint-yaml
179177

180178
lint-php: prepare ## Fixes code to follow coding standards using php-cs-fixer

0 commit comments

Comments
 (0)