Merge pull request '[agent/codex:gpt-5.4-mini] Read ~/spec/code/core/go/cli/RFC.md fully. Find ONE feature ...' (#35) from agent/read---spec-code-core-go-cli-rfc-md-full into dev
Some checks failed
Security Scan / security (push) Has been cancelled
Some checks failed
Security Scan / security (push) Has been cancelled
This commit is contained in:
commit
4ff7f16e34
4 changed files with 34 additions and 0 deletions
|
|
@ -26,6 +26,13 @@ func requiredChecks() []check {
|
||||||
args: []string{"--version"},
|
args: []string{"--version"},
|
||||||
versionFlag: "--version",
|
versionFlag: "--version",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: i18n.T("cmd.doctor.check.go.name"),
|
||||||
|
description: i18n.T("cmd.doctor.check.go.description"),
|
||||||
|
command: "go",
|
||||||
|
args: []string{"version"},
|
||||||
|
versionFlag: "version",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: i18n.T("cmd.doctor.check.gh.name"),
|
name: i18n.T("cmd.doctor.check.gh.name"),
|
||||||
description: i18n.T("cmd.doctor.check.gh.description"),
|
description: i18n.T("cmd.doctor.check.gh.description"),
|
||||||
|
|
|
||||||
22
cmd/core/doctor/cmd_checks_test.go
Normal file
22
cmd/core/doctor/cmd_checks_test.go
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
package doctor
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestRequiredChecksIncludesGo(t *testing.T) {
|
||||||
|
checks := requiredChecks()
|
||||||
|
|
||||||
|
var found bool
|
||||||
|
for _, c := range checks {
|
||||||
|
if c.command == "go" {
|
||||||
|
found = true
|
||||||
|
assert.Equal(t, "version", c.versionFlag)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.True(t, found, "required checks should include the Go compiler")
|
||||||
|
}
|
||||||
|
|
@ -11,10 +11,12 @@ import (
|
||||||
func printInstallInstructions() {
|
func printInstallInstructions() {
|
||||||
switch runtime.GOOS {
|
switch runtime.GOOS {
|
||||||
case "darwin":
|
case "darwin":
|
||||||
|
fmt.Printf(" %s\n", i18n.T("cmd.doctor.install_macos_go"))
|
||||||
fmt.Printf(" %s\n", i18n.T("cmd.doctor.install_macos"))
|
fmt.Printf(" %s\n", i18n.T("cmd.doctor.install_macos"))
|
||||||
fmt.Printf(" %s\n", i18n.T("cmd.doctor.install_macos_cask"))
|
fmt.Printf(" %s\n", i18n.T("cmd.doctor.install_macos_cask"))
|
||||||
case "linux":
|
case "linux":
|
||||||
fmt.Printf(" %s\n", i18n.T("cmd.doctor.install_linux_header"))
|
fmt.Printf(" %s\n", i18n.T("cmd.doctor.install_linux_header"))
|
||||||
|
fmt.Printf(" %s\n", i18n.T("cmd.doctor.install_linux_go"))
|
||||||
fmt.Printf(" %s\n", i18n.T("cmd.doctor.install_linux_git"))
|
fmt.Printf(" %s\n", i18n.T("cmd.doctor.install_linux_git"))
|
||||||
fmt.Printf(" %s\n", i18n.T("cmd.doctor.install_linux_gh"))
|
fmt.Printf(" %s\n", i18n.T("cmd.doctor.install_linux_gh"))
|
||||||
fmt.Printf(" %s\n", i18n.T("cmd.doctor.install_linux_php"))
|
fmt.Printf(" %s\n", i18n.T("cmd.doctor.install_linux_php"))
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,9 @@
|
||||||
"install_missing": "Install missing tools:",
|
"install_missing": "Install missing tools:",
|
||||||
"install_macos": "brew install",
|
"install_macos": "brew install",
|
||||||
"install_macos_cask": "brew install --cask",
|
"install_macos_cask": "brew install --cask",
|
||||||
|
"install_macos_go": "brew install go",
|
||||||
"install_linux_header": "Install on Linux:",
|
"install_linux_header": "Install on Linux:",
|
||||||
|
"install_linux_go": "sudo apt install golang-go",
|
||||||
"install_linux_git": "sudo apt install git",
|
"install_linux_git": "sudo apt install git",
|
||||||
"install_linux_node": "curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - && sudo apt install -y nodejs",
|
"install_linux_node": "curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - && sudo apt install -y nodejs",
|
||||||
"install_linux_php": "sudo apt install php php-cli php-mbstring php-xml php-curl",
|
"install_linux_php": "sudo apt install php php-cli php-mbstring php-xml php-curl",
|
||||||
|
|
@ -30,6 +32,7 @@
|
||||||
"no_repos_yaml": "No repos.yaml found (run from workspace root)",
|
"no_repos_yaml": "No repos.yaml found (run from workspace root)",
|
||||||
"check": {
|
"check": {
|
||||||
"git": { "name": "Git", "description": "Version control" },
|
"git": { "name": "Git", "description": "Version control" },
|
||||||
|
"go": { "name": "Go", "description": "Go compiler" },
|
||||||
"docker": { "name": "Docker", "description": "Container runtime" },
|
"docker": { "name": "Docker", "description": "Container runtime" },
|
||||||
"node": { "name": "Node.js", "description": "JavaScript runtime" },
|
"node": { "name": "Node.js", "description": "JavaScript runtime" },
|
||||||
"php": { "name": "PHP", "description": "PHP interpreter" },
|
"php": { "name": "PHP", "description": "PHP interpreter" },
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue