Skip to content

Commit

Permalink
chore: Fix SwiftLint warnings (#53)
Browse files Browse the repository at this point in the history
Fix SwiftLint warnings.
  • Loading branch information
hassila authored Feb 8, 2023
1 parent 2d5a871 commit a3f3c4c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Sources/.swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
opt_in_rules:
- file_name
file_name:
excluded:
- "BenchmarkInternals.swift"
- "MallocStats+jemalloc-support.swift"
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class MallocStatsProducer {
// more efficient queries later of malloc statistics.
public init() {
func setupMIB(name: String) -> [size_t] {
precondition(name.split(separator: ".").count > 0, "setupMIB with 0 count")
precondition(!name.split(separator: ".").isEmpty, "setupMIB with 0 count")
var mib = [size_t](repeating: 0, count: name.split(separator: ".").count)
var mibSize = mib.count
mib.withUnsafeMutableBufferPointer { pointer in
Expand Down

0 comments on commit a3f3c4c

Please sign in to comment.