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

chore: add .editorconfig #30

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
"vscode": {
"extensions": [
"golang.go",
"github.vscode-github-actions"
"github.vscode-github-actions",
"EditorConfig.EditorConfig"
]
}
}
}
}
34 changes: 34 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines and whitespace cleanup
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
insert_final_newline = true

# Protect whitespace in markdown files
[*.md]
trim_trailing_whitespace = false

# general formatting
[*.{bash,go,sh,zsh,justfile,Makefile}]
indent_style = tab
indent_size = 4

# Set default charset
[*.{html,xml,js,css,py}]
charset = utf-8

# python
[*.py]
indent_style = space
indent_size = 4

# webdev et al
[*.{html,xml,js,css,json,jsonc,gql,lua,tf,tfvars,yml,yaml}]
indent_style = space
indent_size = 2
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ change.
Gruyere is written in Go. You'll need to install the [Go toolchain](https://go.dev/doc/install) for development.

### Development

The easiest way to get set up with everything you need is to work in a Dev Container or in GitHub Codespaces. The Gruyere repo includes a [Dev Container](https://containers.dev/) configuration. By opening the repo in a Dev Container, you will have all tools/dependencies installed for you for easy contributing.

> If you already have Visual Studio Code and Docker installed, you can install the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) and then use the **Dev Containers: Clone Repository in Container Volume...** command to open your fork. If you are using GitHub Codespaces, the environment will be automatically set up for you as the container is built.

If you'd like to use another editor/IDE, just create a fork + clone the repo!

Be sure to add EditorConfig if you aren't using the Dev Container. This will help you maintain consistent formatting across the project.

## Adding yourself to the contributors listed in the Gruyere README

If you'd like to be included in the list of contributors, you can follow [these instructions](https://allcontributors.org/docs/en/bot/usage) to do so!