Skip to content

Commit

Permalink
[ECO-1217] Require markdown reference links (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
alnoki authored Feb 3, 2024
1 parent b93cd5d commit c46ec0b
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 33 deletions.
84 changes: 52 additions & 32 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
# Contribution guidelines

See [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt) for a guide to interpreting
the following key words in this document:

- MAY
- MUST
- MUST NOT
- OPTIONAL
- RECOMMENDED
- REQUIRED
- SHALL
- SHALL NOT
- SHOULD
- SHOULD NOT
See [RFC 2119] for a guide to interpreting the key words in this document:

- `MAY`
- `MUST`
- `MUST NOT`
- `OPTIONAL`
- `RECOMMENDED`
- `REQUIRED`
- `SHALL`
- `SHALL NOT`
- `SHOULD`
- `SHOULD NOT`

## Continuous integration and development

### `pre-commit`

This repository uses [`pre-commit`](https://pre-commit.com/). If you add a new
filetype, you SHOULD add a new [hook](https://pre-commit.com/hooks.html).
This repository uses [`pre-commit`]. If you add a new filetype, you `SHOULD` add
a new [hook][pre-commit hook].

From the repository root directory:

Expand All @@ -31,28 +30,49 @@ See the `cfg/` directory for assorted formatter and linter configurations.

### GitHub actions

This repository uses [GitHub actions](https://docs.github.com/en/actions) to
perform assorted status checks. For example if you submit a pull request but do
not run [`pre-commit`](#pre-commit) then your pull request might get blocked.
This repository uses [GitHub actions] to perform assorted status checks. If you
submit a pull request but do not [run `pre-commit`](#pre-commit) then your pull
request might get blocked.

## Pull requests

This repository handles pull requests (PRs) using the
[squash and merge method](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/about-merge-methods-on-github) <!-- markdownlint-disable-line MD013 -->
This repository handles pull requests (PRs) using the [squash and merge method].

The Econia Labs team uses [Linear](https://linear.app/) for project management,
such that PRs titles start with tags of the form `[ECO-WXYZ]`. All PRs SHOULD
include a tag, so if you are submitting a PR as a community contributor, an
Econia Labs member may rename your PR with an auto-generated tag for internal
The Econia Labs team uses [Linear] for project management, such that PRs titles
start with tags of the form `[ECO-WXYZ]`. All PRs `MUST` include a tag, so if
you are submitting a PR as a community contributor, an Econia Labs member
`SHALL` change your PR title to include an auto-generated tag for internal
tracking purposes.

## Move style
## Style

### General

1. [Reference](https://move-language.github.io/move/references.html) variable
names MUST end in either `_ref` or `_ref_mut`, depending on mutability.
1. [Doc comments](https://move-language.github.io/move/coding-conventions.html?#comments) <!-- markdownlint-disable-line MD013 -->
SHALL use Markdown syntax.
1. Incorrect comments are worse than no comments.
1. Variable names SHOULD be descriptive, with minor exceptions for things
scenarios like math utility functions.
1. Error code names MUST start with `E_`, for example `E_NOT_ENOUGH_BASE`.
1. Minimize maintainability dependencies.
1. Prefer compact code blocks, delimited by section comments rather than
whitespace.

### Markdown

1. [Reference links] are REQUIRED where possible, for readability and for ease
of linting.

### Move

1. [Reference][move references] variable names `MUST` end in either `_ref` or
`_ref_mut`, depending on mutability.
1. [Doc comments] `MUST` use Markdown syntax.
1. Variable names `SHOULD` be descriptive, with minor exceptions for scenarios
like math utility functions.
1. Error code names `MUST` start with `E_`, for example `E_NOT_ENOUGH_BASE`.

[doc comments]: https://move-language.github.io/move/coding-conventions.html?#comments
[github actions]: https://docs.github.com/en/actions
[linear]: https://pre-commit.com/hooks.html
[move references]: https://move-language.github.io/move/references.html
[pre-commit hook]: https://pre-commit.com/hooks.html
[reference links]: https://mdformat.readthedocs.io/en/stable/users/style.html#reference-links
[rfc 2119]: https://www.ietf.org/rfc/rfc2119.txt
[squash and merge method]: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/about-merge-methods-on-github
[`pre-commit`]: https://github.com/pre-commit/pre-commit
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Econia v5

[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit) <!-- markdownlint-disable-line MD013 -->
[![pre-commit]](https://github.com/pre-commit/pre-commit)

[pre-commit]: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit

0 comments on commit c46ec0b

Please sign in to comment.