Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
616c181efc | ||
|
|
22969d0ae2 | ||
|
|
8d3c5f0100 |
7 changed files with 129 additions and 3 deletions
12
.editorconfig
Normal file
12
.editorconfig
Normal file
|
|
@ -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
|
||||||
22
.golangci.yml
Normal file
22
.golangci.yml
Normal file
|
|
@ -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
|
||||||
35
CONTRIBUTING.md
Normal file
35
CONTRIBUTING.md
Normal file
|
|
@ -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)**.
|
||||||
11
README.md
Normal file
11
README.md
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
[](https://pkg.go.dev/forge.lthn.ai/core/go-git)
|
||||||
|
[](LICENSE.md)
|
||||||
|
[](go.mod)
|
||||||
|
|
||||||
|
# go-git
|
||||||
|
|
||||||
|
Go module: `forge.lthn.ai/core/go-git`
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
[EUPL-1.2](LICENSE.md)
|
||||||
46
Taskfile.yml
Normal file
46
Taskfile.yml
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
version: '3'
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
test:
|
||||||
|
desc: Run all tests
|
||||||
|
cmds:
|
||||||
|
- go test ./...
|
||||||
|
|
||||||
|
lint:
|
||||||
|
desc: Run golangci-lint
|
||||||
|
cmds:
|
||||||
|
- golangci-lint run ./...
|
||||||
|
|
||||||
|
fmt:
|
||||||
|
desc: Format all Go files
|
||||||
|
cmds:
|
||||||
|
- gofmt -w .
|
||||||
|
|
||||||
|
vet:
|
||||||
|
desc: Run go vet
|
||||||
|
cmds:
|
||||||
|
- go vet ./...
|
||||||
|
|
||||||
|
build:
|
||||||
|
desc: Build all Go packages
|
||||||
|
cmds:
|
||||||
|
- go build ./...
|
||||||
|
|
||||||
|
cov:
|
||||||
|
desc: Run tests with coverage and open HTML report
|
||||||
|
cmds:
|
||||||
|
- go test -coverprofile=coverage.out ./...
|
||||||
|
- go tool cover -html=coverage.out
|
||||||
|
|
||||||
|
tidy:
|
||||||
|
desc: Tidy go.mod
|
||||||
|
cmds:
|
||||||
|
- go mod tidy
|
||||||
|
|
||||||
|
check:
|
||||||
|
desc: Run fmt, vet, lint, and test in sequence
|
||||||
|
cmds:
|
||||||
|
- task: fmt
|
||||||
|
- task: vet
|
||||||
|
- task: lint
|
||||||
|
- task: test
|
||||||
2
go.mod
2
go.mod
|
|
@ -3,7 +3,7 @@ module forge.lthn.ai/core/go-git
|
||||||
go 1.26.0
|
go 1.26.0
|
||||||
|
|
||||||
require (
|
require (
|
||||||
forge.lthn.ai/core/go v0.0.1
|
forge.lthn.ai/core/go v0.1.0
|
||||||
github.com/stretchr/testify v1.11.1
|
github.com/stretchr/testify v1.11.1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
4
go.sum
4
go.sum
|
|
@ -1,5 +1,5 @@
|
||||||
forge.lthn.ai/core/go v0.0.1 h1:ubk4nmkA3treOUNgPS28wKd1jB6cUlEQUV7jDdGa3zM=
|
forge.lthn.ai/core/go v0.1.0 h1:Ow/1NTajrrNPO0zgkskEyEGdx4SKpiNqTaqM0txNOYI=
|
||||||
forge.lthn.ai/core/go v0.0.1/go.mod h1:59YsnuMaAGQUxIhX68oK2/HnhQJEPWL1iEZhDTrNCbY=
|
forge.lthn.ai/core/go v0.1.0/go.mod h1:lwi0tccAlg5j3k6CfoNJEueBc5l9mUeSBX/x6uY8ZbQ=
|
||||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
||||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue