ebiten/CONTRIBUTING.md

66 lines
2.2 KiB
Markdown
Raw Normal View History

2019-02-09 03:23:09 +01:00
# Contributing to Ebiten
2021-06-25 17:47:46 +02:00
Ebiten is an open source project and we appreciate your contributions!
2019-02-09 03:23:09 +01:00
There are some rules for Ebiten contribution.
2022-03-23 04:05:44 +01:00
## Creating an issue in the GitHub issue
Create an issue in the GitHub issues if you find an issue but this is not there.
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-03-23 04:05:44 +01:00
In Ebiten, problems might not be documented very well in GitHub issues. Please ask us before you work on such issue.
You can ask us at these communities:
* [Ebiten Discord Server](https://discord.gg/3tVdM5H8cC)
* `#ebiten` 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
// Copyright [YYYY] The Ebiten Authors
//
// 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
2020-01-19 17:18:00 +01:00
See the [documents](https://ebiten.org/documents/implementation.html) about internal implementation.
## Fixing the documentation
Ebiten's documentations are managed at [ebiten/ebiten.org](https://github.com/ebiten/ebiten.org).
Before submitting a documentation PR, read through the [README](https://github.com/ebiten/ebiten.org/blob/main/README.md) in that repo.