Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 28 additions & 29 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@

## Installation requirements

Different OS distributions have different installation requirements.
Different OS distributions have different installation requirements. We recommend
using [GHCup](https://www.haskell.org/ghcup/) to manage your Haskell toolchain
(GHC, Cabal, etc.).

### Linux:
We recommend installing the `pkgconfig` and `liburing` systems packages, though
they are not required. However, one would not get the performance benefits of
performing I/O asynchronously.
We recommend installing the `pkg-config` and `liburing` systems packages. These
are required for the high-performance asynchronous I/O backend.

* Ubuntu:
```
apt-get install pkg-config liburing-dev
```bash
sudo apt-get install pkg-config liburing-dev
```

If these packages are not installed, then the `serialblockio` cabal package flag
Expand Down Expand Up @@ -64,29 +65,27 @@ There is no strict code style, but try to keep the code style consistent
throughout the repository and favour readability. Code should be well-documented
and well-tested.

## Formatting

We use `stylish-haskell` to format Haskell files, and we use `cabal-fmt` to
format `*.cabal` files. We also use `cabal check` to sanity check our cabal
files. See the helpful scripts in the [scripts folder](./scripts/), and the
[`stylish-haskell` configuration file](./.stylish-haskell.yaml).

To perform a pre-commit code formatting pass, run one of the following:

* If you prefer `fd` and have it installed on your system:
```
./format-stylish-fd.sh
./format-cabal-fd.sh
./check-cabal.sh
./haddocks.sh
```

* Otherwise using Unix `find`:
```
./format-stylish-find.sh
./format-cabal-find.sh
./check-cabal.sh
./haddocks.sh
## Formatting and Linting

We use various tools to maintain code quality and consistency. See the helpful
scripts in the [scripts folder](./scripts/).

### Haskell Code
We use `stylish-haskell` for formatting and `hlint` for linting.
* Format: `./scripts/format-stylish-haskell.sh`
* Lint: `./scripts/lint-hlint.sh`

### Cabal Files
We use `cabal-fmt` for formatting and `cabal check` for sanity checks.
* Format: `./scripts/format-cabal-fmt.sh`
* Check: `./scripts/lint-cabal.sh`

### Other Linters
* Shell scripts: `./scripts/lint-shellcheck.sh`
* GitHub Actions: `./scripts/lint-actionlint.sh`

### Documentation
* Check Haddocks: `./scripts/generate-haddock.sh`
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Check Haddocks: `./scripts/generate-haddock.sh`
* Generate Haddocks: `./scripts/generate-haddock.sh`


## Pull requests

Expand Down