Skip to content

Commit

Permalink
Make cmd.zig follow the line length limit
Browse files Browse the repository at this point in the history
Also remove deleted files from the style script
  • Loading branch information
InKryption committed Jan 22, 2025
1 parent 08b3aef commit 2403940
Show file tree
Hide file tree
Showing 4 changed files with 154 additions and 94 deletions.
4 changes: 1 addition & 3 deletions scripts/style.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ def unused_imports(args, files_to_check):
"src/prometheus/metric.zig",
"src/prometheus/histogram.zig",
"src/prometheus/registry.zig",
"src/cmd/helpers.zig",
"src/geyser/core.zig",
"src/rpc/request.zig",
"src/bincode/shortvec.zig",
Expand Down Expand Up @@ -174,7 +173,6 @@ def unused_imports(args, files_to_check):
"src/transaction_sender/mock_transfer_generator.zig",
"src/core/transaction.zig",
"src/net/net.zig",
"src/cmd/cmd.zig",
"src/bincode/bincode.zig",
"src/accountsdb/snapshots.zig",
"src/gossip/data.zig",
Expand Down Expand Up @@ -203,7 +201,7 @@ def line_length(args, files_to_check):
for i, line in enumerate(lines):
# ignore comments. these are lines where the first non-whitespace characters
# are "//"
if line.strip().startswith("//"):
if line.strip().startswith(("//", "\\" + "\\")):
continue
if len(line) > MAX_LINE_LENGTH:
print(f"{path}:{i + 1} is too long: {len(line)}")
Expand Down
Loading

0 comments on commit 2403940

Please sign in to comment.