From 215e2937743892686dafa11b4783a2aee4def7a6 Mon Sep 17 00:00:00 2001 From: "F." Date: Thu, 18 Dec 2025 10:04:45 +0100 Subject: [PATCH 1/3] chore(docs): configure cspell/markdownlint and expand pre-commit; refresh docs - Add cspell custom dictionary and extend cspell.config.yaml (ignorePaths, dictionaryDefinitions, and words) to cover project-specific terms. - Introduce markdownlint config (.mdlrc, .mdl_style.rb) for consistent MD style. - Update .pre-commit-config.yaml: add check-merge-conflict, check-json, pretty-format-json, mixed-line-ending; scope/tune check-yaml; add requirements-txt-fixer and no-commit-to-branch. - Normalize and reword documentation across docs/* and README.md (ordered lists, headings, examples, and terminology). - Adjust docs/requirements.txt dependency pinning for mkdocs-material. Rationale: improve docs quality and consistency; enforce formatting and spelling in CI/pre-commit; reduce noise from false positives. --- .cspell/custom-dictionary.txt | 9 ++++ .mdl_style.rb | 7 +++ .mdlrc | 1 + .pre-commit-config.yaml | 7 +++ README.md | 18 +++---- cspell.config.yaml | 66 ++++++++++++++++++++++++- docs/docs/advanced/error-strategies.md | 2 +- docs/docs/advanced/error-types.md | 6 +-- docs/docs/advanced/performance.md | 12 ++--- docs/docs/api/overview.md | 22 ++++----- docs/docs/features/circuit-breaker.md | 4 +- docs/docs/features/error-creation.md | 12 ++--- docs/docs/features/error-groups.md | 42 ++++++++-------- docs/docs/features/observability.md | 14 +++--- docs/docs/features/stack-traces.md | 18 +++---- docs/docs/getting-started/quickstart.md | 16 +++--- docs/docs/index.md | 22 ++++----- docs/requirements.txt | 2 +- 18 files changed, 183 insertions(+), 97 deletions(-) create mode 100644 .cspell/custom-dictionary.txt create mode 100644 .mdl_style.rb create mode 100644 .mdlrc diff --git a/.cspell/custom-dictionary.txt b/.cspell/custom-dictionary.txt new file mode 100644 index 0000000..ae38da6 --- /dev/null +++ b/.cspell/custom-dictionary.txt @@ -0,0 +1,9 @@ +# Custom Dictionary Words +Errorf +goexit +golangci +myapp +Println +retryable +Retryable +uintptr diff --git a/.mdl_style.rb b/.mdl_style.rb new file mode 100644 index 0000000..ad9dbe0 --- /dev/null +++ b/.mdl_style.rb @@ -0,0 +1,7 @@ +all +# Parameters: line_length, ignore_code_blocks, code_blocks, tables (number; default 80, boolean; default false, boolean; default true, boolean; default true) +exclude_rule 'MD013' +# default in next version, remove then +rule 'MD007', :indent => 3 + +rule "MD029", style => "one" diff --git a/.mdlrc b/.mdlrc new file mode 100644 index 0000000..1f82ca2 --- /dev/null +++ b/.mdlrc @@ -0,0 +1 @@ +style '.mdl_style.rb' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fcc5c08..e20b73c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,11 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: + - id: check-merge-conflict + - id: check-json + - id: pretty-format-json - id: end-of-file-fixer + - id: mixed-line-ending - id: trailing-whitespace - id: mixed-line-ending - id: fix-byte-order-marker @@ -12,7 +16,10 @@ repos: - id: debug-statements - id: check-yaml files: .*\.(yaml|yml)$ + exclude: mkdocs.yml args: [--allow-multiple-documents] + - id: requirements-txt-fixer + - id: no-commit-to-branch - repo: https://github.com/adrienverge/yamllint.git rev: v1.37.1 hooks: diff --git a/README.md b/README.md index 2c6d43a..62e80e3 100644 --- a/README.md +++ b/README.md @@ -405,7 +405,7 @@ ewrap.RegisterGlobalObserver(myObserver) git clone https://github.com/hyp3rd/ewrap.git ``` -2. Install VS Code Extensions Recommended (optional): +1. Install VS Code Extensions Recommended (optional): ```json { @@ -424,15 +424,15 @@ ewrap.RegisterGlobalObserver(myObserver) ``` 1. Install [**Golang**](https://go.dev/dl). - 2. Install [**GitVersion**](https://github.com/GitTools/GitVersion). - 3. Install [**Make**](https://www.gnu.org/software/make/), follow the procedure for your OS. - 4. **Set up the toolchain:** + 1. Install [**GitVersion**](https://github.com/GitTools/GitVersion). + 1. Install [**Make**](https://www.gnu.org/software/make/), follow the procedure for your OS. + 1. **Set up the toolchain:** ```bash make prepare-toolchain ``` - 5. Initialize `pre-commit` (strongly recommended to create a virtual env, using for instance [PyEnv](https://github.com/pyenv/pyenv)) and its hooks: + 1. Initialize `pre-commit` (strongly recommended to create a virtual env, using for instance [PyEnv](https://github.com/pyenv/pyenv)) and its hooks: ```bash pip install pre-commit @@ -477,10 +477,10 @@ ewrap.RegisterGlobalObserver(myObserver) ## Contributing 1. Fork the repository -2. Create your feature branch -3. Commit your changes -4. Push to the branch -5. Create a Pull Request +1. Create your feature branch +1. Commit your changes +1. Push to the branch +1. Create a Pull Request Refer to [CONTRIBUTING](CONTRIBUTING.md) for more information. diff --git a/cspell.config.yaml b/cspell.config.yaml index b084e8d..4acac80 100644 --- a/cspell.config.yaml +++ b/cspell.config.yaml @@ -1,5 +1,30 @@ version: "0.2" -ignorePaths: [] +ignorePaths: + - go.mod + - go.sum + - Makefile + - .golangci-lint.yml + - .golangci.yaml + - Dockerfile + - .gitignore + - .dockerignore + - "*.pb.*" + - "*.sql" + - "*.svg" + - docker/* + - "*.excalidraw" + - .vscode/* + - azdo/pipelines/* + - scripts/* + - .github/workflows/* + - .github/* + - .idea/* + - .DS_Store + - "*.hcl" + - "*.env" + - "*.http" + - compose.*.yaml + - docs/mkdocs.yml dictionaryDefinitions: - name: custom-dictionary path: ./.cspell/custom-dictionary.txt @@ -9,25 +34,62 @@ dictionaries: words: - Atoi - codacy + - daixiang + - eamodio - EDITMSG - embeddedstructfieldcheck + - emperror + - errname + - esbenp + - ewrap + - excalidraw - excludeonly - exhaustruct - Fprintf - Fprintln + - Getenv + - gocache + - goccy - gofiber + - GOFILES - golines - gomod + - goroutines + - GOPATH + - GOTOOLCHAIN - govulncheck + - httptest - ints + - keyval + - loadtest - localmodule + - logrus + - milli + - mkdocs + - multierr + - multierror + - Newf + - nolint + - omitempty + - pbkit + - popd + - pushd + - Reqs - recvcheck - - goccy - sarif - securego + - shellcheck + - sirupsen + - staticcheck + - stretchr - strconv - strs - tagalign + - testuser + - toplevel - vettool + - Wrapf + - zaptest + - zerolog ignoreWords: [] import: [] diff --git a/docs/docs/advanced/error-strategies.md b/docs/docs/advanced/error-strategies.md index 53d0644..15aba44 100644 --- a/docs/docs/advanced/error-strategies.md +++ b/docs/docs/advanced/error-strategies.md @@ -214,7 +214,7 @@ When handling errors, consider implementing recovery strategies: } ``` -2. **Retry Patterns**: +1. **Retry Patterns**: ```go func withRetry(operation func() error, maxAttempts int, delay time.Duration) error { diff --git a/docs/docs/advanced/error-types.md b/docs/docs/advanced/error-types.md index 53c10f0..0c9d243 100644 --- a/docs/docs/advanced/error-types.md +++ b/docs/docs/advanced/error-types.md @@ -7,9 +7,9 @@ Error types in ewrap provide a structured way to categorize and handle different Error types serve multiple purposes: 1. They help categorize errors meaningfully -2. They enable consistent error handling across your application -3. They facilitate automated error processing and reporting -4. They guide recovery strategies and user feedback +1. They enable consistent error handling across your application +1. They facilitate automated error processing and reporting +1. They guide recovery strategies and user feedback Let's explore the built-in error types and learn how to use them effectively: diff --git a/docs/docs/advanced/performance.md b/docs/docs/advanced/performance.md index fa57714..4688d56 100644 --- a/docs/docs/advanced/performance.md +++ b/docs/docs/advanced/performance.md @@ -7,10 +7,10 @@ Understanding how to optimize error handling is crucial for maintaining high-per When we talk about performance in error handling, we need to consider several aspects: 1. Memory allocation and garbage collection impact -2. CPU overhead from stack trace capture -3. Concurrency and contention in high-throughput scenarios -4. The cost of error formatting and logging -5. The impact of error wrapping chains +1. CPU overhead from stack trace capture +1. Concurrency and contention in high-throughput scenarios +1. The cost of error formatting and logging +1. The impact of error wrapping chains Let's explore how ewrap addresses each of these concerns and how you can optimize your error handling. @@ -44,8 +44,8 @@ func processItems(items []Item) error { This approach is particularly effective because: 1. It reduces garbage collection pressure -2. It minimizes memory fragmentation -3. It provides predictable memory usage patterns +1. It minimizes memory fragmentation +1. It provides predictable memory usage patterns ### Pre-allocation Strategies diff --git a/docs/docs/api/overview.md b/docs/docs/api/overview.md index a550cca..e069172 100644 --- a/docs/docs/api/overview.md +++ b/docs/docs/api/overview.md @@ -7,10 +7,10 @@ The ewrap package provides a sophisticated error handling solution for Go applic ewrap is built on several key principles: 1. **Rich Context**: Errors should carry enough information to understand what went wrong, where, and why -2. **Performance**: Error handling shouldn't become a bottleneck in your application -3. **Developer Experience**: Clear, consistent patterns that make error handling both powerful and approachable -4. **Flexibility**: Easy integration with existing systems and adaptable to different needs -5. **Production Readiness**: Built-in support for logging, monitoring, and debugging +1. **Performance**: Error handling shouldn't become a bottleneck in your application +1. **Developer Experience**: Clear, consistent patterns that make error handling both powerful and approachable +1. **Flexibility**: Easy integration with existing systems and adaptable to different needs +1. **Production Readiness**: Built-in support for logging, monitoring, and debugging ## Component Architecture @@ -159,9 +159,9 @@ func processItems(items []Item) error { The package includes several optimizations: 1. **Memory Pooling**: Reduces allocation overhead -2. **Lock-Free Operations**: Where possible, for better concurrency -3. **Efficient Stack Traces**: Captures only necessary frames -4. **Lazy Formatting**: Defers expensive string operations +1. **Lock-Free Operations**: Where possible, for better concurrency +1. **Efficient Stack Traces**: Captures only necessary frames +1. **Lazy Formatting**: Defers expensive string operations ## Best Practices @@ -175,25 +175,25 @@ To get the most out of ewrap: ErrorTypeNetwork // For network operations ``` -2. **Leverage Context**: Add relevant context to errors: +1. **Leverage Context**: Add relevant context to errors: ```go ewrap.WithContext(ctx, errorType, severity) ``` -3. **Implement Proper Logging**: Use structured logging for better debugging: +1. **Implement Proper Logging**: Use structured logging for better debugging: ```go ewrap.WithLogger(logger) ``` -4. **Use Error Groups Efficiently**: Pool error groups for better performance: +1. **Use Error Groups Efficiently**: Pool error groups for better performance: ```go pool := ewrap.NewErrorGroupPool(size) ``` -5. **Handle Circuit Breaking**: Protect your system from cascading failures: +1. **Handle Circuit Breaking**: Protect your system from cascading failures: ```go breaker := ewrap.NewCircuitBreaker(name, maxFailures, timeout) diff --git a/docs/docs/features/circuit-breaker.md b/docs/docs/features/circuit-breaker.md index 7bc12be..309e04e 100644 --- a/docs/docs/features/circuit-breaker.md +++ b/docs/docs/features/circuit-breaker.md @@ -7,8 +7,8 @@ The Circuit Breaker pattern is like a safety switch in an electrical system - it Imagine you're calling a database service. Without a circuit breaker, if the database becomes slow or unresponsive, your application might: 1. Keep trying and failing -2. Accumulate resource-consuming connections -3. Eventually crash or become unresponsive itself +1. Accumulate resource-consuming connections +1. Eventually crash or become unresponsive itself A circuit breaker prevents this by monitoring failures and automatically stopping attempts when a threshold is reached, giving the system time to recover. diff --git a/docs/docs/features/error-creation.md b/docs/docs/features/error-creation.md index 77d3730..d74bac7 100644 --- a/docs/docs/features/error-creation.md +++ b/docs/docs/features/error-creation.md @@ -74,7 +74,7 @@ When creating errors, follow these guidelines for maximum effectiveness: err := ewrap.New("database error") ``` -2. **Include Relevant Context**: Add context that helps with debugging: +1. **Include Relevant Context**: Add context that helps with debugging: ```go err := ewrap.New("failed to update user profile", @@ -83,7 +83,7 @@ When creating errors, follow these guidelines for maximum effectiveness: WithMetadata("fields_updated", fields) ``` -3. **Use Appropriate Error Types**: Choose error types that match the situation: +1. **Use Appropriate Error Types**: Choose error types that match the situation: ```go // For validation errors @@ -95,7 +95,7 @@ When creating errors, follow these guidelines for maximum effectiveness: ewrap.WithContext(ctx, ewrap.ErrorTypeDatabase, ewrap.SeverityCritical)) ``` -4. **Consider Recovery Options**: Include information that helps with recovery: +1. **Consider Recovery Options**: Include information that helps with recovery: ```go err := ewrap.New("rate limit exceeded", @@ -178,8 +178,8 @@ func processItems(items []string) []error { Error creation in ewrap is optimized for both CPU and memory usage. However, consider these performance tips: 1. Reuse error types for common errors instead of creating new ones -2. Only capture stack traces when necessary -3. Be mindful of metadata quantity in high-throughput scenarios -4. Use error pools for frequent error creation scenarios +1. Only capture stack traces when necessary +1. Be mindful of metadata quantity in high-throughput scenarios +1. Use error pools for frequent error creation scenarios Remember: error creation should be reserved for exceptional cases. Don't use errors for normal control flow in your application. diff --git a/docs/docs/features/error-groups.md b/docs/docs/features/error-groups.md index 42bb1ab..fc61c1d 100644 --- a/docs/docs/features/error-groups.md +++ b/docs/docs/features/error-groups.md @@ -218,7 +218,7 @@ The pooled Error Group implementation is designed for high performance, but ther pool := ewrap.NewErrorGroupPool(4) // If you typically expect 1-4 errors ``` -2. **Release Groups Properly**: +1. **Release Groups Properly**: ```go func processWithErrors() error { @@ -231,7 +231,7 @@ The pooled Error Group implementation is designed for high performance, but ther } ``` -3. **Reuse Pools**: +1. **Reuse Pools**: ```go // Good: Create pool once and reuse @@ -262,7 +262,7 @@ The pooled Error Group implementation is designed for high performance, but ther defer eg.Release() ``` -2. **Size Pools Appropriately**: +1. **Size Pools Appropriately**: Choose pool sizes based on your expected error cases: ```go @@ -270,27 +270,27 @@ The pooled Error Group implementation is designed for high performance, but ther pool := ewrap.NewErrorGroupPool(len(validationRules)) ``` -3. **Handle Nested Operations**: -When dealing with nested operations, manage Error Groups carefully: +1. **Handle Nested Operations**: + When dealing with nested operations, manage Error Groups carefully: -```go -func processComplex() error { - outerPool := ewrap.NewErrorGroupPool(2) - outerGroup := outerPool.Get() - defer outerGroup.Release() + ```go + func processComplex() error { + outerPool := ewrap.NewErrorGroupPool(2) + outerGroup := outerPool.Get() + defer outerGroup.Release() - for _, item := range items { - innerPool := ewrap.NewErrorGroupPool(4) - innerGroup := innerPool.Get() + for _, item := range items { + innerPool := ewrap.NewErrorGroupPool(4) + innerGroup := innerPool.Get() - // Process with inner group... + // Process with inner group... - if err := innerGroup.Error(); err != nil { - outerGroup.Add(err) + if err := innerGroup.Error(); err != nil { + outerGroup.Add(err) + } + innerGroup.Release() } - innerGroup.Release() - } - return outerGroup.Error() -} -``` + return outerGroup.Error() + } + ``` diff --git a/docs/docs/features/observability.md b/docs/docs/features/observability.md index 2aaf4ca..0946ce4 100644 --- a/docs/docs/features/observability.md +++ b/docs/docs/features/observability.md @@ -341,20 +341,20 @@ func (p *PrometheusObserver) OnCircuitBreakerStateChange(name string, from, to C ### Performance Considerations 1. **Lightweight Observers**: Keep observer implementations fast to avoid impacting error handling performance -2. **Async Processing**: Use goroutines for expensive operations in observers -3. **Buffered Channels**: Use buffered channels for high-throughput scenarios +1. **Async Processing**: Use goroutines for expensive operations in observers +1. **Buffered Channels**: Use buffered channels for high-throughput scenarios ### Monitoring Strategy 1. **Error Rate Monitoring**: Track error rates by type and severity -2. **Circuit Breaker Health**: Monitor state transitions and success rates -3. **Recovery Effectiveness**: Analyze which recovery suggestions are most common -4. **Performance Impact**: Monitor the overhead of observability features +1. **Circuit Breaker Health**: Monitor state transitions and success rates +1. **Recovery Effectiveness**: Analyze which recovery suggestions are most common +1. **Performance Impact**: Monitor the overhead of observability features ### Alert Configuration 1. **Error Spikes**: Alert on sudden increases in error rates -2. **Circuit Breaker Openings**: Immediate alerts when services become unavailable -3. **Recovery Pattern Changes**: Notify when new types of errors appear frequently +1. **Circuit Breaker Openings**: Immediate alerts when services become unavailable +1. **Recovery Pattern Changes**: Notify when new types of errors appear frequently The observability features in ewrap provide deep insights into your application's error patterns and system health, enabling proactive monitoring and faster incident response. diff --git a/docs/docs/features/stack-traces.md b/docs/docs/features/stack-traces.md index 244f74b..9247488 100644 --- a/docs/docs/features/stack-traces.md +++ b/docs/docs/features/stack-traces.md @@ -30,9 +30,9 @@ The captured stack trace includes: However, ewrap goes beyond simple capture by: 1. Filtering out runtime implementation details -2. Maintaining stack traces through error wrapping -3. Providing formatted output options -4. Offering programmatic access through iterators +1. Maintaining stack traces through error wrapping +1. Providing formatted output options +1. Offering programmatic access through iterators ## Programmatic Stack Frame Access @@ -210,9 +210,9 @@ func processOrder(orderID string) error { While stack traces are valuable for debugging, they do come with some overhead. ewrap optimizes this by: 1. Using efficient stack capture mechanisms -2. Implementing lazy formatting -3. Caching stack trace strings -4. Filtering irrelevant frames early +1. Implementing lazy formatting +1. Caching stack trace strings +1. Filtering irrelevant frames early Here's how to work with stack traces efficiently: @@ -276,7 +276,7 @@ func debugError(err error) { } ``` -2. **Combine with Logging** +1. **Combine with Logging** Integrate stack traces with your logging system: @@ -291,7 +291,7 @@ func debugError(err error) { } ``` -3. **Use in Development and Testing** +1. **Use in Development and Testing** Stack traces are particularly valuable during development and testing: @@ -320,7 +320,7 @@ func debugError(err error) { WithMetadata("operation", "user_update") ``` -2. **Missing Context** +1. **Missing Context** Ensure you're capturing relevant context with your stack traces: diff --git a/docs/docs/getting-started/quickstart.md b/docs/docs/getting-started/quickstart.md index b8e0a3d..7dc52bd 100644 --- a/docs/docs/getting-started/quickstart.md +++ b/docs/docs/getting-started/quickstart.md @@ -75,20 +75,20 @@ if cb.CanExecute() { Now that you understand the basics, you can: 1. Learn about [Error Types](../features/error-types.md) -2. Explore [Logging Integration](../features/logging.md) -3. Study [Advanced Usage](../advanced/performance.md) -4. Check out complete [Examples](../examples/basic.md) +1. Explore [Logging Integration](../features/logging.md) +1. Study [Advanced Usage](../advanced/performance.md) +1. Check out complete [Examples](../examples/basic.md) ## Best Practices Here are some best practices to follow when using ewrap: 1. Always provide meaningful error messages -2. Use appropriate error types and severity levels -3. Release error groups back to their pools -4. Configure circuit breakers based on your system's characteristics -5. Implement proper logging integration -6. Use metadata to add relevant debugging information +1. Use appropriate error types and severity levels +1. Release error groups back to their pools +1. Configure circuit breakers based on your system's characteristics +1. Implement proper logging integration +1. Use metadata to add relevant debugging information ## Common Patterns diff --git a/docs/docs/index.md b/docs/docs/index.md index d7e73dc..d503af2 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -89,27 +89,27 @@ func processOrder(ctx context.Context, orderID string) error { To start using ewrap in your project, visit the [Installation](getting-started/installation.md) guide, followed by the [Quick Start](getting-started/quickstart.md) tutorial. -## Why ewrap? +## Why ewrap ewrap was created to address common challenges in modern Go error handling: ### Traditional Challenges Solved 1. **Context Loss**: Traditional error handling often loses important context during error propagation -2. **Performance Overhead**: Many error handling libraries introduce significant memory and CPU overhead -3. **Memory Management**: Poor memory management in error handling leads to increased GC pressure -4. **Inconsistent Logging**: Different parts of applications handle error logging differently -5. **Missing Stack Traces**: Getting meaningful, filterable stack traces is challenging -6. **Circuit Breaking**: Protecting systems from cascading failures requires complex implementation +1. **Performance Overhead**: Many error handling libraries introduce significant memory and CPU overhead +1. **Memory Management**: Poor memory management in error handling leads to increased GC pressure +1. **Inconsistent Logging**: Different parts of applications handle error logging differently +1. **Missing Stack Traces**: Getting meaningful, filterable stack traces is challenging +1. **Circuit Breaking**: Protecting systems from cascading failures requires complex implementation ### Modern Go Challenges Addressed 1. **Go 1.25+ Feature Integration**: Lack of libraries leveraging modern Go performance features -2. **Observability Gaps**: Missing built-in support for metrics and tracing in error handling -3. **Recovery Guidance**: Errors without actionable remediation suggestions -4. **Type Safety**: Metadata handling without compile-time guarantees -5. **Standard Library Integration**: Poor integration with `errors.Join` and modern error patterns -6. **Serialization Complexity**: Difficulty in structured error export for monitoring systems +1. **Observability Gaps**: Missing built-in support for metrics and tracing in error handling +1. **Recovery Guidance**: Errors without actionable remediation suggestions +1. **Type Safety**: Metadata handling without compile-time guarantees +1. **Standard Library Integration**: Poor integration with `errors.Join` and modern error patterns +1. **Serialization Complexity**: Difficulty in structured error export for monitoring systems ewrap provides solutions to all these challenges while maintaining backward compatibility and excellent performance characteristics. diff --git a/docs/requirements.txt b/docs/requirements.txt index 240ed32..61d2bfc 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,3 @@ -mkdocs-material>=9.5.47 mkdocs-git-revision-date-localized-plugin>=1.3.0 +mkdocs-material>=9.5.47 mkdocs-minify-plugin>=0.8.0 From b3fc79da08eac3f67e84c862928257ce4c7d998c Mon Sep 17 00:00:00 2001 From: "F." Date: Thu, 18 Dec 2025 10:12:43 +0100 Subject: [PATCH 2/3] chore(pre-commit): remove duplicate mixed-line-ending hook - Deduplicate `mixed-line-ending` entry in `.pre-commit-config.yaml`. - Prevents the hook from running twice and reduces noise in commit output. - No code changes; configuration-only update. --- .pre-commit-config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e20b73c..96e12d4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,6 @@ repos: - id: end-of-file-fixer - id: mixed-line-ending - id: trailing-whitespace - - id: mixed-line-ending - id: fix-byte-order-marker - id: check-executables-have-shebangs - id: check-merge-conflict From 70b8686a79c0fd38e1f17eca4aac45355f845a46 Mon Sep 17 00:00:00 2001 From: "F." Date: Thu, 18 Dec 2025 10:23:43 +0100 Subject: [PATCH 3/3] chore(pre-commit): remove duplicate mixed-line-ending hook - Deduplicate `mixed-line-ending` entry in `.pre-commit-config.yaml`. - Prevents the hook from running twice and reduces noise in commit output. - No code changes; configuration-only update. --- .vscode/extensions.json | 22 +++---- .vscode/settings.json | 137 +--------------------------------------- 2 files changed, 12 insertions(+), 147 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 23da1c1..1abe180 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,13 +1,13 @@ { - "recommendations": [ - "github.vscode-github-actions", - "golang.go", - "ms-vscode.makefile-tools", - "esbenp.prettier-vscode", - "pbkit.vscode-pbkit", - "trunk.io", - "streetsidesoftware.code-spell-checker", - "ms-azuretools.vscode-docker", - "eamodio.gitlens" - ] + "recommendations": [ + "github.vscode-github-actions", + "golang.go", + "ms-vscode.makefile-tools", + "esbenp.prettier-vscode", + "pbkit.vscode-pbkit", + "trunk.io", + "streetsidesoftware.code-spell-checker", + "ms-azuretools.vscode-docker", + "eamodio.gitlens" + ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index f06eb5b..c98f086 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,138 +1,3 @@ { - "makefile.configureOnOpen": false, - "cSpell.words": [ - "arithmatex", - "asasalint", - "asciicheck", - "azuretools", - "benchmem", - "betterem", - "bidichk", - "bodyclose", - "canonicalheader", - "containedctx", - "contextcheck", - "copyloopvar", - "Cosentino", - "cpuprofile", - "cyclop", - "daixiang", - "decorder", - "depguard", - "dupl", - "dupword", - "durationcheck", - "eamodio", - "emperror", - "errcheck", - "errchkjson", - "errname", - "errorlint", - "esbenp", - "ewrap", - "fatcontext", - "fieldalignment", - "fontawesome", - "forbidigo", - "forcetypeassert", - "Francesco", - "funlen", - "ginkgolinter", - "GITVERSION", - "gocheckcompilerdirectives", - "gochecknoglobals", - "gochecknoinits", - "gochecksumtype", - "gocognit", - "goconst", - "gocritic", - "gocyclo", - "godox", - "GOFILES", - "gofmt", - "gofumpt", - "goheader", - "goimports", - "golangci", - "GOMAXPROCS", - "gomoddirectives", - "gomodguard", - "GOPATH", - "goprintffuncname", - "gosec", - "gosimple", - "gosmopolitan", - "govet", - "honnef", - "importas", - "inamedparam", - "ineffassign", - "inlinehilite", - "interfacebloat", - "intrange", - "ireturn", - "linenums", - "loggercheck", - "logrus", - "magiclink", - "maintidx", - "makezero", - "memprofile", - "mkdocs", - "multierror", - "musttag", - "mvdan", - "nakedret", - "nestif", - "Newf", - "nilerr", - "nilnil", - "nlreturn", - "noctx", - "nolint", - "nolintlint", - "nonamedreturns", - "nosprintfhostport", - "NOVENDOR", - "paralleltest", - "pbkit", - "perfsprint", - "prealloc", - "predeclared", - "promlinter", - "proto", - "protogetter", - "pygments", - "pymdownx", - "rowserrcheck", - "sirupsen", - "sloglint", - "smartsymbols", - "spancheck", - "sqlclosecheck", - "staticcheck", - "stdlib", - "stretchr", - "stylecheck", - "superfences", - "tasklist", - "tenv", - "testableexamples", - "testifylint", - "testpackage", - "thelper", - "toplevel", - "tparallel", - "typecheck", - "unconvert", - "unparam", - "usestdlibvars", - "varnamelen", - "wastedassign", - "wrapcheck", - "Wrapf", - "zaptest", - "zerolog", - "zerologlint" - ] + "makefile.configureOnOpen": false }