📝 docs: add ADR for staged-only Git hooks formatting

- Add ADR-0012 documenting the decision to format only staged Go files
- Update ADR README.md with new entry
- Document rationale, alternatives, and verification results
- Include future considerations for monitoring and CI/CD integration

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
2026-04-04 21:36:57 +02:00
parent 371dee01d5
commit 9336178d73
18 changed files with 483 additions and 47 deletions

View File

@@ -48,14 +48,14 @@ func (sc *StepContext) iRequestTheHealthEndpoint() error {
func (sc *StepContext) theResponseShouldBe(arg1, arg2 string) error {
// The regex captures the full JSON from the feature file, including quotes
// We need to extract just the key and value without the surrounding quotes and backslashes
// Remove the surrounding quotes and backslashes
cleanArg1 := strings.Trim(arg1, `"\`)
cleanArg2 := strings.Trim(arg2, `"\`)
// Build the expected JSON string
expected := fmt.Sprintf(`{"%s":"%s"}`, cleanArg1, cleanArg2)
return sc.client.ExpectResponseBody(expected)
}
@@ -70,7 +70,7 @@ func (sc *StepContext) theServerIsRunningWithV2Enabled() error {
if err := sc.client.Request("GET", "/api/ready", nil); err != nil {
return err
}
// Check if v2 endpoint is available (should return 405 Method Not Allowed for GET, which means endpoint exists)
// If v2 is disabled, this will return 404
resp, err := sc.client.CustomRequest("GET", "/api/v2/greet", nil)
@@ -78,13 +78,13 @@ func (sc *StepContext) theServerIsRunningWithV2Enabled() error {
return err
}
defer resp.Body.Close()
// If we get 405, v2 is enabled (endpoint exists but doesn't allow GET)
// If we get 404, v2 is disabled
if resp.StatusCode == 404 {
return fmt.Errorf("v2 endpoint not available - v2 feature flag not enabled")
}
return nil
}