- Proposal: SE-NNNN
- Authors: Cihat Gündüz
- Review Manager: TBD
- Status: Work in Progress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# EditorConfig is awesome: https://editorconfig.org | |
root = true | |
[*] | |
indent_style = space | |
tab_width = 8 | |
indent_size = 4 | |
end_of_line = lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.icu.text.MeasureFormat | |
import android.icu.text.NumberFormat | |
import android.icu.util.MeasureUnit | |
import android.os.Build | |
import java.util.Locale | |
import kotlin.time.Duration | |
import kotlin.time.ExperimentalTime | |
import kotlin.time.days | |
import kotlin.time.hours | |
import kotlin.time.milliseconds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/swift-sh | |
import AnyLint // @Flinesoft | |
try Lint.logSummaryAndExit(arguments: CommandLine.arguments) { | |
// MARK: - Variables | |
let swiftAppFiles: Regex = #"^(Shared|iOS|macOS)/App/Sources/.*\.swift$"# | |
// MARK: - Checks | |
// MARK: SafeLocalizedStringKey | |
let unsafeLocalizedStringKeyTypes: String = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright © 2020 Flinesoft. All rights reserved. | |
import Foundation | |
import SwiftUI | |
public struct SafeLocalizedStringKey : | |
ExpressibleByStringLiteral, | |
ExpressibleByStringInterpolation, | |
ExpressibleByExtendedGraphemeClusterLiteral, | |
ExpressibleByUnicodeScalarLiteral, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context | |
import android.content.Context.MODE_PRIVATE | |
import android.content.SharedPreferences | |
import androidx.core.content.edit | |
object AppPreferences { | |
private var sharedPreferences: SharedPreferences? = null | |
// TODO step 1: call `AppPreferences.setup(applicationContext)` in your MainActivity's `onCreate` method | |
fun setup(context: Context) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
//: ## The Problem | |
// property example | |
let pollingInterval: TimeInterval = 5 | |
// method example | |
func animate(duration: TimeInterval = 20, animations: () -> Void) { |