├── .gitignore ├── .swiftlint.yml ├── CODEOWNERS ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Configs ├── Pragmatic-Debug.xcconfig ├── Pragmatic-Release.xcconfig ├── Pragmatic-Shared.xcconfig ├── PragmaticXcode-Debug.xcconfig ├── PragmaticXcode-Release.xcconfig ├── PragmaticXcode-Shared.xcconfig ├── Project-Debug.xcconfig ├── Project-Release.xcconfig └── Project-Shared.xcconfig ├── LICENSE ├── Pragmatic.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcshareddata │ └── xcschemes │ ├── Pragmatic-Debug.xcscheme │ ├── PragmaticXcode - Debug.xcscheme │ └── PragmaticXcode-Release.xcscheme ├── Pragmatic ├── AppDelegate.swift ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── pragma-128x128.png │ │ ├── pragma-128x128@2x.png │ │ ├── pragma-16x16.png │ │ ├── pragma-16x16@2x.png │ │ ├── pragma-256x256.png │ │ ├── pragma-256x256@2x.png │ │ ├── pragma-32x32.png │ │ ├── pragma-32x32@2x.png │ │ ├── pragma-512x512.png │ │ └── pragma-512x512@2x.png ├── Base.lproj │ └── MainMenu.xib └── Info.plist ├── PragmaticXcode ├── CommandLogic.swift ├── CustomWarningCommand.swift ├── IgnoreDeprecatedCommand.swift ├── IgnoreEmptyCommand.swift ├── IgnoreFormatCommand.swift ├── IgnoreSelectorLeakCommand.swift ├── Info.plist ├── PragmaOnceCommand.swift ├── PragmaticXcode.entitlements ├── PragmaticXcodeExtension.swift ├── SectionHeaderCommand.swift └── TodoCommand.swift ├── README.md ├── Resources ├── Keybindings.png └── demo.gif └── logo.png /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xcuserstate 23 | 24 | ## Obj-C/Swift specific 25 | *.hmap 26 | *.ipa 27 | *.dSYM.zip 28 | *.dSYM 29 | 30 | ## Playgrounds 31 | timeline.xctimeline 32 | playground.xcworkspace 33 | 34 | # Swift Package Manager 35 | # 36 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 37 | # Packages/ 38 | .build/ 39 | 40 | # CocoaPods 41 | # 42 | # We recommend against adding the Pods directory to your .gitignore. However 43 | # you should judge for yourself, the pros and cons are mentioned at: 44 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 45 | # 46 | # Pods/ 47 | 48 | # Carthage 49 | # 50 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 51 | # Carthage/Checkouts 52 | 53 | Carthage/Build 54 | 55 | # fastlane 56 | # 57 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 58 | # screenshots whenever they are needed. 59 | # For more information about the recommended setup visit: 60 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 61 | 62 | fastlane/report.xml 63 | fastlane/Preview.html 64 | fastlane/screenshots 65 | fastlane/test_output 66 | -------------------------------------------------------------------------------- /.swiftlint.yml: -------------------------------------------------------------------------------- 1 | # Created by Brian Ganninger on 1/16/22. 2 | # Copyright © 2022 Brian Ganninger. All rights reserved. 3 | 4 | # The complete list of rules can be found at: 5 | # https://realm.github.io/SwiftLint/rule-directory.html 6 | 7 | disabled_rules: 8 | - todo 9 | 10 | opt_in_rules: 11 | - anonymous_argument_in_multiline_closure 12 | - empty_collection_literal 13 | - empty_string 14 | - empty_count 15 | - flatmap_over_map_reduce 16 | - force_unwrapping 17 | - implicit_return 18 | - modifier_order 19 | - operator_usage_whitespace 20 | - redundant_nil_coalescing 21 | - trailing_closure 22 | - vertical_whitespace_opening_braces 23 | - vertical_whitespace_closing_braces 24 | - yoda_condition 25 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | # CODEOWNERS 2 | # Last Updated: 7 July 2017 3 | 4 | # These owners will be the default owners for everything in the repo. 5 | * @bgannin 6 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Code of Conduct 2 | 3 | As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. 4 | 5 | We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality. 6 | 7 | Examples of unacceptable behavior by participants include: 8 | 9 | * The use of sexualized language or imagery 10 | * Personal attacks 11 | * Trolling or insulting/derogatory comments 12 | * Public or private harassment 13 | * Publishing other's private information, such as physical or electronic addresses, without explicit permission 14 | * Submitting contributions or comments that you know to violate the intellectual property or privacy rights of others 15 | * Other unethical or unprofessional conduct 16 | 17 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 18 | By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team. 19 | 20 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. 21 | 22 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting a project maintainer at fastlane-abuse@twitter.com. Complaints will result in a response and be reviewed and investigated in a way that is deemed necessary and appropriate to the circumstances. Maintainers are obligated to maintain confidentiality with regard to the reporter of an incident. 23 | 24 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.3.0, available at [http://contributor-covenant.org/version/1/3/0/][version] 25 | 26 | [homepage]: http://contributor-covenant.org 27 | [version]: http://contributor-covenant.org/version/1/3/0/ 28 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | This is a set of guidelines centered around contributing to Pragmatic. Please keep these in mind when preparing or reviewing a pull request. They aren't meant to be annoying, just a baseline. 4 | 5 | # Community 6 | 7 | ## Code of Conduct 8 | 9 | Please help us keep this community open, friendly, and inclusive by reading and following our [code of conduct](CODE_OF_CONDUCT.md). 10 | 11 | ## Our Thanks 12 | 13 | Pragmatic would not have been possible without the [other excellent Xcode extensions](https://github.com/tib/awesome-xcode-extensions) for a jumpstart and continues to improve due to contributors such as yourself. Thank you for donating your time! 14 | 15 | # Coding 16 | 17 | The long-term health of any project is quite important; these are a few guidelines to follow to keep ours in top shape. 18 | 19 | ## Language 20 | 21 | All parts have been written in Swift and we'd like to continue that for the foreseeable future. If there's a compelling reason to introduce non-Swift code please bridge it appropriately and test thoroughly. 22 | 23 | ## Warnings 24 | 25 | Note the number of general warnings prior to your change with a clean build. Repeat with your changes. These should be the same or less with your changes. The goal is to maintain zero build warnings. 26 | 27 | If you cannot avoid a warning be sure to note this and the reason for it in your PR as well as with a comment in the code if possible. 28 | 29 | ## Static Analyzer 30 | 31 | Note the number of analyzer results prior to your change with a clean build. Repeat with your changes. These should be the same or less with your changes. 32 | 33 | If you cannot avoid triggering a new result be sure to note this and the reason for it in your PR as well as with a comment in the code if possible. 34 | 35 | ## Tabs vs Spaces 36 | 37 | Let `\t` be your guide. Please ensure your favorite editor is configured to respect this; Xcode can be set to use tabs (Preferences -> Editing -> Indentation) and allows you to choose how that character is displayed. 38 | -------------------------------------------------------------------------------- /Configs/Pragmatic-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Brian Ganninger on 1/12/22. 3 | // Copyright © 2022 Brian Ganninger. All rights reserved. 4 | // 5 | 6 | #include "Project-Debug" 7 | #include "Pragmatic-Shared" 8 | -------------------------------------------------------------------------------- /Configs/Pragmatic-Release.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Brian Ganninger on 1/12/22. 3 | // Copyright © 2022 Brian Ganninger. All rights reserved. 4 | // 5 | 6 | #include "Project-Release" 7 | #include "Pragmatic-Shared" 8 | -------------------------------------------------------------------------------- /Configs/Pragmatic-Shared.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Brian Ganninger on 1/14/22. 3 | // Copyright © 2022 Brian Ganninger. All rights reserved. 4 | // 5 | 6 | // Configuration settings file format documentation can be found at: 7 | // https://help.apple.com/xcode/#/dev745c5c974 8 | 9 | PRODUCT_BUNDLE_IDENTIFIER = com.infinitenexus.PragmaticXcode.Pragmatic 10 | -------------------------------------------------------------------------------- /Configs/PragmaticXcode-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Brian Ganninger on 1/12/22. 3 | // Copyright © 2022 Brian Ganninger. All rights reserved. 4 | // 5 | 6 | #include "Project-Debug" 7 | #include "PragmaticXcode-Shared" 8 | 9 | -------------------------------------------------------------------------------- /Configs/PragmaticXcode-Release.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Brian Ganninger on 1/12/22. 3 | // Copyright © 2022 Brian Ganninger. All rights reserved. 4 | // 5 | 6 | #include "Project-Release" 7 | #include "PragmaticXcode-Shared" 8 | -------------------------------------------------------------------------------- /Configs/PragmaticXcode-Shared.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Brian Ganninger on 1/14/22. 3 | // Copyright © 2022 Brian Ganninger. All rights reserved. 4 | // 5 | 6 | // Configuration settings file format documentation can be found at: 7 | // https://help.apple.com/xcode/#/dev745c5c974 8 | 9 | PRODUCT_BUNDLE_IDENTIFIER = com.infinitenexus.PragmaticXcode 10 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon 11 | CODE_SIGN_ENTITLEMENTS = PragmaticXcode/PragmaticXcode.entitlements 12 | -------------------------------------------------------------------------------- /Configs/Project-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Brian Ganninger on 1/14/22. 3 | // Copyright © 2022 Brian Ganninger. All rights reserved. 4 | // 5 | 6 | #include "Project-Shared" 7 | 8 | DEBUG_INFORMATION_FORMAT = dwarf 9 | ENABLE_TESTABILITY = YES 10 | GENERATE_PROFILING_CODE = YES 11 | 12 | GCC_DYNAMIC_NO_PIC = NO 13 | GCC_OPTIMIZATION_LEVEL = 0 14 | 15 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG 16 | SWIFT_OPTIMIZATION_LEVEL = -Onone 17 | -------------------------------------------------------------------------------- /Configs/Project-Release.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Brian Ganninger on 1/12/22. 3 | // Copyright © 2022 Brian Ganninger. All rights reserved. 4 | // 5 | 6 | #include "Project-Shared" 7 | 8 | DEBUG_INFORMATION_FORMAT = dwarf-with-dsym 9 | SWIFT_OPTIMIZATION_LEVEL = -Owholemodule 10 | ONLY_ACTIVE_ARCH = NO 11 | CLANG_STATIC_ANALYZER_MODE = deep 12 | -------------------------------------------------------------------------------- /Configs/Project-Shared.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Brian Ganninger on 1/14/22. 3 | // Copyright © 2022 Brian Ganninger. All rights reserved. 4 | // 5 | 6 | // Configuration settings file format documentation can be found at: 7 | // https://help.apple.com/xcode/#/dev745c5c974 8 | 9 | PRODUCT_NAME = $(TARGET_NAME) 10 | INFOPLIST_FILE = $(TARGET_NAME)/Info.plist 11 | 12 | LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks 13 | ALWAYS_SEARCH_USER_PATHS = NO 14 | SKIP_INSTALL = YES 15 | 16 | SDKROOT = macosx 17 | MACOSX_DEPLOYMENT_TARGET = 11.0 18 | 19 | SWIFT_VERSION = 5.0 20 | SWIFT_OPTIMIZE_OBJECT_LIFETIME = YES 21 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 22 | 23 | COMBINE_HIDPI_IMAGES = YES 24 | MTL_ENABLE_DEBUG_INFO = NO 25 | 26 | CLANG_STATIC_ANALYZER_MODE = shallow 27 | RUN_CLANG_STATIC_ANALYZER = YES 28 | COPY_PHASE_STRIP = NO 29 | DEAD_CODE_STRIPPING = YES 30 | ENABLE_STRICT_OBJC_MSGSEND = YES 31 | ENABLE_INCREMENTAL_DISTILL = NO 32 | 33 | CLANG_ANALYZER_NONNULL = YES 34 | CLANG_ENABLE_MODULES = YES 35 | CLANG_ENABLE_OBJC_ARC = YES 36 | CLANG_ADDRESS_SANITIZER_CONTAINER_OVERFLOW = YES 37 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_INTEGER = YES 38 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 39 | 40 | CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES 41 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 42 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES 43 | CLANG_WARN_BOOL_CONVERSION = YES 44 | CLANG_WARN_COMMA = YES 45 | CLANG_WARN_CONSTANT_CONVERSION = YES 46 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES 47 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR 48 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES 49 | CLANG_WARN_EMPTY_BODY = YES 50 | CLANG_WARN_ENUM_CONVERSION = YES 51 | CLANG_WARN_INFINITE_RECURSION = YES 52 | CLANG_WARN_INT_CONVERSION = YES 53 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES 54 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 55 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES 56 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR 57 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES 58 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES 59 | CLANG_WARN_STRICT_PROTOTYPES = YES 60 | CLANG_WARN_SUSPICIOUS_MOVE = YES 61 | CLANG_WARN_UNREACHABLE_CODE = YES 62 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES 63 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES 64 | CLANG_WARN_MISSING_NOESCAPE = YES 65 | CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES 66 | CLANG_WARN_OBJC_INTERFACE_IVARS = YES 67 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES 68 | CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = YES 69 | CLANG_WARN_OBJC_ROOT_CLASS = YES 70 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 71 | CLANG_WARN_ASSIGN_ENUM = YES 72 | CLANG_WARN_COMPLETION_HANDLER_MISUSE = YES 73 | CLANG_WARN_SEMICOLON_BEFORE_METHOD_BODY = YES 74 | CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES 75 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 76 | CLANG_WARN__ARC_BRIDGE_CAST_NONARC = YES 77 | 78 | CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES 79 | CLANG_ANALYZER_SECURITY_INSECUREAPI_GETPW_GETS = YES 80 | CLANG_ANALYZER_SECURITY_INSECUREAPI_MKSTEMP = YES 81 | CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES 82 | CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES 83 | CLANG_ANALYZER_SECURITY_INSECUREAPI_UNCHECKEDRETURN = YES 84 | CLANG_ANALYZER_SECURITY_INSECUREAPI_VFORK = YES 85 | CLANG_ANALYZER_SECURITY_KEYCHAIN_API = YES 86 | 87 | CLANG_ANALYZER_GCD = YES 88 | CLANG_ANALYZER_GCD_PERFORMANCE = YES 89 | CLANG_ANALYZER_LIBKERN_RETAIN_COUNT = YES 90 | CLANG_ANALYZER_LOCALIZABILITY_EMPTY_CONTEXT = NO 91 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES 92 | CLANG_ANALYZER_MIG_CONVENTIONS = YES 93 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES 94 | CLANG_ANALYZER_OBJC_COLLECTIONS = YES 95 | CLANG_ANALYZER_OBJC_NSCFERROR = YES 96 | CLANG_ANALYZER_OSOBJECT_C_STYLE_CAST = YES 97 | 98 | GCC_C_LANGUAGE_STANDARD = gnu99 99 | GCC_NO_COMMON_BLOCKS = YES 100 | GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES 101 | GCC_TREAT_WARNINGS_AS_ERRORS = YES 102 | 103 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES 104 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR 105 | GCC_WARN_UNDECLARED_SELECTOR = YES 106 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE 107 | GCC_WARN_UNUSED_FUNCTION = YES 108 | GCC_WARN_UNUSED_VARIABLE = YES 109 | GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES 110 | GCC_WARN_ABOUT_MISSING_NEWLINE = YES 111 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES 112 | GCC_WARN_SHADOW = YES 113 | GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES 114 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 115 | GCC_WARN_UNDECLARED_SELECTOR = YES 116 | GCC_WARN_CHECK_SWITCH_STATEMENTS = YES 117 | GCC_WARN_ABOUT_RETURN_TYPE = YES 118 | GCC_WARN_UNKNOWN_PRAGMAS = YES 119 | GCC_WARN_UNUSED_LABEL = YES 120 | GCC_WARN_UNUSED_PARAMETER = YES 121 | GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES 122 | GCC_WARN_ABOUT_MISSING_NEWLINE = YES 123 | 124 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Brian Ganninger 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Pragmatic.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 55; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | D24C9FDB1E61F98600FE5E92 /* PragmaOnceCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = D24C9FD91E61F96300FE5E92 /* PragmaOnceCommand.swift */; }; 11 | D24E57AF1E46F05B00D2FD86 /* SectionHeaderCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = D24E57AB1E46EFF300D2FD86 /* SectionHeaderCommand.swift */; }; 12 | D24E57B01E46F05B00D2FD86 /* IgnoreEmptyCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = D24E57AD1E46F04A00D2FD86 /* IgnoreEmptyCommand.swift */; }; 13 | D24E57B21E46F0A900D2FD86 /* IgnoreDeprecatedCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = D24E57B11E46F0A900D2FD86 /* IgnoreDeprecatedCommand.swift */; }; 14 | D24E57B41E46F0D400D2FD86 /* IgnoreFormatCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = D24E57B31E46F0D400D2FD86 /* IgnoreFormatCommand.swift */; }; 15 | D24E57BE1E47E73300D2FD86 /* IgnoreSelectorLeakCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = D24E57BD1E47E73300D2FD86 /* IgnoreSelectorLeakCommand.swift */; }; 16 | D24E57C01E48232C00D2FD86 /* CommandLogic.swift in Sources */ = {isa = PBXBuildFile; fileRef = D24E57BF1E48232C00D2FD86 /* CommandLogic.swift */; }; 17 | D29DF2DF1E8F95D200BEA896 /* CustomWarningCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = D29DF2DD1E8F95C400BEA896 /* CustomWarningCommand.swift */; }; 18 | D2AAF8831E465838000EFE1F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2AAF8821E465838000EFE1F /* AppDelegate.swift */; }; 19 | D2AAF8851E465838000EFE1F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D2AAF8841E465838000EFE1F /* Assets.xcassets */; }; 20 | D2AAF8881E465838000EFE1F /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = D2AAF8861E465838000EFE1F /* MainMenu.xib */; }; 21 | D2AAF8961E465877000EFE1F /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2AAF8951E465877000EFE1F /* Cocoa.framework */; }; 22 | D2AAF89B1E465877000EFE1F /* PragmaticXcodeExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2AAF89A1E465877000EFE1F /* PragmaticXcodeExtension.swift */; }; 23 | D2AAF8A11E465877000EFE1F /* Pragmatic.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = D2AAF8931E465877000EFE1F /* Pragmatic.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 24 | D3BE936D2794EA6B00322A92 /* TodoCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3BE936C2794EA6B00322A92 /* TodoCommand.swift */; }; 25 | D3D5D6EB279541A80014B836 /* XcodeKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D24E57BB1E47D33B00D2FD86 /* XcodeKit.framework */; }; 26 | D3D5D6EC279541A80014B836 /* XcodeKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D24E57BB1E47D33B00D2FD86 /* XcodeKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 27 | /* End PBXBuildFile section */ 28 | 29 | /* Begin PBXContainerItemProxy section */ 30 | D2AAF89F1E465877000EFE1F /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = D2AAF8771E465838000EFE1F /* Project object */; 33 | proxyType = 1; 34 | remoteGlobalIDString = D2AAF8921E465877000EFE1F; 35 | remoteInfo = PragmaticXcode; 36 | }; 37 | /* End PBXContainerItemProxy section */ 38 | 39 | /* Begin PBXCopyFilesBuildPhase section */ 40 | D2AAF8A51E465877000EFE1F /* Embed App Extensions */ = { 41 | isa = PBXCopyFilesBuildPhase; 42 | buildActionMask = 2147483647; 43 | dstPath = ""; 44 | dstSubfolderSpec = 13; 45 | files = ( 46 | D2AAF8A11E465877000EFE1F /* Pragmatic.appex in Embed App Extensions */, 47 | ); 48 | name = "Embed App Extensions"; 49 | runOnlyForDeploymentPostprocessing = 0; 50 | }; 51 | D3D5D6ED279541A80014B836 /* Embed Frameworks */ = { 52 | isa = PBXCopyFilesBuildPhase; 53 | buildActionMask = 2147483647; 54 | dstPath = ""; 55 | dstSubfolderSpec = 10; 56 | files = ( 57 | D3D5D6EC279541A80014B836 /* XcodeKit.framework in Embed Frameworks */, 58 | ); 59 | name = "Embed Frameworks"; 60 | runOnlyForDeploymentPostprocessing = 0; 61 | }; 62 | /* End PBXCopyFilesBuildPhase section */ 63 | 64 | /* Begin PBXFileReference section */ 65 | D24C9FD31E61F8AE00FE5E92 /* CODE_OF_CONDUCT.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = CODE_OF_CONDUCT.md; sourceTree = ""; }; 66 | D24C9FD41E61F8AE00FE5E92 /* CONTRIBUTING.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = CONTRIBUTING.md; sourceTree = ""; }; 67 | D24C9FD51E61F8AE00FE5E92 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 68 | D24C9FD91E61F96300FE5E92 /* PragmaOnceCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PragmaOnceCommand.swift; sourceTree = ""; }; 69 | D24E57AB1E46EFF300D2FD86 /* SectionHeaderCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SectionHeaderCommand.swift; sourceTree = ""; }; 70 | D24E57AD1E46F04A00D2FD86 /* IgnoreEmptyCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IgnoreEmptyCommand.swift; sourceTree = ""; }; 71 | D24E57B11E46F0A900D2FD86 /* IgnoreDeprecatedCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IgnoreDeprecatedCommand.swift; sourceTree = ""; }; 72 | D24E57B31E46F0D400D2FD86 /* IgnoreFormatCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IgnoreFormatCommand.swift; sourceTree = ""; }; 73 | D24E57BB1E47D33B00D2FD86 /* XcodeKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XcodeKit.framework; path = Library/Frameworks/XcodeKit.framework; sourceTree = DEVELOPER_DIR; }; 74 | D24E57BD1E47E73300D2FD86 /* IgnoreSelectorLeakCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IgnoreSelectorLeakCommand.swift; sourceTree = ""; }; 75 | D24E57BF1E48232C00D2FD86 /* CommandLogic.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommandLogic.swift; sourceTree = ""; }; 76 | D29DF2DD1E8F95C400BEA896 /* CustomWarningCommand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomWarningCommand.swift; sourceTree = ""; }; 77 | D2AAF87F1E465838000EFE1F /* PragmaticXcode.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PragmaticXcode.app; sourceTree = BUILT_PRODUCTS_DIR; }; 78 | D2AAF8821E465838000EFE1F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 79 | D2AAF8841E465838000EFE1F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 80 | D2AAF8871E465838000EFE1F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; 81 | D2AAF8891E465838000EFE1F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Pragmatic/Info.plist; sourceTree = SOURCE_ROOT; }; 82 | D2AAF8931E465877000EFE1F /* Pragmatic.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = Pragmatic.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 83 | D2AAF8951E465877000EFE1F /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 84 | D2AAF8991E465877000EFE1F /* PragmaticXcode.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = PragmaticXcode.entitlements; sourceTree = ""; }; 85 | D2AAF89A1E465877000EFE1F /* PragmaticXcodeExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PragmaticXcodeExtension.swift; sourceTree = ""; }; 86 | D2AAF89E1E465877000EFE1F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = PragmaticXcode/Info.plist; sourceTree = SOURCE_ROOT; }; 87 | D35A0EE2278E9D7F00AC3E16 /* Project-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Project-Release.xcconfig"; sourceTree = ""; }; 88 | D35A0EE3278E9D7F00AC3E16 /* Pragmatic-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Pragmatic-Release.xcconfig"; sourceTree = ""; }; 89 | D35A0EE4278E9D7F00AC3E16 /* Pragmatic-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Pragmatic-Debug.xcconfig"; sourceTree = ""; }; 90 | D35A0EE62790617800AC3E16 /* PragmaticXcode-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "PragmaticXcode-Release.xcconfig"; sourceTree = ""; }; 91 | D35A0EE72790617800AC3E16 /* PragmaticXcode-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "PragmaticXcode-Debug.xcconfig"; sourceTree = ""; }; 92 | D35A0EE82792734E00AC3E16 /* Project-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Project-Debug.xcconfig"; sourceTree = ""; }; 93 | D35A0EE92792757800AC3E16 /* Project-Shared.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Project-Shared.xcconfig"; sourceTree = ""; }; 94 | D35A0EEA2793432100AC3E16 /* Pragmatic-Shared.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Pragmatic-Shared.xcconfig"; sourceTree = ""; }; 95 | D35A0EEB279343A800AC3E16 /* PragmaticXcode-Shared.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "PragmaticXcode-Shared.xcconfig"; sourceTree = ""; }; 96 | D3BE936C2794EA6B00322A92 /* TodoCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodoCommand.swift; sourceTree = ""; }; 97 | D3C72EAF207A276600237B86 /* CODEOWNERS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CODEOWNERS; sourceTree = ""; }; 98 | /* End PBXFileReference section */ 99 | 100 | /* Begin PBXFrameworksBuildPhase section */ 101 | D2AAF87C1E465838000EFE1F /* Frameworks */ = { 102 | isa = PBXFrameworksBuildPhase; 103 | buildActionMask = 2147483647; 104 | files = ( 105 | ); 106 | runOnlyForDeploymentPostprocessing = 0; 107 | }; 108 | D2AAF8901E465877000EFE1F /* Frameworks */ = { 109 | isa = PBXFrameworksBuildPhase; 110 | buildActionMask = 2147483647; 111 | files = ( 112 | D2AAF8961E465877000EFE1F /* Cocoa.framework in Frameworks */, 113 | D3D5D6EB279541A80014B836 /* XcodeKit.framework in Frameworks */, 114 | ); 115 | runOnlyForDeploymentPostprocessing = 0; 116 | }; 117 | /* End PBXFrameworksBuildPhase section */ 118 | 119 | /* Begin PBXGroup section */ 120 | D2AAF8761E465838000EFE1F = { 121 | isa = PBXGroup; 122 | children = ( 123 | D24C9FD51E61F8AE00FE5E92 /* README.md */, 124 | D24C9FD41E61F8AE00FE5E92 /* CONTRIBUTING.md */, 125 | D24C9FD31E61F8AE00FE5E92 /* CODE_OF_CONDUCT.md */, 126 | D3C72EAF207A276600237B86 /* CODEOWNERS */, 127 | D2AAF8811E465838000EFE1F /* 🛠App Wrapper */, 128 | D2AAF8971E465877000EFE1F /* ⚙Xcode Extension */, 129 | D2AAF8981E465877000EFE1F /* Supporting Files */, 130 | D2AAF8941E465877000EFE1F /* Frameworks */, 131 | D2AAF8801E465838000EFE1F /* Products */, 132 | ); 133 | sourceTree = ""; 134 | }; 135 | D2AAF8801E465838000EFE1F /* Products */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | D2AAF87F1E465838000EFE1F /* PragmaticXcode.app */, 139 | D2AAF8931E465877000EFE1F /* Pragmatic.appex */, 140 | ); 141 | name = Products; 142 | sourceTree = ""; 143 | }; 144 | D2AAF8811E465838000EFE1F /* 🛠App Wrapper */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | D2AAF8821E465838000EFE1F /* AppDelegate.swift */, 148 | D2AAF8841E465838000EFE1F /* Assets.xcassets */, 149 | D2AAF8861E465838000EFE1F /* MainMenu.xib */, 150 | D2AAF89E1E465877000EFE1F /* Info.plist */, 151 | ); 152 | name = "🛠App Wrapper"; 153 | path = Pragmatic; 154 | sourceTree = ""; 155 | }; 156 | D2AAF8941E465877000EFE1F /* Frameworks */ = { 157 | isa = PBXGroup; 158 | children = ( 159 | D24E57BB1E47D33B00D2FD86 /* XcodeKit.framework */, 160 | D2AAF8951E465877000EFE1F /* Cocoa.framework */, 161 | ); 162 | name = Frameworks; 163 | sourceTree = ""; 164 | }; 165 | D2AAF8971E465877000EFE1F /* ⚙Xcode Extension */ = { 166 | isa = PBXGroup; 167 | children = ( 168 | D2AAF89A1E465877000EFE1F /* PragmaticXcodeExtension.swift */, 169 | D24E57BF1E48232C00D2FD86 /* CommandLogic.swift */, 170 | D24C9FD91E61F96300FE5E92 /* PragmaOnceCommand.swift */, 171 | D24E57AB1E46EFF300D2FD86 /* SectionHeaderCommand.swift */, 172 | D3BE936C2794EA6B00322A92 /* TodoCommand.swift */, 173 | D24E57AD1E46F04A00D2FD86 /* IgnoreEmptyCommand.swift */, 174 | D24E57B11E46F0A900D2FD86 /* IgnoreDeprecatedCommand.swift */, 175 | D24E57B31E46F0D400D2FD86 /* IgnoreFormatCommand.swift */, 176 | D24E57BD1E47E73300D2FD86 /* IgnoreSelectorLeakCommand.swift */, 177 | D29DF2DD1E8F95C400BEA896 /* CustomWarningCommand.swift */, 178 | D2AAF8891E465838000EFE1F /* Info.plist */, 179 | ); 180 | name = "⚙Xcode Extension"; 181 | path = PragmaticXcode; 182 | sourceTree = ""; 183 | }; 184 | D2AAF8981E465877000EFE1F /* Supporting Files */ = { 185 | isa = PBXGroup; 186 | children = ( 187 | D35A0EE1278E9D7F00AC3E16 /* Configs */, 188 | D2AAF8991E465877000EFE1F /* PragmaticXcode.entitlements */, 189 | ); 190 | name = "Supporting Files"; 191 | path = PragmaticXcode; 192 | sourceTree = ""; 193 | }; 194 | D35A0EE1278E9D7F00AC3E16 /* Configs */ = { 195 | isa = PBXGroup; 196 | children = ( 197 | D35A0EE92792757800AC3E16 /* Project-Shared.xcconfig */, 198 | D35A0EEA2793432100AC3E16 /* Pragmatic-Shared.xcconfig */, 199 | D35A0EEB279343A800AC3E16 /* PragmaticXcode-Shared.xcconfig */, 200 | D35A0EE82792734E00AC3E16 /* Project-Debug.xcconfig */, 201 | D35A0EE2278E9D7F00AC3E16 /* Project-Release.xcconfig */, 202 | D35A0EE4278E9D7F00AC3E16 /* Pragmatic-Debug.xcconfig */, 203 | D35A0EE3278E9D7F00AC3E16 /* Pragmatic-Release.xcconfig */, 204 | D35A0EE72790617800AC3E16 /* PragmaticXcode-Debug.xcconfig */, 205 | D35A0EE62790617800AC3E16 /* PragmaticXcode-Release.xcconfig */, 206 | ); 207 | path = Configs; 208 | sourceTree = SOURCE_ROOT; 209 | }; 210 | /* End PBXGroup section */ 211 | 212 | /* Begin PBXNativeTarget section */ 213 | D2AAF87E1E465838000EFE1F /* PragmaticXcode */ = { 214 | isa = PBXNativeTarget; 215 | buildConfigurationList = D2AAF88C1E465838000EFE1F /* Build configuration list for PBXNativeTarget "PragmaticXcode" */; 216 | buildPhases = ( 217 | D2AAF87B1E465838000EFE1F /* Sources */, 218 | D3BE936A2793D6DE00322A92 /* Run Script - SwiftLint */, 219 | D2AAF87C1E465838000EFE1F /* Frameworks */, 220 | D2AAF87D1E465838000EFE1F /* Resources */, 221 | D2AAF8A51E465877000EFE1F /* Embed App Extensions */, 222 | ); 223 | buildRules = ( 224 | ); 225 | dependencies = ( 226 | D2AAF8A01E465877000EFE1F /* PBXTargetDependency */, 227 | ); 228 | name = PragmaticXcode; 229 | productName = Pragmatic; 230 | productReference = D2AAF87F1E465838000EFE1F /* PragmaticXcode.app */; 231 | productType = "com.apple.product-type.application"; 232 | }; 233 | D2AAF8921E465877000EFE1F /* Pragmatic */ = { 234 | isa = PBXNativeTarget; 235 | buildConfigurationList = D2AAF8A21E465877000EFE1F /* Build configuration list for PBXNativeTarget "Pragmatic" */; 236 | buildPhases = ( 237 | D2AAF88F1E465877000EFE1F /* Sources */, 238 | D3BE936B2793D70B00322A92 /* Run Script - SwiftLint */, 239 | D2AAF8901E465877000EFE1F /* Frameworks */, 240 | D2AAF8911E465877000EFE1F /* Resources */, 241 | D3D5D6ED279541A80014B836 /* Embed Frameworks */, 242 | ); 243 | buildRules = ( 244 | ); 245 | dependencies = ( 246 | ); 247 | name = Pragmatic; 248 | productName = PragmaticXcode; 249 | productReference = D2AAF8931E465877000EFE1F /* Pragmatic.appex */; 250 | productType = "com.apple.product-type.xcode-extension"; 251 | }; 252 | /* End PBXNativeTarget section */ 253 | 254 | /* Begin PBXProject section */ 255 | D2AAF8771E465838000EFE1F /* Project object */ = { 256 | isa = PBXProject; 257 | attributes = { 258 | CLASSPREFIX = ""; 259 | LastSwiftUpdateCheck = 0820; 260 | LastUpgradeCheck = 1320; 261 | ORGANIZATIONNAME = ""; 262 | TargetAttributes = { 263 | D2AAF87E1E465838000EFE1F = { 264 | CreatedOnToolsVersion = 8.2.1; 265 | LastSwiftMigration = 1320; 266 | ProvisioningStyle = Automatic; 267 | }; 268 | D2AAF8921E465877000EFE1F = { 269 | CreatedOnToolsVersion = 8.2.1; 270 | LastSwiftMigration = 1320; 271 | ProvisioningStyle = Automatic; 272 | }; 273 | }; 274 | }; 275 | buildConfigurationList = D2AAF87A1E465838000EFE1F /* Build configuration list for PBXProject "Pragmatic" */; 276 | compatibilityVersion = "Xcode 13.0"; 277 | developmentRegion = en; 278 | hasScannedForEncodings = 0; 279 | knownRegions = ( 280 | en, 281 | Base, 282 | ); 283 | mainGroup = D2AAF8761E465838000EFE1F; 284 | productRefGroup = D2AAF8801E465838000EFE1F /* Products */; 285 | projectDirPath = ""; 286 | projectRoot = ""; 287 | targets = ( 288 | D2AAF87E1E465838000EFE1F /* PragmaticXcode */, 289 | D2AAF8921E465877000EFE1F /* Pragmatic */, 290 | ); 291 | }; 292 | /* End PBXProject section */ 293 | 294 | /* Begin PBXResourcesBuildPhase section */ 295 | D2AAF87D1E465838000EFE1F /* Resources */ = { 296 | isa = PBXResourcesBuildPhase; 297 | buildActionMask = 2147483647; 298 | files = ( 299 | D2AAF8851E465838000EFE1F /* Assets.xcassets in Resources */, 300 | D2AAF8881E465838000EFE1F /* MainMenu.xib in Resources */, 301 | ); 302 | runOnlyForDeploymentPostprocessing = 0; 303 | }; 304 | D2AAF8911E465877000EFE1F /* Resources */ = { 305 | isa = PBXResourcesBuildPhase; 306 | buildActionMask = 2147483647; 307 | files = ( 308 | ); 309 | runOnlyForDeploymentPostprocessing = 0; 310 | }; 311 | /* End PBXResourcesBuildPhase section */ 312 | 313 | /* Begin PBXShellScriptBuildPhase section */ 314 | D3BE936A2793D6DE00322A92 /* Run Script - SwiftLint */ = { 315 | isa = PBXShellScriptBuildPhase; 316 | buildActionMask = 2147483647; 317 | files = ( 318 | ); 319 | inputFileListPaths = ( 320 | ); 321 | inputPaths = ( 322 | ); 323 | name = "Run Script - SwiftLint"; 324 | outputFileListPaths = ( 325 | ); 326 | outputPaths = ( 327 | ); 328 | runOnlyForDeploymentPostprocessing = 0; 329 | shellPath = /bin/sh; 330 | shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; 331 | }; 332 | D3BE936B2793D70B00322A92 /* Run Script - SwiftLint */ = { 333 | isa = PBXShellScriptBuildPhase; 334 | buildActionMask = 2147483647; 335 | files = ( 336 | ); 337 | inputFileListPaths = ( 338 | ); 339 | inputPaths = ( 340 | ); 341 | name = "Run Script - SwiftLint"; 342 | outputFileListPaths = ( 343 | ); 344 | outputPaths = ( 345 | ); 346 | runOnlyForDeploymentPostprocessing = 0; 347 | shellPath = /bin/sh; 348 | shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; 349 | }; 350 | /* End PBXShellScriptBuildPhase section */ 351 | 352 | /* Begin PBXSourcesBuildPhase section */ 353 | D2AAF87B1E465838000EFE1F /* Sources */ = { 354 | isa = PBXSourcesBuildPhase; 355 | buildActionMask = 2147483647; 356 | files = ( 357 | D2AAF8831E465838000EFE1F /* AppDelegate.swift in Sources */, 358 | ); 359 | runOnlyForDeploymentPostprocessing = 0; 360 | }; 361 | D2AAF88F1E465877000EFE1F /* Sources */ = { 362 | isa = PBXSourcesBuildPhase; 363 | buildActionMask = 2147483647; 364 | files = ( 365 | D24E57B21E46F0A900D2FD86 /* IgnoreDeprecatedCommand.swift in Sources */, 366 | D24E57B01E46F05B00D2FD86 /* IgnoreEmptyCommand.swift in Sources */, 367 | D29DF2DF1E8F95D200BEA896 /* CustomWarningCommand.swift in Sources */, 368 | D24E57AF1E46F05B00D2FD86 /* SectionHeaderCommand.swift in Sources */, 369 | D24E57B41E46F0D400D2FD86 /* IgnoreFormatCommand.swift in Sources */, 370 | D3BE936D2794EA6B00322A92 /* TodoCommand.swift in Sources */, 371 | D2AAF89B1E465877000EFE1F /* PragmaticXcodeExtension.swift in Sources */, 372 | D24E57BE1E47E73300D2FD86 /* IgnoreSelectorLeakCommand.swift in Sources */, 373 | D24C9FDB1E61F98600FE5E92 /* PragmaOnceCommand.swift in Sources */, 374 | D24E57C01E48232C00D2FD86 /* CommandLogic.swift in Sources */, 375 | ); 376 | runOnlyForDeploymentPostprocessing = 0; 377 | }; 378 | /* End PBXSourcesBuildPhase section */ 379 | 380 | /* Begin PBXTargetDependency section */ 381 | D2AAF8A01E465877000EFE1F /* PBXTargetDependency */ = { 382 | isa = PBXTargetDependency; 383 | target = D2AAF8921E465877000EFE1F /* Pragmatic */; 384 | targetProxy = D2AAF89F1E465877000EFE1F /* PBXContainerItemProxy */; 385 | }; 386 | /* End PBXTargetDependency section */ 387 | 388 | /* Begin PBXVariantGroup section */ 389 | D2AAF8861E465838000EFE1F /* MainMenu.xib */ = { 390 | isa = PBXVariantGroup; 391 | children = ( 392 | D2AAF8871E465838000EFE1F /* Base */, 393 | ); 394 | name = MainMenu.xib; 395 | sourceTree = ""; 396 | }; 397 | /* End PBXVariantGroup section */ 398 | 399 | /* Begin XCBuildConfiguration section */ 400 | D2AAF88A1E465838000EFE1F /* Debug */ = { 401 | isa = XCBuildConfiguration; 402 | buildSettings = { 403 | MACOSX_DEPLOYMENT_TARGET = 11.0; 404 | }; 405 | name = Debug; 406 | }; 407 | D2AAF88B1E465838000EFE1F /* Release */ = { 408 | isa = XCBuildConfiguration; 409 | buildSettings = { 410 | MACOSX_DEPLOYMENT_TARGET = 11.0; 411 | }; 412 | name = Release; 413 | }; 414 | D2AAF88D1E465838000EFE1F /* Debug */ = { 415 | isa = XCBuildConfiguration; 416 | baseConfigurationReference = D35A0EE72790617800AC3E16 /* PragmaticXcode-Debug.xcconfig */; 417 | buildSettings = { 418 | }; 419 | name = Debug; 420 | }; 421 | D2AAF88E1E465838000EFE1F /* Release */ = { 422 | isa = XCBuildConfiguration; 423 | baseConfigurationReference = D35A0EE62790617800AC3E16 /* PragmaticXcode-Release.xcconfig */; 424 | buildSettings = { 425 | }; 426 | name = Release; 427 | }; 428 | D2AAF8A31E465877000EFE1F /* Debug */ = { 429 | isa = XCBuildConfiguration; 430 | baseConfigurationReference = D35A0EE4278E9D7F00AC3E16 /* Pragmatic-Debug.xcconfig */; 431 | buildSettings = { 432 | }; 433 | name = Debug; 434 | }; 435 | D2AAF8A41E465877000EFE1F /* Release */ = { 436 | isa = XCBuildConfiguration; 437 | baseConfigurationReference = D35A0EE3278E9D7F00AC3E16 /* Pragmatic-Release.xcconfig */; 438 | buildSettings = { 439 | }; 440 | name = Release; 441 | }; 442 | /* End XCBuildConfiguration section */ 443 | 444 | /* Begin XCConfigurationList section */ 445 | D2AAF87A1E465838000EFE1F /* Build configuration list for PBXProject "Pragmatic" */ = { 446 | isa = XCConfigurationList; 447 | buildConfigurations = ( 448 | D2AAF88A1E465838000EFE1F /* Debug */, 449 | D2AAF88B1E465838000EFE1F /* Release */, 450 | ); 451 | defaultConfigurationIsVisible = 0; 452 | defaultConfigurationName = Release; 453 | }; 454 | D2AAF88C1E465838000EFE1F /* Build configuration list for PBXNativeTarget "PragmaticXcode" */ = { 455 | isa = XCConfigurationList; 456 | buildConfigurations = ( 457 | D2AAF88D1E465838000EFE1F /* Debug */, 458 | D2AAF88E1E465838000EFE1F /* Release */, 459 | ); 460 | defaultConfigurationIsVisible = 0; 461 | defaultConfigurationName = Release; 462 | }; 463 | D2AAF8A21E465877000EFE1F /* Build configuration list for PBXNativeTarget "Pragmatic" */ = { 464 | isa = XCConfigurationList; 465 | buildConfigurations = ( 466 | D2AAF8A31E465877000EFE1F /* Debug */, 467 | D2AAF8A41E465877000EFE1F /* Release */, 468 | ); 469 | defaultConfigurationIsVisible = 0; 470 | defaultConfigurationName = Release; 471 | }; 472 | /* End XCConfigurationList section */ 473 | }; 474 | rootObject = D2AAF8771E465838000EFE1F /* Project object */; 475 | } 476 | -------------------------------------------------------------------------------- /Pragmatic.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Pragmatic.xcodeproj/xcshareddata/xcschemes/Pragmatic-Debug.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 6 | 9 | 10 | 16 | 22 | 23 | 24 | 30 | 36 | 37 | 38 | 39 | 40 | 45 | 46 | 47 | 48 | 59 | 63 | 64 | 65 | 71 | 72 | 73 | 74 | 82 | 84 | 90 | 91 | 92 | 93 | 95 | 96 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /Pragmatic.xcodeproj/xcshareddata/xcschemes/PragmaticXcode - Debug.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 45 | 47 | 53 | 54 | 55 | 56 | 62 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /Pragmatic.xcodeproj/xcshareddata/xcschemes/PragmaticXcode-Release.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 44 | 46 | 52 | 53 | 54 | 55 | 61 | 63 | 69 | 70 | 71 | 72 | 74 | 75 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /Pragmatic/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Brian Ganninger on 2/4/17. 3 | // Copyright © 2017 Brian Ganninger. All rights reserved. 4 | // 5 | 6 | import Cocoa 7 | 8 | @NSApplicationMain 9 | 10 | class AppDelegate: NSObject, NSApplicationDelegate { 11 | @IBOutlet weak var window: NSWindow! 12 | 13 | func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 14 | true 15 | } 16 | 17 | func applicationDidFinishLaunching(_ aNotification: Notification) { 18 | window.titleVisibility = .hidden 19 | } 20 | 21 | @IBAction func openGH(_ sender: Any) { 22 | guard let projectURL = URL(string: "https://github.com/bgannin/Pragmatic") else { 23 | return 24 | } 25 | NSWorkspace.shared.open(projectURL) 26 | } 27 | 28 | @IBAction func openWiki(_ sender: Any) { 29 | guard let wikiURL = URL(string: "https://github.com/bgannin/Pragmatic/wiki") else { 30 | return 31 | } 32 | NSWorkspace.shared.open(wikiURL) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Pragmatic/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "pragma-16x16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "pragma-16x16@2x.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "pragma-32x32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "pragma-32x32@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "pragma-128x128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "pragma-128x128@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "pragma-256x256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "pragma-256x256@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "pragma-512x512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "pragma-512x512@2x.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /Pragmatic/Assets.xcassets/AppIcon.appiconset/pragma-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgannin/Pragmatic/59438a66fb24c4ca67b3cb8d0b2103b35f6be888/Pragmatic/Assets.xcassets/AppIcon.appiconset/pragma-128x128.png -------------------------------------------------------------------------------- /Pragmatic/Assets.xcassets/AppIcon.appiconset/pragma-128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgannin/Pragmatic/59438a66fb24c4ca67b3cb8d0b2103b35f6be888/Pragmatic/Assets.xcassets/AppIcon.appiconset/pragma-128x128@2x.png -------------------------------------------------------------------------------- /Pragmatic/Assets.xcassets/AppIcon.appiconset/pragma-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgannin/Pragmatic/59438a66fb24c4ca67b3cb8d0b2103b35f6be888/Pragmatic/Assets.xcassets/AppIcon.appiconset/pragma-16x16.png -------------------------------------------------------------------------------- /Pragmatic/Assets.xcassets/AppIcon.appiconset/pragma-16x16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgannin/Pragmatic/59438a66fb24c4ca67b3cb8d0b2103b35f6be888/Pragmatic/Assets.xcassets/AppIcon.appiconset/pragma-16x16@2x.png -------------------------------------------------------------------------------- /Pragmatic/Assets.xcassets/AppIcon.appiconset/pragma-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgannin/Pragmatic/59438a66fb24c4ca67b3cb8d0b2103b35f6be888/Pragmatic/Assets.xcassets/AppIcon.appiconset/pragma-256x256.png -------------------------------------------------------------------------------- /Pragmatic/Assets.xcassets/AppIcon.appiconset/pragma-256x256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgannin/Pragmatic/59438a66fb24c4ca67b3cb8d0b2103b35f6be888/Pragmatic/Assets.xcassets/AppIcon.appiconset/pragma-256x256@2x.png -------------------------------------------------------------------------------- /Pragmatic/Assets.xcassets/AppIcon.appiconset/pragma-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgannin/Pragmatic/59438a66fb24c4ca67b3cb8d0b2103b35f6be888/Pragmatic/Assets.xcassets/AppIcon.appiconset/pragma-32x32.png -------------------------------------------------------------------------------- /Pragmatic/Assets.xcassets/AppIcon.appiconset/pragma-32x32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgannin/Pragmatic/59438a66fb24c4ca67b3cb8d0b2103b35f6be888/Pragmatic/Assets.xcassets/AppIcon.appiconset/pragma-32x32@2x.png -------------------------------------------------------------------------------- /Pragmatic/Assets.xcassets/AppIcon.appiconset/pragma-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgannin/Pragmatic/59438a66fb24c4ca67b3cb8d0b2103b35f6be888/Pragmatic/Assets.xcassets/AppIcon.appiconset/pragma-512x512.png -------------------------------------------------------------------------------- /Pragmatic/Assets.xcassets/AppIcon.appiconset/pragma-512x512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgannin/Pragmatic/59438a66fb24c4ca67b3cb8d0b2103b35f6be888/Pragmatic/Assets.xcassets/AppIcon.appiconset/pragma-512x512@2x.png -------------------------------------------------------------------------------- /Pragmatic/Base.lproj/MainMenu.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | -------------------------------------------------------------------------------- /Pragmatic/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | PragmaticXcode 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | XPC! 19 | CFBundleShortVersionString 20 | 1.4 21 | CFBundleVersion 22 | 6 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSExtension 26 | 27 | NSExtensionAttributes 28 | 29 | XCSourceEditorCommandDefinitions 30 | 31 | 32 | XCSourceEditorCommandClassName 33 | $(PRODUCT_MODULE_NAME).TodoCommand 34 | XCSourceEditorCommandIdentifier 35 | $(PRODUCT_BUNDLE_IDENTIFIER).TodoCommand 36 | XCSourceEditorCommandName 37 | Insert TODO Comment 38 | 39 | 40 | XCSourceEditorCommandClassName 41 | $(PRODUCT_MODULE_NAME).SectionHeaderCommand 42 | XCSourceEditorCommandIdentifier 43 | $(PRODUCT_BUNDLE_IDENTIFIER).SectionHeaderCommand 44 | XCSourceEditorCommandName 45 | Insert Section Header 46 | 47 | 48 | XCSourceEditorCommandClassName 49 | $(PRODUCT_MODULE_NAME).PragmaOnceCommand 50 | XCSourceEditorCommandIdentifier 51 | $(PRODUCT_BUNDLE_IDENTIFIER).PragmaOnceCommand 52 | XCSourceEditorCommandName 53 | Insert Pragma Once Guard 54 | 55 | 56 | XCSourceEditorCommandClassName 57 | $(PRODUCT_MODULE_NAME).CustomWarningCommand 58 | XCSourceEditorCommandIdentifier 59 | $(PRODUCT_BUNDLE_IDENTIFIER).CustomWarningCommand 60 | XCSourceEditorCommandName 61 | Insert Custom Warning 62 | 63 | 64 | XCSourceEditorCommandClassName 65 | $(PRODUCT_MODULE_NAME).IgnoreDeprecatedCommand 66 | XCSourceEditorCommandIdentifier 67 | $(PRODUCT_BUNDLE_IDENTIFIER).IgnoreDeprecatedCommand 68 | XCSourceEditorCommandName 69 | Compiler: Ignore Deprecated for Selection 70 | 71 | 72 | XCSourceEditorCommandClassName 73 | $(PRODUCT_MODULE_NAME).IgnoreFormatCommand 74 | XCSourceEditorCommandIdentifier 75 | $(PRODUCT_BUNDLE_IDENTIFIER).IgnoreFormatCommand 76 | XCSourceEditorCommandName 77 | Compiler: Ignore Format for Selection 78 | 79 | 80 | XCSourceEditorCommandClassName 81 | $(PRODUCT_MODULE_NAME).IgnoreSelectorLeakCommand 82 | XCSourceEditorCommandIdentifier 83 | $(PRODUCT_BUNDLE_IDENTIFIER).IgnoreSelectorLeakCommand 84 | XCSourceEditorCommandName 85 | Compiler: Ignore performSelector Leaks for Selection 86 | 87 | 88 | XCSourceEditorExtensionPrincipalClass 89 | $(PRODUCT_MODULE_NAME).PragmaticXcodeExtension 90 | 91 | NSExtensionPointIdentifier 92 | com.apple.dt.Xcode.extension.source-editor 93 | 94 | NSHumanReadableCopyright 95 | Copyright © 2017-2022 Brian Ganninger. All rights reserved. 96 | 97 | 98 | -------------------------------------------------------------------------------- /PragmaticXcode/CommandLogic.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Brian Ganninger on 2/5/17. 3 | // Copyright © 2017 Brian Ganninger. All rights reserved. 4 | // 5 | 6 | import XcodeKit 7 | 8 | func insertIgnore(invocation: XCSourceEditorCommandInvocation, comment: String, suppressedWarning: String) { 9 | // swiftlint:disable:next empty_count 10 | if invocation.buffer.selections.count > 0 && invocation.buffer.lines.count > 0 { 11 | guard let selection = invocation.buffer.selections.firstObject as? XCSourceTextRange else { 12 | return 13 | } 14 | 15 | let index = selection.start.line 16 | let end = selection.end.line 17 | 18 | invocation.buffer.lines.insert(comment, at: index) 19 | invocation.buffer.lines.insert("#pragma GCC diagnostic push", at: index + 1) 20 | invocation.buffer.lines.insert("#pragma GCC diagnostic ignored \"" + suppressedWarning + "\"", at: index + 2) 21 | invocation.buffer.lines.insert("#pragma GCC diagnostic pop", at: end + 3) 22 | 23 | let updatedSelection = XCSourceTextRange(start: XCSourceTextPosition(line: index + 3, column: 0), 24 | end: XCSourceTextPosition(line: index + 3, column: 0)) 25 | invocation.buffer.selections.removeAllObjects() 26 | invocation.buffer.selections.add(updatedSelection) 27 | } 28 | } 29 | 30 | func insertEditableLine(invocation: XCSourceEditorCommandInvocation, contents: String, editPosition: Int) { 31 | // swiftlint:disable:next empty_count 32 | if invocation.buffer.selections.count > 0 && invocation.buffer.lines.count > 0 { 33 | guard let selection = invocation.buffer.selections.firstObject as? XCSourceTextRange else { 34 | return 35 | } 36 | let index = selection.start.line 37 | let updatedSelection = XCSourceTextRange(start: XCSourceTextPosition(line: index, column: editPosition), 38 | end: XCSourceTextPosition(line: index, column: editPosition)) 39 | 40 | invocation.buffer.lines.insert(contents, at: index) 41 | invocation.buffer.selections.removeAllObjects() 42 | invocation.buffer.selections.add(updatedSelection) 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /PragmaticXcode/CustomWarningCommand.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Brian Ganninger on 4/1/17. 3 | // Copyright © 2017 Brian Ganninger. All rights reserved. 4 | // 5 | 6 | import XcodeKit 7 | 8 | class CustomWarningCommand: NSObject, XCSourceEditorCommand { 9 | func perform(with invocation: XCSourceEditorCommandInvocation, completionHandler: @escaping (Error?) -> Void ) { 10 | insertEditableLine(invocation: invocation, contents: "#pragma GCC warning \"\"", editPosition: 21) 11 | completionHandler(nil) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /PragmaticXcode/IgnoreDeprecatedCommand.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Brian Ganninger on 2/4/17. 3 | // Copyright © 2017 Brian Ganninger. All rights reserved. 4 | // 5 | 6 | import XcodeKit 7 | 8 | class IgnoreDeprecatedCommand: NSObject, XCSourceEditorCommand { 9 | func perform(with invocation: XCSourceEditorCommandInvocation, completionHandler: @escaping (Error?) -> Void ) { 10 | insertIgnore(invocation: invocation, 11 | comment: "// FIXME: temporarily ignoring deprecated API usage; revisit ASAP!", 12 | suppressedWarning: "-Wdeprecated-declarations") 13 | 14 | completionHandler(nil) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /PragmaticXcode/IgnoreEmptyCommand.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Brian Ganninger on 2/4/17. 3 | // Copyright © 2017 Brian Ganninger. All rights reserved. 4 | // 5 | 6 | import XcodeKit 7 | 8 | class IgnoreEmptyCommand: NSObject, XCSourceEditorCommand { 9 | func perform(with invocation: XCSourceEditorCommandInvocation, completionHandler: @escaping (Error?) -> Void) { 10 | insertIgnore(invocation: invocation, 11 | comment: "// FIXME: temporarily ignoring uninitialized variables; revisit ASAP!", 12 | suppressedWarning: "-Wuninitialized") 13 | 14 | completionHandler(nil) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /PragmaticXcode/IgnoreFormatCommand.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Brian Ganninger on 2/5/17. 3 | // Copyright © 2017 Brian Ganninger. All rights reserved. 4 | // 5 | 6 | import XcodeKit 7 | 8 | class IgnoreFormatCommand: NSObject, XCSourceEditorCommand { 9 | func perform(with invocation: XCSourceEditorCommandInvocation, completionHandler: @escaping (Error?) -> Void ) { 10 | insertIgnore(invocation: invocation, 11 | comment: "// FIXME: temporarily ignoring format issues; revisit ASAP!", 12 | suppressedWarning: "-Wformat") 13 | 14 | completionHandler(nil) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /PragmaticXcode/IgnoreSelectorLeakCommand.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Brian Ganninger on 2/4/17. 3 | // Copyright © 2017 Brian Ganninger. All rights reserved. 4 | // 5 | 6 | import XcodeKit 7 | 8 | class IgnoreSelectorLeakCommand: NSObject, XCSourceEditorCommand { 9 | func perform(with invocation: XCSourceEditorCommandInvocation, completionHandler: @escaping (Error?) -> Void ) { 10 | insertIgnore(invocation: invocation, 11 | comment: "// FIXME: temporarily ignoring performSelector leaks; revisit ASAP!", 12 | suppressedWarning: "-Warc-performSelector-leaks") 13 | 14 | completionHandler(nil) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /PragmaticXcode/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.4 19 | CFBundleVersion 20 | 6 21 | LSApplicationCategoryType 22 | public.app-category.developer-tools 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | Copyright © 2017-2022 Brian Ganninger. All rights reserved. 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /PragmaticXcode/PragmaOnceCommand.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Brian Ganninger on 2/25/17. 3 | // Copyright © 2017 Brian Ganninger. All rights reserved. 4 | // 5 | 6 | import XcodeKit 7 | 8 | class PragmaOnceCommand: NSObject, XCSourceEditorCommand { 9 | func perform(with invocation: XCSourceEditorCommandInvocation, completionHandler: @escaping (Error?) -> Void) { 10 | // swiftlint:disable:next empty_count 11 | if invocation.buffer.selections.count > 0 && invocation.buffer.lines.count > 0 { 12 | guard let selection = invocation.buffer.selections.firstObject as? XCSourceTextRange else { 13 | return 14 | } 15 | 16 | var index = selection.start.line 17 | guard let entryLine = invocation.buffer.lines[index - 1] as? NSString, 18 | let exitLine = invocation.buffer.lines[index] as? NSString else { 19 | return 20 | } 21 | 22 | var needsEntryNewline = (entryLine.rangeOfCharacter(from: CharacterSet.alphanumerics).location != NSNotFound) 23 | var needsExitNewline = (exitLine.rangeOfCharacter(from: CharacterSet.alphanumerics).location != NSNotFound) 24 | 25 | if !needsEntryNewline { 26 | needsEntryNewline = (entryLine.range(of: "/").location != NSNotFound) 27 | } 28 | 29 | if !needsExitNewline { 30 | needsExitNewline = (exitLine.range(of: "/").location != NSNotFound) 31 | } 32 | 33 | invocation.buffer.selections.removeAllObjects() 34 | 35 | if needsEntryNewline { 36 | invocation.buffer.lines.insert("\n", at: index) 37 | index += 1 38 | } 39 | 40 | let headerString = "#pragma once" 41 | invocation.buffer.lines.insert(headerString, at: index) 42 | index += 1 43 | 44 | if needsExitNewline { 45 | invocation.buffer.lines.insert("\n", at: index) 46 | index += 1 47 | } 48 | 49 | let updatedSelection = XCSourceTextRange(start: XCSourceTextPosition(line: index, column: 0), 50 | end: XCSourceTextPosition(line: index, column: 0)) 51 | invocation.buffer.selections.add(updatedSelection) 52 | } 53 | 54 | completionHandler(nil) 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /PragmaticXcode/PragmaticXcode.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /PragmaticXcode/PragmaticXcodeExtension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Brian Ganninger on 2/4/17. 3 | // Copyright © 2017 Brian Ganninger. All rights reserved. 4 | // 5 | 6 | import XcodeKit 7 | 8 | class PragmaticXcodeExtension: NSObject, XCSourceEditorExtension { 9 | } 10 | -------------------------------------------------------------------------------- /PragmaticXcode/SectionHeaderCommand.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Brian Ganninger on 2/4/17. 3 | // Copyright © 2017 Brian Ganninger. All rights reserved. 4 | // 5 | 6 | import XcodeKit 7 | 8 | class SectionHeaderCommand: NSObject, XCSourceEditorCommand { 9 | func perform(with invocation: XCSourceEditorCommandInvocation, completionHandler: @escaping (Error?) -> Void ) { 10 | insertEditableLine(invocation: invocation, contents: "#pragma mark - -", editPosition: 15) 11 | 12 | completionHandler(nil) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /PragmaticXcode/TodoCommand.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Brian Ganninger on 1/16/22. 3 | // Copyright © 2022 Brian Ganninger. All rights reserved. 4 | // 5 | 6 | import XcodeKit 7 | 8 | class TodoCommand: NSObject, XCSourceEditorCommand { 9 | func perform(with invocation: XCSourceEditorCommandInvocation, completionHandler: @escaping (Error?) -> Void ) { 10 | insertEditableLine(invocation: invocation, contents: "#pragma TODO: ", editPosition: 14) 11 | 12 | completionHandler(nil) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Pragmatic 2 | 3 | `Pragmatic` is an Xcode Source Editor extension for simplifying common pragma driven tasks. 4 | 5 | ![Pragmatic Usage Demo](Resources/demo.gif) 6 | 7 | [![GitHub release](https://img.shields.io/github/release/bgannin/Pragmatic.svg)](https://github.com/bgannin/Pragmatic/releases) 8 | [![Language](https://img.shields.io/badge/language-Swift%205.5-orange.svg)](https://swift.org/) 9 | [![License](https://img.shields.io/badge/license-MIT-red.svg)](https://github.com/bgannin/Pragmatic/blob/master/LICENSE) 10 | 11 | ## Features 12 | 13 | - ✅ Insert Section Header 14 | - ✅ Insert Custom Warning 15 | - ✅ Insert Pragma Once Guard 16 | - ✅ Ignore Uninitialized for Selection 17 | - ✅ Ignore Deprecated for Selection 18 | - ✅ Ignore performSelector Leaks for Selection 19 | - ✅ Ignore Format for Selection 20 | - 📎 Preferences panel 21 | 22 | ## Supported languages 23 | 24 | - Objective-C 25 | - C++ *(untested)* 26 | - C 27 | 28 | ## Supported Xcode 29 | 30 | - Xcode 13.x 31 | 32 | ## Supported OSes 33 | 34 | - macOS 11.x *(Big Sur)* 35 | - macOS 12.x *(Monterey)* 36 | 37 | ## Tips 38 | 39 | Set up key bindings in Xcode to speed up usage! 40 | 41 | ![Pragmatic Usage Demo](Resources/Keybindings.png) 42 | 43 | ## Contributing 44 | 45 | This project is a team effort from concept to community and there are many ways to contribute. Please join in today! *(just make sure to follow the [Code of Conduct](CODE_OF_CONDUCT.md))* 😀 46 | 47 | * [Star and Watch This Repository](https://github.com/bgannin/Pragmatic/) 48 | * [File Or Comment On Issues](https://github.com/bgannin/Pragmatic/issues) 49 | * [Write Documentation](https://github.com/bgannin/Pragmatic/wiki) 50 | * [Submit Pull Requests](https://github.com/bgannin/Pragmatic/pulls) *(check Issues first!)* 51 | 52 | ## Contributors 53 | 54 | [![Twitter](https://img.shields.io/badge/twitter-@bgannin-blue.svg)](https://twitter.com/bgannin) 55 | 56 | ## License 57 | 58 | `Pragmatic` is released under the MIT license. Please see the [LICENSE](LICENSE.md) file for additional details. 59 | -------------------------------------------------------------------------------- /Resources/Keybindings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgannin/Pragmatic/59438a66fb24c4ca67b3cb8d0b2103b35f6be888/Resources/Keybindings.png -------------------------------------------------------------------------------- /Resources/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgannin/Pragmatic/59438a66fb24c4ca67b3cb8d0b2103b35f6be888/Resources/demo.gif -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bgannin/Pragmatic/59438a66fb24c4ca67b3cb8d0b2103b35f6be888/logo.png --------------------------------------------------------------------------------