Skip to content

Commit b2c23d0

Browse files
committed
Enable MD009 trailing whitespace linting and fix violations
Enable the MD009 markdownlint rule which detects trailing whitespace at the end of lines. Fix all existing violations across the codebase. Auto-generated files (Changelog/*, Librdkafka/*) are excluded from linting and left unchanged.
1 parent ff59420 commit b2c23d0

63 files changed

Lines changed: 155 additions & 156 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.markdownlint-cli2.jsonc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
],
2121
"config": {
2222
"default": true,
23-
"MD009": false,
2423
"MD025": true,
2524
"MD029": {
2625
"style": "one_or_ordered"

Admin/API.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ end
336336
# Partition: 2, Offset: 181414, Lag: 5
337337
# Partition: 3, Offset: 181070, Lag: 8
338338
# Partition: 4, Offset: 180974, Lag: 4
339-
#
339+
#
340340
# Consumer group: karafka_web
341341
# Topic: karafka_consumers_reports
342342
# Partition: 0, Offset: 48669, Lag: 2
@@ -372,7 +372,7 @@ end
372372
# Partition: 2, Offset: 181511, Lag: 11
373373
# Partition: 3, Offset: 181163, Lag: 3
374374
# Partition: 4, Offset: 181075, Lag: 14
375-
#
375+
#
376376
# Consumer group: karafka_web
377377
# Topic: karafka_consumers_reports
378378
# Partition: 0, Offset: 48689, Lag: 3

Advanced/Broker-Failures-and-Fault-Tolerance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ Alert on these conditions:
430430
Karafka **is designed** to handle Kafka broker failures gracefully. During maintenance operations and unexpected outages:
431431

432432
- **Messages will continue to be consumed** (from available brokers)
433-
- **Producers will queue messages** until brokers are available
433+
- **Producers will queue messages** until brokers are available
434434
- **Automatic reconnection** handles broker transitions
435435
- **Connection refused errors** are expected and normal
436436
- **Recovery typically occurs within 1-15 seconds** of broker restoration

Advanced/Debugging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ class KarafkaApp < Karafka::App
213213
# this will start processing from beginning each time new
214214
# karafka process starts
215215
consumer_group "app_group_#{Process.pid}" do
216-
topic :orders do
216+
topic :orders do
217217
consumer OrdersConsumer
218218
end
219219
end

Advanced/Declarative-Topics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ With this setting enabled, Karafka will fail to start if any topics in the routi
180180

181181
## Detailed Exit Codes
182182

183-
When managing Kafka topics via Karafka's CLI commands, the `--detailed-exitcode` option can be configured. This option alters the exit codes based on the operation's result. This option provides more granular information, making integrating Karafka's topic management into automated systems like CI/CD pipelines easier.
183+
When managing Kafka topics via Karafka's CLI commands, the `--detailed-exitcode` option can be configured. This option alters the exit codes based on the operation's result. This option provides more granular information, making integrating Karafka's topic management into automated systems like CI/CD pipelines easier.
184184

185185
When the `--detailed-exitcode` flag is enabled, the `topic` related commands exit codes will work as follows:
186186

Advanced/Embedding.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ In a cluster mode:
2525
**For Puma < 7:**
2626

2727
```ruby
28-
# config/puma.rb
28+
# config/puma.rb
2929

3030
workers 2
3131
threads 1, 3
@@ -44,7 +44,7 @@ end
4444
**For Puma >= 7:**
4545

4646
```ruby
47-
# config/puma.rb
47+
# config/puma.rb
4848

4949
workers 2
5050
threads 1, 3
@@ -65,7 +65,7 @@ In a single node mode:
6565
**For Puma < 7:**
6666

6767
```ruby
68-
# config/puma.rb
68+
# config/puma.rb
6969

7070
preload_app!
7171

@@ -82,7 +82,7 @@ end
8282
**For Puma >= 7:**
8383

8484
```ruby
85-
# config/puma.rb
85+
# config/puma.rb
8686

8787
preload_app!
8888

@@ -153,7 +153,7 @@ Before you initiate the embedded Karafka server, your application code must be p
153153

154154
### Critical Error Handling
155155

156-
When operating Karafka in Embedded mode, it's crucial to understand that certain critical errors might be silently overlooked if the supervising process for Karafka Embedding does not correctly signal those errors. While Karafka might recognize and attempt to raise an error and notify about it via its instrumentation pipeline, the supervising process might not propagate or report this, leading to potential silent failures or unnoticed issues. For robust and reliable production deployments, it's critical to ensure that any errors Karafka might produce are not only correctly signaled by the supervising process but also reported and monitored.
156+
When operating Karafka in Embedded mode, it's crucial to understand that certain critical errors might be silently overlooked if the supervising process for Karafka Embedding does not correctly signal those errors. While Karafka might recognize and attempt to raise an error and notify about it via its instrumentation pipeline, the supervising process might not propagate or report this, leading to potential silent failures or unnoticed issues. For robust and reliable production deployments, it's critical to ensure that any errors Karafka might produce are not only correctly signaled by the supervising process but also reported and monitored.
157157

158158
### Partial/Silent Crashes
159159

@@ -241,7 +241,7 @@ end
241241
```
242242

243243
```ruby
244-
# Sidekiq configuration
244+
# Sidekiq configuration
245245
Sidekiq.configure_server do |config|
246246
config.on(:startup) do
247247
Karafka.setup do |config|

Advanced/Inline-Insights.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class LogEventsConsumer < ApplicationConsumer
5050
# Buffering decisions are made based on current lag and buffer size.
5151
return if current_lag > LAG_THRESHOLD && @buffer.size < FLUSH_SIZE
5252

53-
@buffer.flush
53+
@buffer.flush
5454
mark_as_consumed(messages.last)
5555
end
5656

Advanced/Latency-and-Throughput.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ The `request.required.acks` parameter determines the number of acknowledgments t
9797

9898
- **0 (No Acknowledgement)**: The broker does not respond to the producer, and the message is considered delivered the moment it is dispatched. This setting provides the lowest latency since the producer doesn't wait for acknowledgments. It's highly performant, allowing for rapid message dispatch, but it risks data loss because there's no confirmation that the broker received the message. Suitable for non-critical data where speed is crucial.
9999

100-
- **1 (Leader Acknowledgement)**: The leader broker responds once it has written the message to its log. This setting balances latency and durability, providing a quick acknowledgment while ensuring the leader broker logs the message. It offers a good trade-off for most use cases, ensuring reasonable reliability with moderate latency.
100+
- **1 (Leader Acknowledgement)**: The leader broker responds once it has written the message to its log. This setting balances latency and durability, providing a quick acknowledgment while ensuring the leader broker logs the message. It offers a good trade-off for most use cases, ensuring reasonable reliability with moderate latency.
101101

102102
- **-1 or all (All ISR Acknowledgements)**: The leader broker waits until all in-sync replicas have acknowledged the message. This setting ensures maximum durability, minimizing the risk of data loss as the message is replicated across multiple brokers. However, it results in higher latency and reduced throughput. It is best for critical applications where data integrity is essential.
103103

@@ -155,7 +155,7 @@ end
155155

156156
### Asynchronous Producing
157157

158-
Asynchronous dispatch reduces waiting time for acknowledgments, allowing your application to continue processing tasks immediately. This significantly lowers end-to-end latency within your application and increases WaterDrop throughput.
158+
Asynchronous dispatch reduces waiting time for acknowledgments, allowing your application to continue processing tasks immediately. This significantly lowers end-to-end latency within your application and increases WaterDrop throughput.
159159

160160
Asynchronous producing is the recommended way for any non-critical messages.
161161

Advanced/Multi-Cluster-Setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Multi-Cluster Setup
22

3-
Karafka is a robust framework that allows applications to interact with multiple Kafka clusters simultaneously. This provides enhanced scalability, redundancy, and flexibility, enabling developers to optimize data processing and manage message streams across various clusters with ease.
3+
Karafka is a robust framework that allows applications to interact with multiple Kafka clusters simultaneously. This provides enhanced scalability, redundancy, and flexibility, enabling developers to optimize data processing and manage message streams across various clusters with ease.
44

55
## Overview
66

Advanced/Offset-management.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def consume
6363
end
6464
```
6565

66-
Karafka offers two additional methods to commit already stored but not committed offsets to Kafka: `#commit_offsets` and `#commit_offsets!`.
66+
Karafka offers two additional methods to commit already stored but not committed offsets to Kafka: `#commit_offsets` and `#commit_offsets!`.
6767

6868
These two methods allow you to manage your consumer's offsets, ensuring Kafka knows the last message your consumer has processed.
6969

0 commit comments

Comments
 (0)