From bddea677c7728222b160f4a56c635f33e87121b8 Mon Sep 17 00:00:00 2001 From: Snider Date: Mon, 23 Feb 2026 06:45:56 +0000 Subject: [PATCH] chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) Co-Authored-By: Virgil --- .editorconfig | 12 ++++++++++++ .golangci.yml | 22 ++++++++++++++++++++++ CONTRIBUTING.md | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+) create mode 100644 .editorconfig create mode 100644 .golangci.yml create mode 100644 CONTRIBUTING.md diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..5ab5fb7a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +charset = utf-8 +indent_style = tab +indent_size = 4 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.{md,yml,yaml,json,txt}] +indent_style = space +indent_size = 2 diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 00000000..774475b9 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,22 @@ +run: + timeout: 5m + go: "1.26" + +linters: + enable: + - govet + - errcheck + - staticcheck + - unused + - gosimple + - ineffassign + - typecheck + - gocritic + - gofmt + disable: + - exhaustive + - wrapcheck + +issues: + exclude-use-default: false + max-same-issues: 0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..6b96297a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,35 @@ +# Contributing + +Thank you for your interest in contributing! + +## Requirements +- **Go Version**: 1.26 or higher is required. +- **Tools**: `golangci-lint` and `task` (Taskfile.dev) are recommended. + +## Development Workflow +1. **Testing**: Ensure all tests pass before submitting changes. + ```bash + go test ./... + ``` +2. **Code Style**: All code must follow standard Go formatting. + ```bash + gofmt -w . + go vet ./... + ``` +3. **Linting**: We use `golangci-lint` to maintain code quality. + ```bash + golangci-lint run ./... + ``` + +## Commit Message Format +We follow the [Conventional Commits](https://www.conventionalcommits.org/) specification: +- `feat`: A new feature +- `fix`: A bug fix +- `docs`: Documentation changes +- `refactor`: A code change that neither fixes a bug nor adds a feature +- `chore`: Changes to the build process or auxiliary tools and libraries + +Example: `feat: add new endpoint for health check` + +## License +By contributing to this project, you agree that your contributions will be licensed under the **European Union Public Licence (EUPL-1.2)**.