ebiten/CONTRIBUTING.md

66 lines
2.3 KiB
Markdown
Raw Normal View History

2022-05-26 19:09:27 +02:00
# Contributing to Ebitengine
2019-02-09 03:23:09 +01:00
2022-05-26 19:09:27 +02:00
Ebitengine is an open source project and we appreciate your contributions!
2019-02-09 03:23:09 +01:00
2022-05-26 19:09:27 +02:00
There are some rules for Ebitengine contribution.
2019-02-09 03:23:09 +01:00
2022-03-23 05:41:29 +01:00
## Filing an issue in the GitHub issue
2022-03-23 04:05:44 +01:00
2022-03-23 05:41:29 +01:00
File an issue in the GitHub issues, if you find a problem or have a feature request but this is not filed.
2022-03-23 04:05:44 +01:00
Except for very trivial fixes like fixing misspelling, it is a must to have an issue.
2019-11-03 07:23:33 +01:00
## Asking us when you are not sure
2019-02-09 03:23:09 +01:00
2022-05-26 19:09:27 +02:00
In Ebitengine, problems might not be documented very well in GitHub issues. Please ask us before you work on such issue.
2022-03-23 04:05:44 +01:00
You can ask us at these communities:
2022-05-26 19:09:27 +02:00
* [Ebitengine Discord Server](https://discord.gg/3tVdM5H8cC)
* `#ebitengine` channel in [Gophers Slack](https://invite.slack.golangbridge.org/)
* [GitHub Discussion](https://github.com/hajimehoshi/ebiten/discussions)
2019-02-09 03:23:09 +01:00
2019-11-03 07:23:33 +01:00
## Following the Go convention
2019-02-09 03:23:09 +01:00
Please follow the Go convension like [Effective Go](https://golang.org/doc/effective_go.html).
For example, formatting by `go fmt` is required.
2019-11-03 07:23:33 +01:00
## Adding copyright comments to each file
2019-02-09 03:23:09 +01:00
```go
2022-05-26 19:09:27 +02:00
// Copyright [YYYY] The Ebitengine Authors
2019-02-09 03:23:09 +01:00
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
```
You don't have to update existing files' license comments.
2019-11-03 07:23:33 +01:00
## Adding build tags for examples
2019-02-09 03:23:09 +01:00
```go
//go:build example
2020-10-06 17:45:54 +02:00
// +build example
2019-02-09 03:23:09 +01:00
```
2020-10-03 22:07:08 +02:00
`example` is to prevent from installing executions by `go get github.com/hajimehoshi/ebiten/v2/...`.
2019-02-09 03:23:09 +01:00
## Implementation details
2019-11-03 07:23:33 +01:00
2022-09-23 12:08:35 +02:00
See the [documents](https://ebitengine.org/en/documents/implementation.html) about internal implementation.
## Fixing the documentation
2022-09-23 12:08:35 +02:00
Ebitengine's documentations are managed at [ebiten/ebitengine.org](https://github.com/ebitengine/ebitengine.org).
2022-09-23 12:08:35 +02:00
Before submitting a documentation PR, read through the [README](https://github.com/ebitengine/ebitengine.org/blob/main/README.md) in that repo.