mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 16:24:30 +09:00
feat: changed function_body_length swiftlint rule from 60/80 to 80/100
This commit is contained in:
@@ -37,8 +37,8 @@ identifier_name:
|
||||
line_length: 200
|
||||
|
||||
function_body_length:
|
||||
- 60
|
||||
- 80
|
||||
- 100
|
||||
|
||||
type_body_length:
|
||||
- 300
|
||||
|
||||
@@ -120,7 +120,6 @@ public class LineChart: WidgetWrapper {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
// swiftlint:disable function_body_length
|
||||
public override func draw(_ dirtyRect: NSRect) {
|
||||
super.draw(dirtyRect)
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ public enum widget_t: String {
|
||||
case label = "label"
|
||||
case tachometer = "tachometer"
|
||||
|
||||
// swiftlint:disable function_body_length
|
||||
public func new(module: String, config: NSDictionary, defaultWidget: widget_t) -> Widget? {
|
||||
var image: NSImage? = nil
|
||||
var preview: widget_p? = nil
|
||||
|
||||
@@ -137,7 +137,6 @@ public class NetworkChartView: NSView {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
// swiftlint:disable function_body_length
|
||||
public override func draw(_ dirtyRect: NSRect) {
|
||||
super.draw(dirtyRect)
|
||||
|
||||
|
||||
@@ -37,7 +37,6 @@ internal class LoadReader: Reader<CPU_Load> {
|
||||
}
|
||||
}
|
||||
|
||||
// swiftlint:disable function_body_length
|
||||
public override func read() {
|
||||
let result: kern_return_t = host_processor_info(mach_host_self(), PROCESSOR_CPU_LOAD_INFO, &self.numCPUsU, &self.cpuInfo, &self.numCpuInfo)
|
||||
if result == KERN_SUCCESS {
|
||||
|
||||
@@ -322,7 +322,6 @@ public class ProcessReader: Reader<[Network_Process]> {
|
||||
self.popup = true
|
||||
}
|
||||
|
||||
// swiftlint:disable function_body_length
|
||||
public override func read() {
|
||||
if self.numberOfProcesses == 0 {
|
||||
return
|
||||
|
||||
@@ -49,7 +49,6 @@ enum FlagsType: String {
|
||||
}
|
||||
}
|
||||
|
||||
// swiftlint:disable function_body_length
|
||||
func main() {
|
||||
var args = CommandLine.arguments.dropFirst()
|
||||
let cmd = CMDType(value: args.first ?? "")
|
||||
|
||||
Reference in New Issue
Block a user