Skip to content

Commit 55a734d

Browse files
committed
RuboCop.
1 parent faf2a1d commit 55a734d

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.rubocop.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,19 @@ plugins:
55
AllCops:
66
DisabledByDefault: true
77

8+
# Socketry specific rules:
9+
810
Layout/ConsistentBlankLineIndentation:
911
Enabled: true
1012

13+
Layout/BlockDelimiterSpacing:
14+
Enabled: true
15+
16+
Style/GlobalExceptionVariables:
17+
Enabled: true
18+
19+
# General Layout rules:
20+
1121
Layout/IndentationStyle:
1222
Enabled: true
1323
EnforcedStyle: tabs
@@ -52,6 +62,7 @@ Layout/CommentIndentation:
5262

5363
Layout/FirstHashElementIndentation:
5464
Enabled: true
65+
EnforcedStyle: consistent
5566

5667
Layout/EmptyLinesAroundClassBody:
5768
Enabled: true

examples/cow.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# frozen_string_literal: true
22

3+
# Released under the MIT License.
4+
# Copyright, 2025, by Samuel Williams.
5+
36
# A small demo to visualize COW-related minor page fault trends.
47
# - Allocates page-sized strings in an array.
58
# - Forks a child that mutates one byte of a different string each second.
@@ -12,7 +15,7 @@
1215
DURATION = Integer(ENV.fetch("DURATION", "30")) # seconds to run/monitor
1316

1417
# Allocate an array of page-sized mutable strings:
15-
array = Array.new(PAGES) {"\x00" * PAGE_SIZE}
18+
array = Array.new(PAGES){"\x00" * PAGE_SIZE}
1619

1720
child_pid = fork do
1821
$0 = "cow-child"

0 commit comments

Comments
 (0)