Created
November 2, 2023 11:12
-
-
Save scott-lydon/6355c7ce8e46a67f8010d712990aeebc to your computer and use it in GitHub Desktop.
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
// No Model in names | |
/* | |
throw an error when a class or struct is added that doesn't | |
use the word model in the name, and isn't a subclass of a | |
UIViewController, nor UIView, nor view, uiviewRepresentable, | |
codable or observer. | |
*/ | |
import UIKit | |
protocol UIVeeiw {} | |
protocol Bently {} | |
protocol Observer {} | |
// Throw an error for the cases below | |
class Lady: UIVeeiw {} | |
struct Boss {} | |
class Verity: Bently {} | |
// Do not throw an error for the cases below. | |
struct Cat: Codable {} | |
class Terble: UIViewController {} | |
struct MugView {} | |
struct TeaModel {} | |
struct Melimodel {} | |
class Icon: Observer {} | |
import SwiftUI | |
struct Cow: View {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment