Skip to content

Tags: dangazineu/tako

Tags

v0.2.0

Toggle v0.2.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
refactor: restrict flag and environment variable parsing to cmd packa…

…ges (#92)

This change implements proper separation of concerns by restricting flag
and environment variable parsing to cmd packages only, with internal
packages receiving parsed values as parameters.

## Summary

- Added comprehensive linter tests to enforce restriction of flag/env
parsing to cmd packages
- Refactored `internal/git` functions to accept `workingDir` and
`homeDir` parameters instead of calling `os.Getwd()` and
`os.UserHomeDir()`
- Updated cmd packages to get system paths and pass them to internal
packages
- Maintained backward compatibility and functionality
- Enhanced code architecture with proper dependency injection

## Changes Made

- **linter_test.go**: Added `TestNoEnvironmentVariableAccess` and
`TestNoFlagParsingAccess` to enforce the restriction
- **internal/git/git.go**: Refactored `GetEntrypointPath` and
`GetRepoPath` to accept `workingDir` and `homeDir` parameters
- **internal/graph/graph.go**: Updated `BuildGraph` to accept and pass
`homeDir` parameter
- **cmd/tako/internal/{validate,run,graph}.go**: Updated to get system
paths via `os.Getwd()` and `os.UserHomeDir()` and pass them to internal
packages
- **Test files**: Updated function signatures to match new parameters

Fixes #82

v0.1.0

Toggle v0.1.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
docs: align README.md with the current implementation (#79)

The `README.md` file is currently out of sync with the project's
implementation. This leads to confusion for new users and makes it
difficult to understand the project's actual state. This change updates
the documentation to accurately reflect the implemented features and
configuration schema.

This is a sub-task of the main documentation issue #39.

### Tasks

1. **Update Core Commands List:** Modify the "Command-Line Interface
(CLI)" section to show which commands are implemented (`version`,
`graph`, `cache`, `completion`, `validate`) and which are planned.
2. **Rename `doctor` to `validate`:** Replace all mentions of the `tako
doctor` command with `tako validate` and update its description to match
its current, more limited scope (validating `tako.yml` syntax).
3. **Remove Implementation Plan:** The milestones in the implementation
plan are now covered by GitHub issues and milestones. Delete this from
the readme file.

Fixes: #75