fix: 修复golangci-lint检查发现的代码质量问题 #5
ci.yml
on: push
Lint
38s
Security Scan
22s
Matrix: Test
Annotations
21 errors and 6 warnings
|
Security Scan
Process completed with exit code 1.
|
|
Lint:
internal/routes/routes.go#L130
G304: Potential file inclusion via variable (gosec)
|
|
Lint:
internal/storage/local_strategy.go#L83
G304: Potential file inclusion via variable (gosec)
|
|
Lint:
internal/storage/local_strategy.go#L53
G304: Potential file inclusion via variable (gosec)
|
|
Lint:
internal/config/config.go#L161
G301: Expect directory permissions to be 0750 or less (gosec)
|
|
Lint:
internal/logger/logger.go#L40
G302: Expect file permissions to be 0600 or less (gosec)
|
|
Lint:
internal/logger/logger.go#L33
G301: Expect directory permissions to be 0750 or less (gosec)
|
|
Lint:
internal/handlers/storage.go#L146
cyclomatic complexity 22 of func `(*StorageHandler).UpdateStorageConfig` is high (> 15) (gocyclo)
|
|
Lint:
internal/config/config.go#L296
cyclomatic complexity 40 of func `(*Config).LoadFromDatabase` is high (> 15) (gocyclo)
|
|
Lint:
internal/handlers/storage.go#L186
Error return value of `sh.storageManager.ReconfigureWebDAV` is not checked (errcheck)
|
|
Lint:
internal/handlers/share.go#L140
Error return value of `h.service.UpdateFileUsage` is not checked (errcheck)
|
|
Test (1.23)
Cannot open: File exists
|
|
Test (1.23)
Cannot open: File exists
|
|
Test (1.23)
Cannot open: File exists
|
|
Test (1.23)
Cannot open: File exists
|
|
Test (1.23)
Cannot open: File exists
|
|
Test (1.23)
Cannot open: File exists
|
|
Test (1.23)
Cannot open: File exists
|
|
Test (1.23)
Cannot open: File exists
|
|
Test (1.23)
Cannot open: File exists
|
|
Test (1.23)
Cannot open: File exists
|
|
Security Scan
Failed to restore: "/usr/bin/tar" failed with error: The process '/usr/bin/tar' failed with exit code 2
|
|
Lint
Failed to save: <h2>Our services aren't available right now</h2><p>We're working to restore all services as soon as possible. Please check back soon.</p>0CsayaAAAAAA6cxNyJoHFQYVSEGOYtsWwUEhYMzFFREdFMDUxOABFZGdl
|
|
Lint
Failed to restore: Cache service responded with 400
|
|
Lint
Failed to restore: "/usr/bin/tar" failed with error: The process '/usr/bin/tar' failed with exit code 2
|
|
Test (1.23)
Failed to restore: "/usr/bin/tar" failed with error: The process '/usr/bin/tar' failed with exit code 2
|
|
Test (1.23)
Failed to restore: "/usr/bin/tar" failed with error: The process '/usr/bin/tar' failed with exit code 2
|