[#306 #215] Swiftlint and other warnings + build errors (#307)

[#306] Release build is broken because placeholder is not compiled

[#215] Warning: Non-constant range: argument must be an integer literal

Fix comment spacing warning
This commit is contained in:
Francisco Gindre 2022-05-05 10:30:01 -03:00 committed by GitHub
parent 1a594c955a
commit cec63d0564
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 190 additions and 193 deletions

View File

@ -1,187 +1,184 @@
{
"object": {
"pins": [
{
"package": "combine-schedulers",
"repositoryURL": "https://github.com/pointfreeco/combine-schedulers",
"state": {
"branch": null,
"revision": "4cf088c29a20f52be0f2ca54992b492c54e0076b",
"version": "0.5.3"
}
},
{
"package": "grpc-swift",
"repositoryURL": "https://github.com/grpc/grpc-swift.git",
"state": {
"branch": null,
"revision": "593fe0fe931f7e838969243cd137be48e8055b1d",
"version": "1.7.3"
}
},
{
"package": "MnemonicSwift",
"repositoryURL": "https://github.com/zcash-hackworks/MnemonicSwift",
"state": {
"branch": null,
"revision": "b10b0b8ee1f297e33ea5b1bc041ced49943b6582",
"version": "2.2.3"
}
},
{
"package": "SQLite.swift",
"repositoryURL": "https://github.com/stephencelis/SQLite.swift.git",
"state": {
"branch": null,
"revision": "4d543d811ee644fa4cc4bfa0be996b4dd6ba0f54",
"version": "0.13.3"
}
},
{
"package": "swift-case-paths",
"repositoryURL": "https://github.com/pointfreeco/swift-case-paths",
"state": {
"branch": null,
"revision": "d226d167bd4a68b51e352af5655c92bce8ee0463",
"version": "0.7.0"
}
},
{
"package": "swift-collections",
"repositoryURL": "https://github.com/apple/swift-collections",
"state": {
"branch": null,
"revision": "2d33a0ea89c961dcb2b3da2157963d9c0370347e",
"version": "1.0.1"
}
},
{
"package": "swift-composable-architecture",
"repositoryURL": "https://github.com/pointfreeco/swift-composable-architecture",
"state": {
"branch": null,
"revision": "599a2398adaaa7a4e3f5420cde7728c39e33677e",
"version": "0.28.1"
}
},
{
"package": "swift-crypto",
"repositoryURL": "https://github.com/apple/swift-crypto.git",
"state": {
"branch": null,
"revision": "067254c79435de759aeef4a6a03e43d087d61312",
"version": "2.0.5"
}
},
{
"package": "swift-custom-dump",
"repositoryURL": "https://github.com/pointfreeco/swift-custom-dump",
"state": {
"branch": null,
"revision": "21f8fdbb3226e5e28a1a2fffac3e0f3deec34bf0",
"version": "0.2.1"
}
},
{
"package": "swift-identified-collections",
"repositoryURL": "https://github.com/pointfreeco/swift-identified-collections",
"state": {
"branch": null,
"revision": "f76e7d3fe4265ee09216044ec3780d74f546ca82",
"version": "0.3.1"
}
},
{
"package": "swift-log",
"repositoryURL": "https://github.com/apple/swift-log.git",
"state": {
"branch": null,
"revision": "5d66f7ba25daf4f94100e7022febf3c75e37a6c7",
"version": "1.4.2"
}
},
{
"package": "swift-nio",
"repositoryURL": "https://github.com/apple/swift-nio.git",
"state": {
"branch": null,
"revision": "d6e3762e0a5f7ede652559f53623baf11006e17c",
"version": "2.39.0"
}
},
{
"package": "swift-nio-extras",
"repositoryURL": "https://github.com/apple/swift-nio-extras.git",
"state": {
"branch": null,
"revision": "f73ca5ee9c6806800243f1ac415fcf82de9a4c91",
"version": "1.10.2"
}
},
{
"package": "swift-nio-http2",
"repositoryURL": "https://github.com/apple/swift-nio-http2.git",
"state": {
"branch": null,
"revision": "50c25c132b140e62b45e90b5a76f13ded02c8a46",
"version": "1.20.1"
}
},
{
"package": "swift-nio-ssl",
"repositoryURL": "https://github.com/apple/swift-nio-ssl.git",
"state": {
"branch": null,
"revision": "b5260a31c2a72a89fa684f5efb3054d8725a2316",
"version": "2.18.0"
}
},
{
"package": "swift-nio-transport-services",
"repositoryURL": "https://github.com/apple/swift-nio-transport-services.git",
"state": {
"branch": null,
"revision": "8ab824b140d0ebcd87e9149266ddc353e3705a3e",
"version": "1.11.4"
}
},
{
"package": "SwiftProtobuf",
"repositoryURL": "https://github.com/apple/swift-protobuf.git",
"state": {
"branch": null,
"revision": "e1499bc69b9040b29184f7f2996f7bab467c1639",
"version": "1.19.0"
}
},
{
"package": "xctest-dynamic-overlay",
"repositoryURL": "https://github.com/pointfreeco/xctest-dynamic-overlay",
"state": {
"branch": null,
"revision": "50a70a9d3583fe228ce672e8923010c8df2deddd",
"version": "0.2.1"
}
},
{
"package": "libzcashlc",
"repositoryURL": "https://github.com/zcash-hackworks/zcash-light-client-ffi.git",
"state": {
"branch": "main",
"revision": "8d4cff1ac9afccd7d7b6c4317dfe5e30c5c5bb42",
"version": null
}
},
{
"package": "ZcashLightClientKit",
"repositoryURL": "https://github.com/zcash/ZcashLightClientKit",
"state": {
"branch": null,
"revision": "f3150072f5cafd53fa064b7cfc80ef3a84460fb2",
"version": null
}
"pins" : [
{
"identity" : "combine-schedulers",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/combine-schedulers",
"state" : {
"revision" : "4cf088c29a20f52be0f2ca54992b492c54e0076b",
"version" : "0.5.3"
}
]
},
"version": 1
},
{
"identity" : "grpc-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/grpc/grpc-swift.git",
"state" : {
"revision" : "593fe0fe931f7e838969243cd137be48e8055b1d",
"version" : "1.7.3"
}
},
{
"identity" : "mnemonicswift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/zcash-hackworks/MnemonicSwift",
"state" : {
"revision" : "716a2c32ac2bbd8a1499ac834077df42b75edc85",
"version" : "2.2.4"
}
},
{
"identity" : "sqlite.swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/stephencelis/SQLite.swift.git",
"state" : {
"revision" : "4d543d811ee644fa4cc4bfa0be996b4dd6ba0f54",
"version" : "0.13.3"
}
},
{
"identity" : "swift-case-paths",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-case-paths",
"state" : {
"revision" : "ce9c0d897db8a840c39de64caaa9b60119cf4be8",
"version" : "0.8.1"
}
},
{
"identity" : "swift-collections",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-collections",
"state" : {
"revision" : "48254824bb4248676bf7ce56014ff57b142b77eb",
"version" : "1.0.2"
}
},
{
"identity" : "swift-composable-architecture",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-composable-architecture",
"state" : {
"revision" : "599a2398adaaa7a4e3f5420cde7728c39e33677e",
"version" : "0.28.1"
}
},
{
"identity" : "swift-crypto",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-crypto.git",
"state" : {
"revision" : "d9825fa541df64b1a7b182178d61b9a82730d01f",
"version" : "2.1.0"
}
},
{
"identity" : "swift-custom-dump",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-custom-dump",
"state" : {
"revision" : "c4f78db9b90ca57b7b6abc2223e235242739ea3c",
"version" : "0.4.0"
}
},
{
"identity" : "swift-identified-collections",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-identified-collections",
"state" : {
"revision" : "680bf440178a78a627b1c2c64c0855f6523ad5b9",
"version" : "0.3.2"
}
},
{
"identity" : "swift-log",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-log.git",
"state" : {
"revision" : "5d66f7ba25daf4f94100e7022febf3c75e37a6c7",
"version" : "1.4.2"
}
},
{
"identity" : "swift-nio",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio.git",
"state" : {
"revision" : "124119f0bb12384cef35aa041d7c3a686108722d",
"version" : "2.40.0"
}
},
{
"identity" : "swift-nio-extras",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio-extras.git",
"state" : {
"revision" : "8eea84ec6144167354387ef9244b0939f5852dc8",
"version" : "1.11.0"
}
},
{
"identity" : "swift-nio-http2",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio-http2.git",
"state" : {
"revision" : "72bcaf607b40d7c51044f65b0f5ed8581a911832",
"version" : "1.21.0"
}
},
{
"identity" : "swift-nio-ssl",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio-ssl.git",
"state" : {
"revision" : "1750873bce84b4129b5303655cce2c3d35b9ed3a",
"version" : "2.19.0"
}
},
{
"identity" : "swift-nio-transport-services",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio-transport-services.git",
"state" : {
"revision" : "1a4692acb88156e3da1b0c6732a8a38b2a744166",
"version" : "1.12.0"
}
},
{
"identity" : "swift-protobuf",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-protobuf.git",
"state" : {
"revision" : "e1499bc69b9040b29184f7f2996f7bab467c1639",
"version" : "1.19.0"
}
},
{
"identity" : "xctest-dynamic-overlay",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/xctest-dynamic-overlay",
"state" : {
"revision" : "50a70a9d3583fe228ce672e8923010c8df2deddd",
"version" : "0.2.1"
}
},
{
"identity" : "zcash-light-client-ffi",
"kind" : "remoteSourceControl",
"location" : "https://github.com/zcash-hackworks/zcash-light-client-ffi.git",
"state" : {
"branch" : "main",
"revision" : "1d236d07b9f8ea7d1380175cdef5c00bde70eed8"
}
},
{
"identity" : "zcashlightclientkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/zcash/ZcashLightClientKit",
"state" : {
"revision" : "f3150072f5cafd53fa064b7cfc80ef3a84460fb2"
}
}
],
"version" : 2
}

View File

@ -100,7 +100,7 @@ private extension RecoveryPhraseValidationState {
)
LazyVGrid(columns: columns, alignment: .center, spacing: 20) {
ForEach(0..<missingWordChips.count) { chipIndex in
ForEach(0..<missingWordChips.count, id: \.self) { chipIndex in
PhraseChip(kind: missingWordChips[chipIndex])
.makeDraggable()
.frame(

View File

@ -100,7 +100,7 @@ struct Create_Previews: PreviewProvider {
}
}
#if DEBUG
// #if DEBUG // FIX: Issue #306 - Release build is broken
extension SendStore {
static var placeholder: SendStore {
return SendStore(
@ -120,4 +120,4 @@ extension SendStore {
)
}
}
#endif
// #endif

View File

@ -57,7 +57,7 @@ struct OnboardingContentView: View {
}
}
ZStack {
ForEach(0..<viewStore.steps.count) { stepIndex in
ForEach(0..<viewStore.steps.count, id: \.self) { stepIndex in
VStack(spacing: viewStore.isFinalStep ? 50 : 15) {
HStack {
Text(viewStore.steps[stepIndex].title)

View File

@ -19,7 +19,7 @@ struct CircularFrameBackgroundImages: Animatable, ViewModifier {
func body(content: Content) -> some View {
WithViewStore(self.store) { viewStore in
ZStack {
ForEach(0..<viewStore.images.count - 1) { imageIndex in
ForEach(0..<viewStore.images.count - 1, id: \.self) { imageIndex in
viewStore.images[imageIndex]
.resizable()
.aspectRatio(1.3, contentMode: .fill)

View File

@ -132,7 +132,7 @@ struct BadgesOverlay: Animatable, ViewModifier {
Spacer()
ZStack {
ForEach(0..<viewStore.badges.count) { badgeIndex in
ForEach(0..<viewStore.badges.count, id: \.self) { badgeIndex in
viewStore.badges[viewStore.index].image
.frame(
width: proxy.size.width * 0.35,

View File

@ -31,9 +31,9 @@ struct TextFieldEnvironment: Equatable { }
extension TextFieldReducer {
static let `default` = TextFieldReducer { state, action, _ in
switch action {
// case .apply(let action):
// state.text = action(state.text)
// state.valid = state.text.isValid(for: state.validationType)
// case .apply(let action):
// state.text = action(state.text)
// state.valid = state.text.isValid(for: state.validationType)
case .set(let text):
state.text = text
state.valid = state.text.isValid(for: state.validationType)