📝 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:
@@ -8,9 +8,9 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/go-playground/locales/en"
|
||||
en_translations "github.com/go-playground/validator/v10/translations/en"
|
||||
"github.com/go-playground/validator/v10"
|
||||
ut "github.com/go-playground/universal-translator"
|
||||
"github.com/go-playground/validator/v10"
|
||||
en_translations "github.com/go-playground/validator/v10/translations/en"
|
||||
)
|
||||
|
||||
// Validator wraps the go-playground/validator with custom error handling
|
||||
@@ -82,7 +82,7 @@ func (v *Validator) formatValidationErrors(errors validator.ValidationErrors) er
|
||||
|
||||
// Get custom error message
|
||||
message := fmt.Errorf("%s failed validation for '%s'", field, tag).Error()
|
||||
|
||||
|
||||
// Add parameter if available
|
||||
if param != "" {
|
||||
message += fmt.Sprintf(" (parameter: %s)", param)
|
||||
@@ -120,4 +120,4 @@ func GetValidatorFromConfig(cfg *config.Config) (*Validator, error) {
|
||||
// For now, config doesn't affect validator creation
|
||||
// But this allows future configuration (e.g., language, strict mode)
|
||||
return NewValidator()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user