-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Improve development docs and SliceUnique, remove gomarkdoc (#11)
## Motivation - Added development instructions and contributing guidelines to the project. - Removed `gomarkdoc` usage as it turns out that `pkg.go.dev` can render testable examples comments well. - Improved `SliceUnique` error messages. - Added testable example for `SliceUnique`. ## Release Notes `SliceUnique` now reports more readable error messages using ordinal slice index form (e.g. 1st, 2nd, 11th) instead of 0-based slice index. ## Breaking changes `SliceUnique` error message has been changed. Before: *elements are not unique, index 0 collides with index 2*. After: *elements are not unique, 1st and 3rd elements collide*.
- Loading branch information
1 parent
c7867da
commit e4a1079
Showing
16 changed files
with
279 additions
and
3,827 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Contributing to govy | ||
|
||
If you're here, chances are you want to contribute ;) | ||
Thanks a lot for that! | ||
|
||
Your pull request will be reviewed by one of the maintainers. | ||
We encourage and welcome any and all feedback. | ||
|
||
## Before you contribute | ||
|
||
The goal of this project is to develop a validation library with | ||
functional interface which is strongly-typed, produces information rich errors | ||
and has API that is easy to understand and use. | ||
|
||
Make sure you're familiarized with | ||
[development instructions](./DEVELOPMENT.md). | ||
|
||
## Making a pull request | ||
|
||
Please make a fork of this repo and submit a PR from there. | ||
More information can be found | ||
[here](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request). | ||
|
||
## Merge Request title | ||
|
||
Try to be as descriptive as you can in your PR title. | ||
Note that the title must adhere to the rules defined in | ||
[this workflow](./.github/workflows/pr-title.yml). | ||
|
||
## License | ||
|
||
Govy is licensed under Mozilla Public License Version 2.0, see [LICENSE](../LICENSE). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Development | ||
|
||
This document describes the intricacies of govy development workflow. | ||
If you see anything missing, feel free to contribute to this document :) | ||
|
||
## Pull requests | ||
|
||
[Pull request template](../.github/pull_request_template.md) | ||
is provided when you create new PR. | ||
Section worth noting and getting familiar with is located under | ||
`## Release Notes` header. | ||
|
||
## Makefile | ||
|
||
Govy ships with a Makefile which is well documented and should cover most if | ||
not all development cycle needs. | ||
Run `make help` to display short description for each target. | ||
|
||
## CI | ||
|
||
Continuous integration pipelines utilize the same Makefile commands which | ||
you run locally within reproducible `devbox` environment. | ||
This ensures consistent behavior of the executed checks | ||
and makes local debugging easier. | ||
|
||
## Testing | ||
|
||
You can run all unit tests with `make test`. | ||
We also encourage inspecting test coverage during development, you can verify | ||
if the paths you're interested in are covered with `make test/coverage`. | ||
|
||
## Releases | ||
|
||
Govy adheres to the Go's official release workflow recommendations and | ||
requirements. Refer to the official | ||
[Go docs](https://go.dev/doc/modules/release-workflow) for more details. | ||
|
||
### Release automation | ||
|
||
We're using [Release Drafter](https://github.com/release-drafter/release-drafter) | ||
to automate release notes creation. Drafter also does its best to propose | ||
the next release version based on commit messages from `main` branch. | ||
|
||
Release Drafter is also responsible for auto-labeling pull requests. | ||
It checks both title and body of the pull request and adds appropriate labels. \ | ||
**NOTE:** The auto-labeling mechanism will not remove labels once they're | ||
created. For example, If you end up changing PR title from `sec:` to `fix:` | ||
you'll have to manually remove `security` label. | ||
|
||
On each commit to `main` branch, Release Drafter will update the next release | ||
draft. | ||
|
||
In addition to Release Drafter, we're also running a script which extracts | ||
explicitly listed release notes and breaking changes which are optionally | ||
defined in `## Release Notes` and `## Breaking Changes` headers. | ||
It also performs a cleanup of the PR draft mitigating Release Drafter | ||
shortcomings. | ||
|
||
## Code generation | ||
|
||
Some parts of the codebase are automatically generated. | ||
We use the following tools to do that: | ||
|
||
- [embed-example-in-readme.bash](../scripts/embed-example-in-readme.bash) | ||
for embedding tested examples in [README.md](../README.md). | ||
|
||
## Validation | ||
|
||
We're using our own validation library to write validation for all objects. | ||
Refer to this [README.md](../internal/validation/README.md) for more information. | ||
|
||
## Dependencies | ||
|
||
Renovate is configured to automatically merge minor and patch updates. | ||
For major versions, which sadly includes GitHub Actions, manual approval | ||
is required. |
Oops, something went wrong.