indiana91 / indiana91/devstandup
Add Unit Tests for Git Analyzer
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Write unit tests for the `internal/git/analyzer.go` file to ensure commit analysis works correctly.
**Tasks:**
- [ ] Create `analyzer_test.go` file
- [ ] Write test for parsing commit messages
- [ ] Write test for calculating statistics (additions, deletions)
- [ ] Write test for filtering commits by date range
- [ ] Write test for filtering commits by author
- [ ] Achieve at least 80% code coverage
**Acceptance Criteria:**
- All tests pass with `go test ./internal/git/...`
- Code coverage is at least 80%
- Tests include edge cases (empty repos, no commits, etc.)
**Resources:**
- Go Testing: https://go.dev/doc/tutorial/add-a-test
- Table-driven tests: https://go.dev/wiki/TableDrivenTests
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading internal/git/analyzer.go and identify the commit parsing, statistics, date filtering, and author filtering paths. Create internal/git/analyzer_test.go with table-driven and edge-case tests, then run go test ./internal/git/... and verify coverage reaches at least 80%.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, testing-qa
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100