6
0
mirror of https://github.com/grdl/git-get.git synced 2026-02-04 12:46:46 +00:00

Simplify linters config, fix cyclop issues in main.go

This commit is contained in:
Grzegorz Dlugoszewski
2025-08-24 14:29:56 +02:00
parent ccdca12f96
commit b31de718d4
3 changed files with 84 additions and 183 deletions

View File

@@ -296,40 +296,6 @@ git list --fetch
git list --out dump > backup-$(date +%Y%m%d).txt
```
## Testing
Run the test suite:
```bash
# Run all tests
go test ./...
# Run tests with coverage
go test -race -coverprofile=coverage.out ./...
go tool cover -html=coverage.out
# Run specific package tests
go test -v ./pkg/git
```
### Linting
This project uses comprehensive linting with golangci-lint. The linting configuration includes 25+ linters for code quality, security, and style checking.
```bash
# Install golangci-lint (if not already installed)
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
# Run linting with the project's configuration
golangci-lint run
# Run with verbose output
golangci-lint run -v
# Fix auto-fixable issues
golangci-lint run --fix
```
## Troubleshooting
### Common Issues
@@ -373,19 +339,51 @@ git get user/repo
We welcome contributions!
### Quick Start for Contributors
### Quick Start
1. **Fork the repository**
2. **Create a feature branch**: `git checkout -b feature/amazing-feature`
3. **Install dependencies**: `go mod download`
4. **Make changes and add tests**
5. **Format**: `go fmt ./...`
6. **Run tests**: `go test ./...`
7. **Run linter**: `golangci-lint run`
8. **Commit changes**: `git commit -m 'Add amazing feature'`
9. **Push to branch**: `git push origin feature/amazing-feature`
10. **Open a Pull Request**
6. **Build**: `go build -o git-get ./cmd/`
7. **Run tests**: `go test ./...`
8. **Run linter**: `golangci-lint run`
9. **Commit changes**: `git commit -m 'Add amazing feature'`
10. **Push to branch**: `git push origin feature/amazing-feature`
11. **Open a Pull Request**
### Testing
Run the test suite:
```bash
# Run all tests
go test ./...
# Run tests with coverage
go test -race -coverprofile=coverage.out ./...
go tool cover -html=coverage.out
# Run specific package tests
go test -v ./pkg/git
```
### Linting
```bash
# Install golangci-lint (if not already installed)
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
# Run linting with the project's configuration
golangci-lint run
# Run with verbose output
golangci-lint run -v
# Fix auto-fixable issues
golangci-lint run --fix
```
## License