Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update guidelines #496

Merged
merged 33 commits into from
Apr 25, 2022
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
5d4d611
IDE setup guide
seeforschauer Apr 20, 2022
a56e316
beloved editor
seeforschauer Apr 20, 2022
922cf8b
review
seeforschauer Apr 20, 2022
7af9403
https://sembr.org
seeforschauer Apr 20, 2022
9b65776
added 1-1 calls reminder
seeforschauer Apr 20, 2022
bfc3149
fmt
seeforschauer Apr 20, 2022
3503584
fmt
seeforschauer Apr 20, 2022
faf63ae
on sentence per line
seeforschauer Apr 20, 2022
aeb0baf
added pre-hook-commit description
seeforschauer Apr 20, 2022
cf64074
remove obvious from doc
seeforschauer Apr 20, 2022
e8e468b
sembr for processes
seeforschauer Apr 20, 2022
f2badbc
Update CONTRIBUTING.md
seeforschauer Apr 20, 2022
f1a864d
Update .github/PROCESS.md
seeforschauer Apr 20, 2022
e4e9c44
added mentioning of docs-fmt and fmt lint tasks
seeforschauer Apr 20, 2022
41f91c8
Merge branch 'main' into ide-setup
seeforschauer Apr 20, 2022
ce87bd7
separated
seeforschauer Apr 20, 2022
8ca6816
tests grouping
seeforschauer Apr 20, 2022
f415895
remove prev
seeforschauer Apr 20, 2022
7b61a0e
automate
seeforschauer Apr 20, 2022
594eda2
Merge branch 'main' into ide-setup
AlekSi Apr 21, 2022
e305015
Merge branch 'main' into ide-setup
AlekSi Apr 21, 2022
9c348b9
Merge branch 'main' into ide-setup
seeforschauer Apr 25, 2022
932cfa4
changes
seeforschauer Apr 22, 2022
119834c
more story, connected text
seeforschauer Apr 22, 2022
9968b18
wip
seeforschauer Apr 25, 2022
e903a03
gramarly process
seeforschauer Apr 25, 2022
68963a0
corrections
seeforschauer Apr 25, 2022
9b6e85e
clarity
seeforschauer Apr 25, 2022
abb448a
clarity
seeforschauer Apr 25, 2022
6d27416
Merge branch 'main' into ide-setup
AlekSi Apr 25, 2022
cc27c95
process fixes
seeforschauer Apr 25, 2022
eff468f
fmt
seeforschauer Apr 25, 2022
e8c294f
fix
seeforschauer Apr 25, 2022
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
7 changes: 7 additions & 0 deletions .github/PROCESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,10 @@ We will do all that for you so you can focus on what is really interesting for y
All commits are squashed on merge.
Autogenerated squash commit's title and body should be manually replaced by PR's title and description; that includes both manual merges and auto-merges.
Do not leave original commit messages in the squashed commit body.

## Calls `to show and/or to explain`
AlekSi marked this conversation as resolved.
Show resolved Hide resolved

Having a call with someone explaining something what you already know and sharing knowledge with someone else, please multiply this knowledge to the benefit of others by writing a detailed article about the topic.
Single 1-1 calls are good to check what you might have missed in the way - what seemed to you obvious and to other is not.

Please also gather other people ideas since diversity and different opinoins expand our understanding and vision of the project.
seeforschauer marked this conversation as resolved.
Show resolved Hide resolved
48 changes: 48 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,54 @@ git remote add upstream https://github.com/FerretDB/FerretDB.git

### Setting up the development environment

In the CI there are checks that new code complies the imports sorted convention and that the code is gofmt-ed.
seeforschauer marked this conversation as resolved.
Show resolved Hide resolved
To avoid failing PR checks, please setup your beloved text editor to gofmt files before push. Here provided some setup guides for VScode and Goland.
You can also execute each time `task fmt lint`, run project -> fmt functions of the text editor or place in the `.git/hooks/pre-commit` file

```shell
#!/bin/sh

exec task docs-fmt fmt lint
```

AlekSi marked this conversation as resolved.
Show resolved Hide resolved
Please make sure your *.md files comply with <https://sembr.org>.
You could also run `task docs-fmt`.

### Visual Studio Code

Follow [`vscode guideline`](https://code.visualstudio.com/docs/languages/go),
Setting example:

```json
"go.testOnSave": true,
"go.testFlags": [
"-v"
],
"go.toolsEnvVars": {
"GO111MODULE": "on"
},
"go.formatTool": "goimports",
"go.lintOnSave": "package",
"go.toolsManagement.autoUpdate": true,
"[go]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "golang.go",
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
```

### Goland

* `Preferences -> Tools -> File watchers`
* Click on the Add button and choose go fmt
* Click on the OK button to enable it

Do same with go imports.

### Run

To run development commands, you should first install the [`task`](https://taskfile.dev/) tool.
You can do this by changing the directory to `tools` (`cd tools`) and running `go generate -x`.
That will install `task` into the `bin` directory (`bin/task` on Linux and macOS, `bin\task.exe` on Windows).
Expand Down