├── .editorconfig ├── .github ├── FUNDING.yml └── workflows │ └── ci.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── Formula └── xclint.rb ├── LICENSE ├── Package.resolved ├── Package.swift ├── README.md ├── Sources ├── XCLinting │ ├── ConfigurationFile.swift │ ├── Extensions │ │ ├── PBXProj+BuildSettings.swift │ │ └── XCBuildConfiguration+BuildSettings.swift │ ├── Rules │ │ ├── BuildFilesAreOrderedRule.swift │ │ ├── EmbeddedBuildSettingsRule.swift │ │ ├── GroupsAreSortedRule.swift │ │ ├── ImplicitDependenciesRule.swift │ │ ├── ProjectsUseXCConfigRule.swift │ │ ├── RelativePathsRule.swift │ │ ├── SharedSchemeSkipsTestsRule.swift │ │ ├── SharedSchemesRule.swift │ │ ├── TargetsUseXCConfigRule.swift │ │ └── ValidateBuildSettingsRule.swift │ ├── Violation.swift │ ├── XCLintError.swift │ └── XCLinter.swift └── clitool │ └── main.swift └── Tests └── XCLintTests ├── BuildFilesAreOrderedTests.swift ├── Bundle+TestData.swift ├── ConfigurationFileTests.swift ├── EmbeddedBuildSettingsRuleTests.swift ├── GroupsAreSortedRuleTests.swift ├── ImplicitDependenciesRuleTests.swift ├── ProjectsUseXCConfigRuleTests.swift ├── RelativePathsRuleTests.swift ├── SharedSchemeSkipsTestsRuleTests.swift ├── SharedSchemesRuleTests.swift ├── TargetsUseXCConfigRuleTests.swift ├── TestData ├── AbsolueFileReference.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── StockMacOSApp.xcscheme ├── BuildFilesOutOfOrder.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── BuildSettingsRemoved.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── FileOrderedWithExtensions.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── ImplicitDependenciesDisabled.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── StockMacOSApp.xcscheme ├── InvalidEmbeddedBuildSettings.xcodeproj │ └── project.pbxproj ├── ProjectOnlyBuildSettings.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── ProjectsUseXCConfigFiles.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── SchemeSkipsTestBundles.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── SchemeSkipsTests.xcscheme ├── SchemeSkipsTests.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── SchemeSkipsTests.xcscheme ├── SortedGroups.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── SortedGroupsByReference.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── StockMacOSApp.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── StockMacOSApp.xcscheme ├── TargetsUseXCConfigFiles.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── UnsortedGroups.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── XCConfFile-Debug.xcconfig ├── XCConfFile-Release.xcconfig ├── XCConfFileTarget-Release.xcconfig └── XCConfigFiles.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── ValidateBuildSettingsRuleTests.swift └── XCLinterTests.swift /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = tab 5 | indent_size = 4 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [mattmassicotte] 2 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | paths-ignore: 8 | - 'README.md' 9 | - 'CODE_OF_CONDUCT.md' 10 | - '.editorconfig' 11 | - '.spi.yml' 12 | pull_request: 13 | branches: 14 | - main 15 | 16 | jobs: 17 | macos: 18 | name: Test 19 | runs-on: macOS-15 20 | env: 21 | DEVELOPER_DIR: /Applications/Xcode_16.3.app/Contents/Developer 22 | steps: 23 | - uses: actions/checkout@v4 24 | - name: Test 25 | run: set -o pipefail && xcodebuild -scheme XCLint-Package -destination "platform=macOS" test | xcbeautify 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /.build 3 | /Packages 4 | xcuserdata/ 5 | DerivedData/ 6 | .swiftpm/configuration/registries.json 7 | .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata 8 | .netrc 9 | .swiftpm/xcode/xcshareddata/xcschemes/*.xcscheme 10 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | 2 | # Contributor Covenant Code of Conduct 3 | 4 | ## Our Pledge 5 | 6 | We as members, contributors, and leaders pledge to make participation in our 7 | community a harassment-free experience for everyone, regardless of age, body 8 | size, visible or invisible disability, ethnicity, sex characteristics, gender 9 | identity and expression, level of experience, education, socio-economic status, 10 | nationality, personal appearance, race, caste, color, religion, or sexual 11 | identity and orientation. 12 | 13 | We pledge to act and interact in ways that contribute to an open, welcoming, 14 | diverse, inclusive, and healthy community. 15 | 16 | ## Our Standards 17 | 18 | Examples of behavior that contributes to a positive environment for our 19 | community include: 20 | 21 | * Demonstrating empathy and kindness toward other people 22 | * Being respectful of differing opinions, viewpoints, and experiences 23 | * Giving and gracefully accepting constructive feedback 24 | * Accepting responsibility and apologizing to those affected by our mistakes, 25 | and learning from the experience 26 | * Focusing on what is best not just for us as individuals, but for the overall 27 | community 28 | 29 | Examples of unacceptable behavior include: 30 | 31 | * The use of sexualized language or imagery, and sexual attention or advances of 32 | any kind 33 | * Trolling, insulting or derogatory comments, and personal or political attacks 34 | * Public or private harassment 35 | * Publishing others' private information, such as a physical or email address, 36 | without their explicit permission 37 | * Other conduct which could reasonably be considered inappropriate in a 38 | professional setting 39 | 40 | ## Enforcement Responsibilities 41 | 42 | Community leaders are responsible for clarifying and enforcing our standards of 43 | acceptable behavior and will take appropriate and fair corrective action in 44 | response to any behavior that they deem inappropriate, threatening, offensive, 45 | or harmful. 46 | 47 | Community leaders have the right and responsibility to remove, edit, or reject 48 | comments, commits, code, wiki edits, issues, and other contributions that are 49 | not aligned to this Code of Conduct, and will communicate reasons for moderation 50 | decisions when appropriate. 51 | 52 | ## Scope 53 | 54 | This Code of Conduct applies within all community spaces, and also applies when 55 | an individual is officially representing the community in public spaces. 56 | Examples of representing our community include using an official e-mail address, 57 | posting via an official social media account, or acting as an appointed 58 | representative at an online or offline event. 59 | 60 | ## Enforcement 61 | 62 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 63 | reported to the community leaders responsible for enforcement at 64 | support@chimehq.com. 65 | All complaints will be reviewed and investigated promptly and fairly. 66 | 67 | All community leaders are obligated to respect the privacy and security of the 68 | reporter of any incident. 69 | 70 | ## Enforcement Guidelines 71 | 72 | Community leaders will follow these Community Impact Guidelines in determining 73 | the consequences for any action they deem in violation of this Code of Conduct: 74 | 75 | ### 1. Correction 76 | 77 | **Community Impact**: Use of inappropriate language or other behavior deemed 78 | unprofessional or unwelcome in the community. 79 | 80 | **Consequence**: A private, written warning from community leaders, providing 81 | clarity around the nature of the violation and an explanation of why the 82 | behavior was inappropriate. A public apology may be requested. 83 | 84 | ### 2. Warning 85 | 86 | **Community Impact**: A violation through a single incident or series of 87 | actions. 88 | 89 | **Consequence**: A warning with consequences for continued behavior. No 90 | interaction with the people involved, including unsolicited interaction with 91 | those enforcing the Code of Conduct, for a specified period of time. This 92 | includes avoiding interactions in community spaces as well as external channels 93 | like social media. Violating these terms may lead to a temporary or permanent 94 | ban. 95 | 96 | ### 3. Temporary Ban 97 | 98 | **Community Impact**: A serious violation of community standards, including 99 | sustained inappropriate behavior. 100 | 101 | **Consequence**: A temporary ban from any sort of interaction or public 102 | communication with the community for a specified period of time. No public or 103 | private interaction with the people involved, including unsolicited interaction 104 | with those enforcing the Code of Conduct, is allowed during this period. 105 | Violating these terms may lead to a permanent ban. 106 | 107 | ### 4. Permanent Ban 108 | 109 | **Community Impact**: Demonstrating a pattern of violation of community 110 | standards, including sustained inappropriate behavior, harassment of an 111 | individual, or aggression toward or disparagement of classes of individuals. 112 | 113 | **Consequence**: A permanent ban from any sort of public interaction within the 114 | community. 115 | 116 | ## Attribution 117 | 118 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 119 | version 2.1, available at 120 | [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. 121 | 122 | Community Impact Guidelines were inspired by 123 | [Mozilla's code of conduct enforcement ladder][Mozilla CoC]. 124 | 125 | For answers to common questions about this code of conduct, see the FAQ at 126 | [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at 127 | [https://www.contributor-covenant.org/translations][translations]. 128 | 129 | [homepage]: https://www.contributor-covenant.org 130 | [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html 131 | [Mozilla CoC]: https://github.com/mozilla/diversity 132 | [FAQ]: https://www.contributor-covenant.org/faq 133 | [translations]: https://www.contributor-covenant.org/translations 134 | -------------------------------------------------------------------------------- /Formula/xclint.rb: -------------------------------------------------------------------------------- 1 | class Xclint < Formula 2 | desc "Xcode project linting" 3 | homepage "https://github.com/mattmassicotte/XCLint" 4 | url "https://github.com/mattmassicotte/XCLint.git", branch: "main" 5 | head "https://github.com/mattmassicotte/XCLint", branch: "main" 6 | version "0.1.5" 7 | 8 | depends_on :xcode => ["15.0", :build] 9 | 10 | def install 11 | system "xcrun", "swift", "build", "-c", "release", "--disable-sandbox" 12 | bin.install ".build/release/xclint" 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2023, Matt Massicotte 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | 3. Neither the name of the copyright holder nor the names of its 16 | contributors may be used to endorse or promote products derived from 17 | this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "pins" : [ 3 | { 4 | "identity" : "aexml", 5 | "kind" : "remoteSourceControl", 6 | "location" : "https://github.com/tadija/AEXML.git", 7 | "state" : { 8 | "revision" : "db806756c989760b35108146381535aec231092b", 9 | "version" : "4.7.0" 10 | } 11 | }, 12 | { 13 | "identity" : "pathkit", 14 | "kind" : "remoteSourceControl", 15 | "location" : "https://github.com/kylef/PathKit.git", 16 | "state" : { 17 | "revision" : "3bfd2737b700b9a36565a8c94f4ad2b050a5e574", 18 | "version" : "1.0.1" 19 | } 20 | }, 21 | { 22 | "identity" : "spectre", 23 | "kind" : "remoteSourceControl", 24 | "location" : "https://github.com/kylef/Spectre.git", 25 | "state" : { 26 | "revision" : "26cc5e9ae0947092c7139ef7ba612e34646086c7", 27 | "version" : "0.10.1" 28 | } 29 | }, 30 | { 31 | "identity" : "swift-argument-parser", 32 | "kind" : "remoteSourceControl", 33 | "location" : "https://github.com/apple/swift-argument-parser", 34 | "state" : { 35 | "revision" : "0fbc8848e389af3bb55c182bc19ca9d5dc2f255b", 36 | "version" : "1.4.0" 37 | } 38 | }, 39 | { 40 | "identity" : "xcconfig", 41 | "kind" : "remoteSourceControl", 42 | "location" : "https://github.com/mattmassicotte/XCConfig", 43 | "state" : { 44 | "revision" : "fda9516ccdd073812b6d16a0bd702204b14e70a3" 45 | } 46 | }, 47 | { 48 | "identity" : "xcodeproj", 49 | "kind" : "remoteSourceControl", 50 | "location" : "https://github.com/tuist/XcodeProj", 51 | "state" : { 52 | "revision" : "4488984883071307a9136251e7ccf06a41b6258d", 53 | "version" : "9.4.2" 54 | } 55 | }, 56 | { 57 | "identity" : "yams", 58 | "kind" : "remoteSourceControl", 59 | "location" : "https://github.com/jpsim/Yams.git", 60 | "state" : { 61 | "revision" : "0d9ee7ea8c4ebd4a489ad7a73d5c6cad55d6fed3", 62 | "version" : "5.0.6" 63 | } 64 | } 65 | ], 66 | "version" : 2 67 | } 68 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version: 5.9 2 | 3 | import PackageDescription 4 | 5 | let package = Package( 6 | name: "XCLint", 7 | platforms: [.macOS(.v13)], 8 | products: [ 9 | .executable(name: "xclint", targets: ["clitool"]), 10 | // I'd prefer to name this "XCLint", but it seems like Xcode cannot handle two products with the same name, even if they differ in case 11 | .library(name: "XCLinting", targets: ["XCLinting"]), 12 | ], 13 | dependencies: [ 14 | .package(url: "https://github.com/tuist/XcodeProj", from: "9.0.2"), 15 | .package(url: "https://github.com/mattmassicotte/XCConfig", revision: "fda9516ccdd073812b6d16a0bd702204b14e70a3"), 16 | .package(url: "https://github.com/apple/swift-argument-parser", from: "1.2.3"), 17 | .package(url: "https://github.com/jpsim/Yams.git", from: "5.0.0") 18 | ], 19 | targets: [ 20 | .executableTarget(name: "clitool", dependencies: [ 21 | "XCLinting", 22 | .product(name: "ArgumentParser", package: "swift-argument-parser"), 23 | "Yams" 24 | ]), 25 | .target(name: "XCLinting", dependencies: ["XCConfig", "XcodeProj"]), 26 | .testTarget( 27 | name: "XCLintTests", 28 | dependencies: ["XCLinting", "XcodeProj"], 29 | resources: [ 30 | .copy("TestData"), 31 | ] 32 | ), 33 | ] 34 | ) 35 | 36 | let swiftSettings: [SwiftSetting] = [ 37 | .enableExperimentalFeature("StrictConcurrency") 38 | ] 39 | 40 | for target in package.targets { 41 | var settings = target.swiftSettings ?? [] 42 | settings.append(contentsOf: swiftSettings) 43 | target.swiftSettings = settings 44 | } 45 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | [![Build Status][build status badge]][build status] 4 | [![Platforms][platforms badge]][platforms] 5 | 6 |
7 | 8 | # XCLint 9 | Xcode project linting 10 | 11 | This project is still pretty young, and has rough edges. However, it kinda works! So, please do give it a shot. 12 | 13 | ## Installation 14 | 15 | XCLint is available as both a commandline tool and a library. 16 | 17 | Tool: 18 | 19 | ``` 20 | brew tap mattmassicotte/XCLint https://github.com/mattmassicotte/XCLint.git 21 | brew install xclint 22 | ``` 23 | 24 | Package: 25 | 26 | ```swift 27 | dependencies: [ 28 | .package(url: "https://github.com/mattmassicotte/XCLint", branch: "main") 29 | ], 30 | targets: [ 31 | .testTarget(name: "MyTarget", dependencies: ["XCLinting"]), 32 | ] 33 | ``` 34 | 35 | ## Tool Usage 36 | 37 | Just run the `xclint` binary in your project directory. Check out its `-h` flag for more usage. 38 | 39 | ``` 40 | # cd my/project 41 | # xclint 42 | ``` 43 | 44 | This will run a default set of rules. But, you can customize its behavior with a `.xclint.yml` file. The basic structure borrows a lot from [SwiftLint](https://github.com/realm/SwiftLint). 45 | 46 | ```yaml 47 | # Some rules may not be appropriate for all projects. You must opt-in those. 48 | opt_in_rules: 49 | - embedded_build_setting # checks for build settings in the project file 50 | - groups_sorted # checks that all group contents are alphabetically sorted 51 | - implicit_dependencies # checks for any schemes that have "Find Implicit Dependencies" enabled 52 | - targets_use_xcconfig # checks for any targets without a XCConfig file set 53 | - projects_use_xcconfig # checks for any projects without a XCConfig file set 54 | - shared_scheme_skips_tests # checks for any shared schemes that have disabled tests 55 | - shared_schemes # checks that all targets have a shared scheme present 56 | 57 | # Other rules make sense for all projects by default. You must opt-out of those. 58 | disabled_rules: 59 | - build_files_ordered # checks that the ordering of techincally-unordered collections Xcode writes out is preserved 60 | - validate_build_settings # checks that build settings have valid values 61 | - relative_paths # checks for any absolute file references 62 | ``` 63 | 64 | ## Alternatives 65 | 66 | I was kind of hoping that some else had built something like this. And they have! However, none of the things I found are maintained any more. 67 | 68 | - [ProjLint](https://github.com/JamitLabs/ProjLint) 69 | - [XcodeProjLint](https://github.com/RocketLaunchpad/XcodeProjLint) 70 | - [xcprojectlint](https://github.com/americanexpress/xcprojectlint) 71 | 72 | ## Contributing and Collaboration 73 | 74 | I'd love to hear from you! Get in touch via [mastodon](https://mastodon.social/@mattiem), an issue, or a pull request. 75 | 76 | I prefer collaboration, and would love to find ways to work together if you have a similar project. 77 | 78 | I prefer indentation with tabs for improved accessibility. But, I'd rather you use the system you want and make a PR than hesitate because of whitespace. 79 | 80 | By participating in this project you agree to abide by the [Contributor Code of Conduct](CODE_OF_CONDUCT.md). 81 | 82 | [build status]: https://github.com/mattmassicotte/XCLint/actions 83 | [build status badge]: https://github.com/mattmassicotte/XCLint/workflows/CI/badge.svg 84 | [platforms]: https://swiftpackageindex.com/mattmassicotte/XCLint 85 | [platforms badge]: https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fmattmassicotte%2FXCLint%2Fbadge%3Ftype%3Dplatforms 86 | [documentation]: https://swiftpackageindex.com/mattmassicotte/XCLint/main/documentation 87 | [documentation badge]: https://img.shields.io/badge/Documentation-DocC-blue 88 | -------------------------------------------------------------------------------- /Sources/XCLinting/ConfigurationFile.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public struct Configuration: Hashable { 4 | public var disabledRules: Set 5 | public var optInRules: Set 6 | public var rules: [String: RuleConfiguration] 7 | 8 | public init( 9 | rules: [String: RuleConfiguration] = [:], 10 | disabledRules: Set = Set(), 11 | optInRules: Set = Set() 12 | ) { 13 | self.rules = rules 14 | self.disabledRules = disabledRules 15 | self.optInRules = optInRules 16 | } 17 | } 18 | 19 | extension Configuration { 20 | public enum RuleConfiguration: Codable { 21 | case warning 22 | case error 23 | 24 | public init(from decoder: Decoder) throws { 25 | let container = try decoder.singleValueContainer() 26 | 27 | if let value = try? container.decode(String.self) { 28 | switch value { 29 | case "warning": 30 | self = .warning 31 | return 32 | case "error": 33 | self = .error 34 | return 35 | default: 36 | break 37 | } 38 | } 39 | 40 | throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath, debugDescription: "failed to decode rule configuration object")) 41 | } 42 | } 43 | } 44 | 45 | extension Configuration: Decodable { 46 | enum CodingKeys: CodingKey { 47 | /// Contains all the top-level well-defined keys used in a configuration file 48 | enum PredefinedKeys: String { 49 | case disabledRules = "disabled_rules" 50 | case optInRules = "opt_in_rules" 51 | } 52 | 53 | case disabledRules 54 | case optInRules 55 | case ruleIdentifier(String) 56 | 57 | init?(intValue: Int) { 58 | return nil 59 | } 60 | 61 | init?(stringValue: String) { 62 | switch stringValue { 63 | case PredefinedKeys.disabledRules.rawValue: 64 | self = .disabledRules 65 | case PredefinedKeys.optInRules.rawValue: 66 | self = .optInRules 67 | default: 68 | self = .ruleIdentifier(stringValue) 69 | } 70 | } 71 | 72 | var stringValue: String { 73 | switch self { 74 | case .disabledRules: 75 | PredefinedKeys.disabledRules.rawValue 76 | case .optInRules: 77 | PredefinedKeys.optInRules.rawValue 78 | case let .ruleIdentifier(value): 79 | value 80 | } 81 | } 82 | 83 | var intValue: Int? { 84 | return nil 85 | } 86 | } 87 | 88 | public init(from decoder: Decoder) throws { 89 | let container = try decoder.container(keyedBy: CodingKeys.self) 90 | 91 | self.disabledRules = Set() 92 | self.optInRules = Set() 93 | 94 | var decodedRules = [String: RuleConfiguration]() 95 | 96 | for key in container.allKeys { 97 | switch key { 98 | case .disabledRules: 99 | self.disabledRules = try container.decode(Set.self, forKey: key) 100 | case .optInRules: 101 | self.optInRules = try container.decode(Set.self, forKey: key) 102 | case let .ruleIdentifier(name): 103 | let ruleConfig = try container.decode(RuleConfiguration.self, forKey: key) 104 | 105 | decodedRules[name] = ruleConfig 106 | } 107 | } 108 | 109 | self.rules = decodedRules 110 | } 111 | 112 | public func validate() throws { 113 | let allIdentifiers = XCLinter.ruleIdentifiers 114 | 115 | for id in disabledRules { 116 | if allIdentifiers.contains(id) == false { 117 | throw XCLintError.unrecognizedRuleName(id) 118 | } 119 | } 120 | 121 | for id in optInRules { 122 | if allIdentifiers.contains(id) == false { 123 | throw XCLintError.unrecognizedRuleName(id) 124 | } 125 | } 126 | } 127 | } 128 | 129 | extension Configuration { 130 | public var enabledRules: Set { 131 | let defaultIdentifiers = XCLinter.defaultRuleIdentifiers 132 | 133 | return defaultIdentifiers 134 | .union(optInRules) 135 | .subtracting(disabledRules) 136 | } 137 | } 138 | -------------------------------------------------------------------------------- /Sources/XCLinting/Extensions/PBXProj+BuildSettings.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | import XCConfig 4 | import XcodeProj 5 | import enum XCConfig.BuildSetting 6 | 7 | extension Parser { 8 | func parse(contentsOf url: URL) throws -> [Statement] { 9 | let string = try String(contentsOf: url) 10 | 11 | return parse(string) 12 | } 13 | } 14 | 15 | extension PBXProj { 16 | func enumerateBuildConfigurations(_ block: (String, XCConfigurationList) throws -> Void) rethrows { 17 | for target in legacyTargets { 18 | guard let list = target.buildConfigurationList else { continue } 19 | 20 | try block(target.name, list) 21 | } 22 | 23 | for target in nativeTargets { 24 | guard let list = target.buildConfigurationList else { continue } 25 | 26 | try block(target.name, list) 27 | } 28 | } 29 | 30 | func enumerateTargets(_ block: (PBXProject, PBXTarget) throws -> Void) rethrows { 31 | for proj in projects { 32 | for target in proj.targets { 33 | try block(proj, target) 34 | } 35 | } 36 | } 37 | 38 | func enumerateBuildSettingStatements( 39 | rootURL: URL, 40 | _ block: (PBXProject, PBXTarget, XCBuildConfiguration, [BuildSetting: String]) throws -> Void 41 | ) throws { 42 | let sourceRootPath = rootURL.path 43 | 44 | for proj in projects { 45 | let projConfigList = proj.buildConfigurationList 46 | 47 | for target in proj.targets { 48 | for config in target.buildConfigurationList?.buildConfigurations ?? [] { 49 | let projConfig = projConfigList?.configuration(name: config.name) 50 | let projConfigURL = try projConfig?.baseConfigurationURL(with: sourceRootPath) 51 | let configURL = try config.baseConfigurationURL(with: sourceRootPath) 52 | 53 | let heirarchy = BuildSettingsHeirarchy( 54 | projectRootURL: rootURL, 55 | platformDefaults: [], 56 | projectConfigURL: projConfigURL, 57 | project: projConfig?.buildSettingsAssignments ?? [], 58 | configURL: configURL, 59 | target: config.buildSettingsAssignments 60 | ) 61 | 62 | let settings: [BuildSetting: String] 63 | 64 | do { 65 | settings = try Evaluator().evaluate(heirarchy) 66 | } catch { 67 | print("XCConfig failed to evaluate settings heirarchy:", error) 68 | settings = [:] 69 | } 70 | 71 | try block(proj, target, config, settings) 72 | } 73 | } 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /Sources/XCLinting/Extensions/XCBuildConfiguration+BuildSettings.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | import XCConfig 4 | import XcodeProj 5 | 6 | extension XCBuildConfiguration { 7 | func baseConfigurationURL(with sourceRoot: String) throws -> URL? { 8 | guard let fullPath = try baseConfiguration?.fullPath(sourceRoot: sourceRoot) else { 9 | return nil 10 | } 11 | 12 | return URL(fileURLWithPath: fullPath, isDirectory: false) 13 | } 14 | 15 | var buildSettingsAssignments: [Assignment] { 16 | buildSettings.compactMap { (key, value) -> Assignment? in 17 | guard let value = value.stringValue else { return nil } 18 | 19 | return Assignment(key: key, value: value) 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Sources/XCLinting/Rules/BuildFilesAreOrderedRule.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct BuildFilesAreOrderedRule { 4 | 5 | func run(_ environment: XCLinter.Environment) throws -> [Violation] { 6 | let projectText = try String(contentsOf: environment.projectRootURL.appendingPathComponent("project.pbxproj")) 7 | var violations = [Violation]() 8 | violations.append(contentsOf: try validateSection(forType: "PBXBuildFile", projectText: projectText)) 9 | violations.append(contentsOf: try validateSection(forType: "PBXFileReference", projectText: projectText)) 10 | return violations 11 | } 12 | 13 | private func validateSection(forType sectionType: String, projectText: String) throws -> [Violation] { 14 | // Find the range in projectText for the sectionType 15 | guard let range = getSectionRange(forType: sectionType, projectText: projectText) else { 16 | throw XCLintError.badProjectFile("Missing \(sectionType) section") 17 | } 18 | 19 | // split this range of projectText into lines. convert to String now to 20 | // avoid repeated conversions when applying the regex 21 | let lines = projectText[range].split(separator: "\n").map(String.init) 22 | 23 | // verify that there is more than one item in this section, otherwise no violations 24 | guard var previousLine = lines.first, lines.count > 1 else { return [] } 25 | guard var previousId = getId(from: previousLine) else { return [] } 26 | 27 | var violations = [Violation]() 28 | 29 | for line in lines.dropFirst() { 30 | guard let id = getId(from: line) else { 31 | continue 32 | } 33 | 34 | // compare the identifiers of this line with the previous line 35 | if verify(previousId, isLessThan: id) == false { 36 | guard 37 | let lineNote = violationNote(from: line), 38 | let previousLineNote = violationNote(from: previousLine) 39 | else { 40 | continue 41 | } 42 | 43 | violations.append(.init("\(sectionType) \(lineNote) is out of order with \(previousLineNote).")) 44 | } 45 | previousId = id 46 | previousLine = line 47 | } 48 | 49 | return violations 50 | } 51 | 52 | private func getSectionRange(forType sectionType: String, projectText: String) -> Range? { 53 | guard let start = projectText.range(of: "/* Begin \(sectionType) section */\n"), 54 | let end = projectText.range(of: "/* End \(sectionType) section */"), 55 | start.upperBound < end.lowerBound 56 | else { return nil } 57 | return start.upperBound.. Substring? { 64 | guard 65 | let match = lineRegex.firstMatch(in: line, options: [], range: line.nsrange), 66 | let idRange = Range(match.range(at: 1), in: line) 67 | else { 68 | print("BuildFilesAreOrderedRule failed to match on: ", line) 69 | 70 | return nil 71 | } 72 | return line[idRange] 73 | } 74 | 75 | private func getFileInfo(from line: String) -> Substring? { 76 | guard 77 | let match = lineRegex.firstMatch(in: line, options: [], range: line.nsrange), 78 | let infoRange = Range(match.range(at: 2), in: line) 79 | else { 80 | print("BuildFilesAreOrderedRule failed to match on: ", line) 81 | 82 | return nil 83 | } 84 | 85 | return line[infoRange] 86 | } 87 | 88 | private func violationNote(from line: String) -> String? { 89 | guard 90 | let id = getId(from: line), 91 | let info = getFileInfo(from: line) 92 | else { 93 | return nil 94 | } 95 | 96 | return "'(\(id)) \(info)'" 97 | } 98 | 99 | /// This function will compare two ids, passed in as Substrings, which should be the same length. 100 | /// Starting from the beginning of each substring, the first UTF8 character that is not exactly 101 | /// the same between the two ids is compared. 102 | private func verify(_ id1: Substring, isLessThan id2: Substring) -> Bool { 103 | guard let firstDifferingElement = zip(id1.utf8, id2.utf8).lazy.first(where: { $0.1 != $0.0 }) else { return false } 104 | return firstDifferingElement.0 < firstDifferingElement.1 105 | } 106 | } 107 | 108 | private extension String { 109 | var nsrange: NSRange { NSRange(startIndex.. [Violation] { 7 | var violations = [Violation]() 8 | 9 | // check top-level 10 | for project in environment.project.pbxproj.projects { 11 | for config in project.buildConfigurationList?.buildConfigurations ?? [] { 12 | if config.buildSettings.isEmpty == false { 13 | violations.append(.init("found settings for project \(project.name), \(config.name)")) 14 | } 15 | } 16 | } 17 | 18 | // check targets 19 | environment.project.pbxproj.enumerateBuildConfigurations { name, configList in 20 | for config in configList.buildConfigurations { 21 | if config.buildSettings.isEmpty == false { 22 | violations.append(.init("found settings for target \(name), \(config.name)")) 23 | } 24 | } 25 | } 26 | 27 | return violations 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Sources/XCLinting/Rules/GroupsAreSortedRule.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import XcodeProj 3 | 4 | struct GroupsAreSortedRule { 5 | func run(_ environment: XCLinter.Environment) throws -> [Violation] { 6 | var violations = [Violation]() 7 | for group in environment.project.pbxproj.groups { 8 | violations.append(contentsOf: validateGroupIsSorted(group)) 9 | } 10 | return violations 11 | } 12 | 13 | private func validateGroupIsSorted(_ group: PBXGroup) -> [Violation] { 14 | var violations = [Violation]() 15 | 16 | // a path can contain components, but only the last component without the extension matters from the UI's perspective 17 | let children = group.children 18 | .compactMap(\.path) 19 | .compactMap { $0.split(separator: "/").last } 20 | .compactMap { $0.split(separator: ".").first } 21 | 22 | let sortedChildren = children.sorted { lhs, rhs in 23 | lhs.compare( 24 | rhs, 25 | options: [ 26 | .numeric, 27 | .caseInsensitive, 28 | .widthInsensitive, 29 | .forcedOrdering 30 | ], 31 | locale: .current 32 | ) == .orderedAscending 33 | } 34 | 35 | // some groups have no path, like the auto-generated "Products". Let's skip those, as they appear to not even always show up in the UI. 36 | if children != sortedChildren, let path = group.path { 37 | violations.append(.init("Group \"\(path)\" contains unsorted children")) 38 | } 39 | 40 | for childGroup in group.children.compactMap({ $0 as? PBXGroup }) { 41 | violations.append(contentsOf: validateGroupIsSorted(childGroup)) 42 | } 43 | 44 | return violations 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Sources/XCLinting/Rules/ImplicitDependenciesRule.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | import XcodeProj 4 | import XCConfig 5 | 6 | /// Detect when scheme implicit dependencies are enabled for any schemes. 7 | struct ImplicitDependenciesRule { 8 | func run(_ environment: XCLinter.Environment) throws -> [Violation] { 9 | let sharedSchemesURL = environment 10 | .projectRootURL 11 | .appendingPathComponent("xcshareddata/xcschemes", isDirectory: true) 12 | .standardizedFileURL 13 | 14 | var violations = [Violation]() 15 | 16 | violations.append(contentsOf: try validateSchemes(in: sharedSchemesURL)) 17 | 18 | let userSchemesURL = environment 19 | .projectRootURL 20 | .appendingPathComponent("xcuserdata/xcschemes", isDirectory: true) 21 | .standardizedFileURL 22 | 23 | violations.append(contentsOf: try validateSchemes(in: userSchemesURL)) 24 | 25 | return violations 26 | } 27 | 28 | private func validateSchemes(in url: URL) throws -> [Violation] { 29 | let fileManager = FileManager.default 30 | 31 | guard fileManager.isReadableFile(atPath: url.path) else { return [] } 32 | 33 | var violations = [Violation]() 34 | 35 | for entry in try fileManager.contentsOfDirectory(atPath: url.path) { 36 | let entryPath = url 37 | .appendingPathComponent(entry, isDirectory: false) 38 | .standardizedFileURL 39 | .path 40 | 41 | let scheme = try XCScheme(pathString: entryPath) 42 | 43 | if scheme.buildAction?.buildImplicitDependencies == true { 44 | violations.append(.init("Scheme \"\(entry)\" has implicit dependencies enabled")) 45 | } 46 | } 47 | 48 | return violations 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Sources/XCLinting/Rules/ProjectsUseXCConfigRule.swift: -------------------------------------------------------------------------------- 1 | // 2 | // File.swift 3 | // 4 | // 5 | // Created by Matthew Massicotte on 2024-01-22. 6 | // 7 | 8 | import Foundation 9 | 10 | /// Detect projects that do not use XCConfigs. 11 | struct ProjectsUseXCConfigRule { 12 | func run(_ environment: XCLinter.Environment) throws -> [Violation] { 13 | var violations = [Violation]() 14 | 15 | for project in environment.project.pbxproj.projects { 16 | for config in project.buildConfigurationList?.buildConfigurations ?? [] { 17 | if config.baseConfiguration?.path == nil { 18 | violations.append(.init("No xcconfig set for \(project.name), \(config.name)")) 19 | } 20 | } 21 | } 22 | 23 | return violations 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Sources/XCLinting/Rules/RelativePathsRule.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | import XcodeProj 4 | 5 | /// Make sure all file references use relative paths. 6 | struct RelativePathsRule { 7 | func run(_ environment: XCLinter.Environment) throws -> [Violation] { 8 | var violations = [Violation]() 9 | 10 | // check top-level 11 | for project in environment.project.pbxproj.projects { 12 | guard let group = project.mainGroup else { continue } 13 | 14 | violations.append(contentsOf: checkGroup(group)) 15 | } 16 | 17 | return violations 18 | } 19 | 20 | private func checkGroup(_ group: PBXGroup) -> [Violation] { 21 | var violations = [Violation]() 22 | 23 | let groupName = group.name ?? group.path ?? "???" 24 | 25 | for element in group.children { 26 | let elementName = element.name ?? element.path ?? "???" 27 | 28 | if element.path?.starts(with: "/") == true { 29 | violations.append(.init("\(groupName):\(elementName) has an absolute file path")) 30 | } 31 | 32 | if let subgroup = element as? PBXGroup { 33 | violations.append(contentsOf: checkGroup(subgroup)) 34 | } 35 | } 36 | 37 | return violations 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Sources/XCLinting/Rules/SharedSchemeSkipsTestsRule.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | import XcodeProj 4 | import XCConfig 5 | 6 | /// Detect when a shared scheme has disabled tests. 7 | struct SharedSchemeSkipsTestsRule { 8 | func run(_ environment: XCLinter.Environment) throws -> [Violation] { 9 | let sharedSchemesURL = environment 10 | .projectRootURL 11 | .appendingPathComponent("xcshareddata/xcschemes", isDirectory: true) 12 | .standardizedFileURL 13 | 14 | let fileManager = FileManager.default 15 | 16 | guard fileManager.isReadableFile(atPath: sharedSchemesURL.path) else { return [] } 17 | 18 | var violations = [Violation]() 19 | 20 | for entry in try fileManager.contentsOfDirectory(atPath: sharedSchemesURL.path) { 21 | let entryPath = sharedSchemesURL 22 | .appendingPathComponent(entry, isDirectory: false) 23 | .standardizedFileURL 24 | .path 25 | 26 | let scheme = try XCScheme(pathString: entryPath) 27 | 28 | guard let testAction = scheme.testAction else { continue } 29 | 30 | if testAction.testables.contains(where: { $0.skipped == true }) { 31 | violations.append(.init("Scheme \"\(entry)\" has skipped test bundles")) 32 | } 33 | 34 | if testAction.testables.contains(where: { $0.skippedTests.isEmpty == false }) { 35 | violations.append(.init("Scheme \"\(entry)\" has skipped tests")) 36 | } 37 | } 38 | 39 | 40 | return violations 41 | } 42 | 43 | private func validateSchemes(in url: URL) throws -> [Violation] { 44 | let fileManager = FileManager.default 45 | 46 | guard fileManager.isReadableFile(atPath: url.path) else { return [] } 47 | 48 | var violations = [Violation]() 49 | 50 | for entry in try fileManager.contentsOfDirectory(atPath: url.path) { 51 | let entryPath = url 52 | .appendingPathComponent(entry, isDirectory: false) 53 | .standardizedFileURL 54 | .path 55 | 56 | let scheme = try XCScheme(pathString: entryPath) 57 | 58 | if scheme.buildAction?.buildImplicitDependencies == true { 59 | violations.append(.init("Scheme \"\(entry)\" has implicit dependencies enabled")) 60 | } 61 | } 62 | 63 | return violations 64 | } 65 | } 66 | 67 | -------------------------------------------------------------------------------- /Sources/XCLinting/Rules/SharedSchemesRule.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | import XcodeProj 4 | import XCConfig 5 | 6 | /// Ensure that targets have a shared scheme on disk. 7 | struct SharedSchemesRule { 8 | func run(_ environment: XCLinter.Environment) throws -> [Violation] { 9 | let sharedSchemesURL = environment 10 | .projectRootURL 11 | .appendingPathComponent("xcshareddata/xcschemes", isDirectory: true) 12 | .standardizedFileURL 13 | 14 | let fileManager = FileManager.default 15 | 16 | guard fileManager.isReadableFile(atPath: sharedSchemesURL.path) else { 17 | return [.init("Shared scheme directory not found")] 18 | } 19 | 20 | let targetNames = environment.project.pbxproj.projects.flatMap { $0.targets }.map { $0.name } 21 | var targetNameSet = Set(targetNames) 22 | 23 | for entry in try fileManager.contentsOfDirectory(atPath: sharedSchemesURL.path) { 24 | let entryPath = sharedSchemesURL 25 | .appendingPathComponent(entry, isDirectory: false) 26 | .standardizedFileURL 27 | .path 28 | 29 | let scheme = try XCScheme(pathString: entryPath) 30 | 31 | for entry in scheme.buildAction?.buildActionEntries ?? [] { 32 | let name = entry.buildableReference.blueprintName 33 | 34 | targetNameSet.remove(name) 35 | } 36 | 37 | for entry in scheme.testAction?.testables ?? [] { 38 | let name = entry.buildableReference.blueprintName 39 | 40 | targetNameSet.remove(name) 41 | } 42 | } 43 | 44 | return targetNameSet.map { name in 45 | Violation("No shared scheme found that references \(name)") 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Sources/XCLinting/Rules/TargetsUseXCConfigRule.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | import XcodeProj 4 | import XCConfig 5 | 6 | /// Detect targets that do not use XCConfigs. 7 | struct TargetsUseXCConfigRule { 8 | func run(_ environment: XCLinter.Environment) throws -> [Violation] { 9 | var violations = [Violation]() 10 | 11 | // check targets 12 | environment.project.pbxproj.enumerateBuildConfigurations { name, configList in 13 | for config in configList.buildConfigurations { 14 | if config.baseConfiguration?.path == nil { 15 | violations.append(.init("No xcconfig set for \(name), \(config.name)")) 16 | } 17 | } 18 | } 19 | 20 | return violations 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Sources/XCLinting/Rules/ValidateBuildSettingsRule.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | import XcodeProj 4 | import XCConfig 5 | import enum XCConfig.BuildSetting 6 | 7 | /// Detect build settings that are deprecated or no longer functional. 8 | struct ValidateBuildSettingsRule { 9 | func run(_ environment: XCLinter.Environment) throws -> [Violation] { 10 | var violations = [Violation]() 11 | 12 | try enumerateSettings(with: environment) { target, config, settings in 13 | violations.append(contentsOf: evaluateTargetSettings(target.name, settings: settings)) 14 | } 15 | 16 | return violations 17 | } 18 | 19 | func evaluateTargetSettings(_ targetName: String, settings: [BuildSetting: String]) -> [Violation] { 20 | var violations = [Violation]() 21 | 22 | for (setting, value) in settings { 23 | let name = setting.rawValue 24 | let status = setting.evaluateValue(value) 25 | 26 | switch status { 27 | case .deprecated: 28 | violations.append(.init("\(targetName):\(name) = \(value) is deprecated")) 29 | case .invalid: 30 | violations.append(.init("\(targetName):\(name) = \(value) is invalid")) 31 | case .valid: 32 | break 33 | } 34 | } 35 | 36 | return violations 37 | } 38 | 39 | func enumerateSettings( 40 | with environment: XCLinter.Environment, 41 | block: (PBXTarget, XCBuildConfiguration, [BuildSetting: String]) throws -> Void 42 | ) throws { 43 | let project = environment.project 44 | let sourceRootURL = environment.projectRootURL.deletingLastPathComponent() 45 | 46 | try project.pbxproj.enumerateBuildSettingStatements(rootURL: sourceRootURL) { proj, target, config, settings in 47 | try block(target, config, settings) 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Sources/XCLinting/Violation.swift: -------------------------------------------------------------------------------- 1 | import XcodeProj 2 | 3 | public struct Violation: Hashable { 4 | public var message: String 5 | public var objects: [PBXObject] 6 | 7 | public init(_ message: String, objects: [PBXObject] = []) { 8 | self.message = message 9 | self.objects = objects 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Sources/XCLinting/XCLintError.swift: -------------------------------------------------------------------------------- 1 | public enum XCLintError: Error { 2 | case noProjectFileSpecified 3 | case projectFileNotFound(String) 4 | case badProjectFile(String) 5 | case unrecognizedRuleName(String) 6 | 7 | public var localizedDescription: String { 8 | switch self { 9 | case .noProjectFileSpecified: 10 | return "Project file was not specified." 11 | case let .projectFileNotFound(path): 12 | return "Project file not found at '\(path)'." 13 | case let .badProjectFile(message): 14 | return "Bad project file: \(message)." 15 | case let .unrecognizedRuleName(name): 16 | return "Unrecognized rule name: \(name)" 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Sources/XCLinting/XCLinter.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import XcodeProj 3 | 4 | public struct XCLinter { 5 | public struct Environment { 6 | public let project: XcodeProj 7 | public let projectRootURL: URL 8 | public let configuration: Configuration 9 | 10 | public init(project: XcodeProj, projectRootURL: URL, configuration: Configuration) { 11 | self.project = project 12 | self.projectRootURL = projectRootURL 13 | self.configuration = configuration 14 | } 15 | } 16 | 17 | public typealias Rule = @Sendable (Environment) throws -> [Violation] 18 | 19 | public var environment: Environment 20 | public var rules: [Rule] 21 | 22 | public init(projectPath: String, configuration: Configuration) throws { 23 | let env = try Environment(projectPath: projectPath, configuration: configuration) 24 | 25 | try self.init(environment: env) 26 | } 27 | 28 | public init(environment: Environment) throws { 29 | let config = environment.configuration 30 | let enabledRules = config.enabledRules 31 | 32 | let rules = Self.ruleMap.filter({ enabledRules.contains($0.key) }).values 33 | 34 | self.init(environment: environment, rules: Array(rules)) 35 | } 36 | 37 | public init(environment: Environment, rules: [Rule]) { 38 | self.environment = environment 39 | self.rules = rules 40 | } 41 | 42 | public func run() throws -> [Violation] { 43 | var violations = [Violation]() 44 | for rule in rules { 45 | let results = try rule(environment) 46 | 47 | violations.append(contentsOf: results) 48 | } 49 | return violations 50 | } 51 | } 52 | 53 | extension XCLinter.Environment { 54 | public init(projectPath: String, configuration: Configuration) throws { 55 | guard !projectPath.isEmpty else { 56 | throw XCLintError.noProjectFileSpecified 57 | } 58 | 59 | let url = URL(fileURLWithPath: projectPath) 60 | let xcodeproj = try XcodeProj(pathString: projectPath) 61 | 62 | self.init(project: xcodeproj, projectRootURL: url, configuration: configuration) 63 | } 64 | } 65 | 66 | extension XCLinter { 67 | public static let defaultRuleIdentifiers: Set = [ 68 | "build_files_ordered", 69 | "validate_build_settings", 70 | "relative_paths", 71 | ] 72 | 73 | public static let defaultRules: [Rule] = Array(ruleMap.filter({ defaultRuleIdentifiers.contains($0.0) }).values) 74 | public static let ruleIdentifiers: Set = Set(ruleMap.keys) 75 | 76 | public static let ruleMap: [String: Rule] = [ 77 | "embedded_build_setting": { try EmbeddedBuildSettingsRule().run($0) }, 78 | "build_files_ordered": { try BuildFilesAreOrderedRule().run($0) }, 79 | "groups_sorted": { try GroupsAreSortedRule().run($0) }, 80 | "validate_build_settings": { try ValidateBuildSettingsRule().run($0) }, 81 | "implicit_dependencies": { try ImplicitDependenciesRule().run($0) }, 82 | "targets_use_xcconfig": { try TargetsUseXCConfigRule().run($0) }, 83 | "projects_use_xcconfig": { try ProjectsUseXCConfigRule().run($0) }, 84 | "shared_scheme_skips_tests": { try SharedSchemeSkipsTestsRule().run($0) }, 85 | "relative_paths": { try RelativePathsRule().run($0) }, 86 | "shared_schemes": { try SharedSchemesRule().run($0) }, 87 | ] 88 | } 89 | -------------------------------------------------------------------------------- /Sources/clitool/main.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import ArgumentParser 3 | import XcodeProj 4 | import XCLinting 5 | import Yams 6 | 7 | struct XCLintCommand: ParsableCommand { 8 | static let configuration = CommandConfiguration(commandName: "xclint") 9 | 10 | @Flag( 11 | name: .shortAndLong, 12 | help: "Print the version and exit." 13 | ) 14 | var version: Bool = false 15 | 16 | @Argument(help: "The path to the .xcodeproj bundle to lint (defaults to looking in the current working directory).") 17 | var projectFile: String? 18 | 19 | @Option( 20 | name: .customLong("config"), 21 | help: "The path to an xclint configuration file (defaults to looking in the directory of the target .xcodeproj)." 22 | ) 23 | var configFilePath: String? 24 | 25 | func run() throws { 26 | if version { 27 | throw CleanExit.message("0.1.5") 28 | } 29 | 30 | // find the xcodeproj file 31 | guard let projPath = resolvedProjectFilePath() else { 32 | throw XCLintError.noProjectFileSpecified 33 | } 34 | 35 | // find the effective environment 36 | let config = try resolvedConfiguration(projectRootURL: URL(fileURLWithPath: projPath)) 37 | 38 | try config.validate() 39 | 40 | let env = try XCLinter.Environment(projectPath: projPath, configuration: config) 41 | 42 | let linter = try XCLinter(environment: env) 43 | 44 | let violations = try linter.run() 45 | 46 | for violation in violations { 47 | print(violation.message) 48 | } 49 | 50 | if !violations.isEmpty { 51 | throw ExitCode.failure 52 | } 53 | } 54 | } 55 | 56 | extension XCLintCommand { 57 | private func resolvedProjectFilePath() -> String? { 58 | if let path = projectFile { 59 | return path 60 | } 61 | 62 | let currentPath = FileManager.default.currentDirectoryPath 63 | 64 | guard let contents = try? FileManager.default.contentsOfDirectory(atPath: currentPath) else { 65 | return nil 66 | } 67 | 68 | return contents.first(where: { $0.hasSuffix(".xcodeproj") }) 69 | } 70 | 71 | private func resolvedConfigFileURL(projectRootURL: URL) -> URL? { 72 | if let path = configFilePath { 73 | return URL(fileURLWithPath: path, isDirectory: false) 74 | } 75 | 76 | let defaultURL = projectRootURL.deletingLastPathComponent().appendingPathComponent(".xclint.yml", isDirectory: false) 77 | let path = defaultURL.path 78 | 79 | guard FileManager.default.isReadableFile(atPath: path) else { 80 | return nil 81 | } 82 | 83 | return defaultURL 84 | } 85 | 86 | private func resolvedConfiguration(projectRootURL: URL) throws -> Configuration { 87 | guard let url = resolvedConfigFileURL(projectRootURL: projectRootURL) else { 88 | return Configuration() 89 | } 90 | 91 | let data = try Data(contentsOf: url) 92 | return try YAMLDecoder().decode(Configuration.self, from: data) 93 | } 94 | } 95 | 96 | XCLintCommand.main() 97 | -------------------------------------------------------------------------------- /Tests/XCLintTests/BuildFilesAreOrderedTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | @testable import XCLinting 4 | import XcodeProj 5 | 6 | final class BuildFilesAreOrderedTests: XCTestCase { 7 | func testProjectWithOrderedFiles() throws { 8 | let url = try Bundle.module.testDataURL(named: "StockMacOSApp.xcodeproj") 9 | 10 | let project = try XcodeProj(pathString: url.path) 11 | 12 | let rules: [XCLinter.Rule] = [{ try BuildFilesAreOrderedRule().run($0) }] 13 | 14 | let env = XCLinter.Environment( 15 | project: project, 16 | projectRootURL: url, 17 | configuration: Configuration() 18 | ) 19 | 20 | let violations = try rules.flatMap { try $0(env) } 21 | 22 | XCTAssertTrue(violations.isEmpty) 23 | } 24 | 25 | func testProjectWithOutOfOrderFiles() throws { 26 | let url = try Bundle.module.testDataURL(named: "BuildFilesOutOfOrder.xcodeproj") 27 | 28 | let project = try XcodeProj(pathString: url.path) 29 | 30 | let rules: [XCLinter.Rule] = [{ try BuildFilesAreOrderedRule().run($0) }] 31 | 32 | let env = XCLinter.Environment( 33 | project: project, 34 | projectRootURL: url, 35 | configuration: Configuration() 36 | ) 37 | 38 | let violations = try rules.flatMap { try $0(env) } 39 | 40 | XCTAssertFalse(violations.isEmpty) 41 | } 42 | } 43 | 44 | -------------------------------------------------------------------------------- /Tests/XCLintTests/Bundle+TestData.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import XCTest 3 | 4 | extension Bundle { 5 | func testDataURL(named: String) throws -> URL { 6 | let bundle = Bundle.module 7 | 8 | let resourceURL = try XCTUnwrap(bundle.resourceURL) 9 | 10 | return resourceURL 11 | .appendingPathComponent("TestData", isDirectory: true) 12 | .appendingPathComponent(named) 13 | .standardizedFileURL 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Tests/XCLintTests/ConfigurationFileTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | import XCLinting 4 | 5 | final class ConfigurationTests: XCTestCase { 6 | func testReadEmptyFile() throws { 7 | let string = "{}" 8 | 9 | let config = try JSONDecoder().decode(Configuration.self, from: Data(string.utf8)) 10 | 11 | XCTAssertEqual(config, Configuration()) 12 | } 13 | 14 | func testReadDisabledRules() throws { 15 | let string = """ 16 | { 17 | "disabled_rules": ["a", "b", "c"] 18 | } 19 | """ 20 | 21 | let config = try JSONDecoder().decode(Configuration.self, from: Data(string.utf8)) 22 | 23 | let expected = Configuration(disabledRules: Set(["a", "b", "c"])) 24 | 25 | XCTAssertEqual(config, expected) 26 | } 27 | 28 | func testReadOptInRules() throws { 29 | let string = """ 30 | { 31 | "opt_in_rules": ["a", "b", "c"] 32 | } 33 | """ 34 | 35 | let config = try JSONDecoder().decode(Configuration.self, from: Data(string.utf8)) 36 | 37 | let expected = Configuration(optInRules: Set(["a", "b", "c"])) 38 | 39 | XCTAssertEqual(config, expected) 40 | } 41 | 42 | func testReadRules() throws { 43 | let string = """ 44 | { 45 | "rule1": "warning", 46 | "rule2": "error", 47 | } 48 | """ 49 | 50 | let config = try JSONDecoder().decode(Configuration.self, from: Data(string.utf8)) 51 | 52 | let expected = Configuration(rules: [ 53 | "rule1": .warning, 54 | "rule2": .error 55 | ]) 56 | 57 | XCTAssertEqual(config, expected) 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Tests/XCLintTests/EmbeddedBuildSettingsRuleTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | @testable import XCLinting 4 | import XcodeProj 5 | 6 | final class EmbeddedBuildSettingsRuleTests: XCTestCase { 7 | func testProjectWithBuildSettings() throws { 8 | let url = try Bundle.module.testDataURL(named: "StockMacOSApp.xcodeproj") 9 | 10 | let project = try XcodeProj(pathString: url.path) 11 | 12 | let env = XCLinter.Environment( 13 | project: project, 14 | projectRootURL: url, 15 | configuration: Configuration() 16 | ) 17 | 18 | let violations = try EmbeddedBuildSettingsRule().run(env) 19 | 20 | XCTAssertFalse(violations.isEmpty) 21 | } 22 | 23 | func testProjectWithProjectLevelBuildSettingsOnly() throws { 24 | let url = try Bundle.module.testDataURL(named: "ProjectOnlyBuildSettings.xcodeproj") 25 | 26 | let project = try XcodeProj(pathString: url.path) 27 | 28 | let env = XCLinter.Environment( 29 | project: project, 30 | projectRootURL: url, 31 | configuration: Configuration() 32 | ) 33 | 34 | let violations = try EmbeddedBuildSettingsRule().run(env) 35 | 36 | XCTAssertFalse(violations.isEmpty) 37 | } 38 | 39 | func testProjectWithBuildSettingsRemoved() throws { 40 | let url = try Bundle.module.testDataURL(named: "BuildSettingsRemoved.xcodeproj") 41 | 42 | let project = try XcodeProj(pathString: url.path) 43 | 44 | let env = XCLinter.Environment( 45 | project: project, 46 | projectRootURL: url, 47 | configuration: Configuration() 48 | ) 49 | 50 | let violations = try EmbeddedBuildSettingsRule().run(env) 51 | 52 | XCTAssertTrue(violations.isEmpty) 53 | } 54 | } 55 | 56 | -------------------------------------------------------------------------------- /Tests/XCLintTests/GroupsAreSortedRuleTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | @testable import XCLinting 4 | import XcodeProj 5 | 6 | final class GroupsAreSortedRuleTests: XCTestCase { 7 | func testProjectWithGroupsSorted() throws { 8 | let url = try Bundle.module.testDataURL(named: "SortedGroups.xcodeproj") 9 | 10 | let project = try XcodeProj(pathString: url.path) 11 | 12 | let env = XCLinter.Environment( 13 | project: project, 14 | projectRootURL: url, 15 | configuration: Configuration() 16 | ) 17 | 18 | let violations = try GroupsAreSortedRule().run(env) 19 | XCTAssertTrue(violations.isEmpty) 20 | } 21 | 22 | func testProjectWithoutGroupsSorted() throws { 23 | let url = try Bundle.module.testDataURL(named: "UnsortedGroups.xcodeproj") 24 | 25 | let project = try XcodeProj(pathString: url.path) 26 | 27 | let env = XCLinter.Environment( 28 | project: project, 29 | projectRootURL: url, 30 | configuration: Configuration() 31 | ) 32 | 33 | let violations = try GroupsAreSortedRule().run(env) 34 | XCTAssertFalse(violations.isEmpty) 35 | } 36 | 37 | func testProjectWithoutGroupsSortedByReference() throws { 38 | let url = try Bundle.module.testDataURL(named: "SortedGroupsByReference.xcodeproj") 39 | 40 | let project = try XcodeProj(pathString: url.path) 41 | 42 | let env = XCLinter.Environment( 43 | project: project, 44 | projectRootURL: url, 45 | configuration: Configuration() 46 | ) 47 | 48 | let violations = try GroupsAreSortedRule().run(env) 49 | XCTAssertTrue(violations.isEmpty) 50 | } 51 | 52 | func testGroupSortedWhereExtensionsMatters() throws { 53 | let url = try Bundle.module.testDataURL(named: "FileOrderedWithExtensions.xcodeproj") 54 | 55 | let project = try XcodeProj(pathString: url.path) 56 | 57 | let env = XCLinter.Environment( 58 | project: project, 59 | projectRootURL: url, 60 | configuration: Configuration() 61 | ) 62 | 63 | let violations = try GroupsAreSortedRule().run(env) 64 | XCTAssertTrue(violations.isEmpty) 65 | } 66 | } 67 | 68 | -------------------------------------------------------------------------------- /Tests/XCLintTests/ImplicitDependenciesRuleTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | @testable import XCLinting 4 | import XcodeProj 5 | 6 | final class ImplicitDependenciesRuleTests: XCTestCase { 7 | func testProjectWithImplicitDependencies() throws { 8 | let url = try Bundle.module.testDataURL(named: "StockMacOSApp.xcodeproj") 9 | 10 | let project = try XcodeProj(pathString: url.path) 11 | 12 | let env = XCLinter.Environment( 13 | project: project, 14 | projectRootURL: url, 15 | configuration: Configuration() 16 | ) 17 | 18 | let violations = try ImplicitDependenciesRule().run(env) 19 | 20 | XCTAssertFalse(violations.isEmpty) 21 | } 22 | 23 | func testProjectWithImplicitDependenciesDisabled() throws { 24 | let url = try Bundle.module.testDataURL(named: "ImplicitDependenciesDisabled.xcodeproj") 25 | 26 | let project = try XcodeProj(pathString: url.path) 27 | 28 | let env = XCLinter.Environment( 29 | project: project, 30 | projectRootURL: url, 31 | configuration: Configuration() 32 | ) 33 | 34 | let violations = try ImplicitDependenciesRule().run(env) 35 | 36 | XCTAssertTrue(violations.isEmpty) 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Tests/XCLintTests/ProjectsUseXCConfigRuleTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | @testable import XCLinting 4 | import XcodeProj 5 | 6 | final class ProjectsUseXCConfigRuleTests: XCTestCase { 7 | func testProjectsWithoutXCConfigs() throws { 8 | let url = try Bundle.module.testDataURL(named: "StockMacOSApp.xcodeproj") 9 | 10 | let project = try XcodeProj(pathString: url.path) 11 | 12 | let env = XCLinter.Environment( 13 | project: project, 14 | projectRootURL: url, 15 | configuration: Configuration() 16 | ) 17 | 18 | let violations = try ProjectsUseXCConfigRule().run(env) 19 | 20 | XCTAssertFalse(violations.isEmpty) 21 | } 22 | 23 | func testProjectsWithOnlyXCConfigs() throws { 24 | let url = try Bundle.module.testDataURL(named: "ProjectsUseXCConfigFiles.xcodeproj") 25 | 26 | let project = try XcodeProj(pathString: url.path) 27 | 28 | let env = XCLinter.Environment( 29 | project: project, 30 | projectRootURL: url, 31 | configuration: Configuration() 32 | ) 33 | 34 | let violations = try ProjectsUseXCConfigRule().run(env) 35 | 36 | XCTAssertTrue(violations.isEmpty) 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /Tests/XCLintTests/RelativePathsRuleTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | @testable import XCLinting 4 | import XcodeProj 5 | 6 | final class RelativePathsRuleTests: XCTestCase { 7 | func testProjectWithOnlyRelativePaths() throws { 8 | let url = try Bundle.module.testDataURL(named: "StockMacOSApp.xcodeproj") 9 | 10 | let project = try XcodeProj(pathString: url.path) 11 | 12 | let env = XCLinter.Environment( 13 | project: project, 14 | projectRootURL: url, 15 | configuration: Configuration() 16 | ) 17 | 18 | let violations = try RelativePathsRule().run(env) 19 | 20 | XCTAssertTrue(violations.isEmpty) 21 | } 22 | 23 | func testProjectWithOneAbosluteFilePath() throws { 24 | let url = try Bundle.module.testDataURL(named: "AbsolueFileReference.xcodeproj") 25 | 26 | let project = try XcodeProj(pathString: url.path) 27 | 28 | let env = XCLinter.Environment( 29 | project: project, 30 | projectRootURL: url, 31 | configuration: Configuration() 32 | ) 33 | 34 | let violations = try RelativePathsRule().run(env) 35 | 36 | XCTAssertFalse(violations.isEmpty) 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /Tests/XCLintTests/SharedSchemeSkipsTestsRuleTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | @testable import XCLinting 4 | import XcodeProj 5 | 6 | final class SharedSchemeSkipsTestsRuleTests: XCTestCase { 7 | func testProjectWithNoSkippedTests() throws { 8 | let url = try Bundle.module.testDataURL(named: "StockMacOSApp.xcodeproj") 9 | 10 | let project = try XcodeProj(pathString: url.path) 11 | 12 | let env = XCLinter.Environment( 13 | project: project, 14 | projectRootURL: url, 15 | configuration: Configuration() 16 | ) 17 | 18 | let violations = try SharedSchemeSkipsTestsRule().run(env) 19 | 20 | XCTAssertTrue(violations.isEmpty) 21 | } 22 | 23 | func testProjectWithSkippedTests() throws { 24 | let url = try Bundle.module.testDataURL(named: "SchemeSkipsTests.xcodeproj") 25 | 26 | let project = try XcodeProj(pathString: url.path) 27 | 28 | let env = XCLinter.Environment( 29 | project: project, 30 | projectRootURL: url, 31 | configuration: Configuration() 32 | ) 33 | 34 | let violations = try SharedSchemeSkipsTestsRule().run(env) 35 | 36 | XCTAssertFalse(violations.isEmpty) 37 | } 38 | 39 | func testProjectWithSkippedTestBundles() throws { 40 | let url = try Bundle.module.testDataURL(named: "SchemeSkipsTestBundles.xcodeproj") 41 | 42 | let project = try XcodeProj(pathString: url.path) 43 | 44 | let env = XCLinter.Environment( 45 | project: project, 46 | projectRootURL: url, 47 | configuration: Configuration() 48 | ) 49 | 50 | let violations = try SharedSchemeSkipsTestsRule().run(env) 51 | 52 | XCTAssertFalse(violations.isEmpty) 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Tests/XCLintTests/SharedSchemesRuleTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | @testable import XCLinting 4 | import XcodeProj 5 | 6 | final class SharedSchemesRuleTests: XCTestCase { 7 | func testProjectWithSharedSchemes() throws { 8 | let url = try Bundle.module.testDataURL(named: "StockMacOSApp.xcodeproj") 9 | 10 | let project = try XcodeProj(pathString: url.path) 11 | 12 | let env = XCLinter.Environment( 13 | project: project, 14 | projectRootURL: url, 15 | configuration: Configuration() 16 | ) 17 | 18 | let violations = try SharedSchemesRule().run(env) 19 | 20 | XCTAssertTrue(violations.isEmpty) 21 | } 22 | 23 | func testProjectWithMissingSharedSchemes() throws { 24 | let url = try Bundle.module.testDataURL(named: "BuildFilesOutOfOrder.xcodeproj") 25 | 26 | let project = try XcodeProj(pathString: url.path) 27 | 28 | let env = XCLinter.Environment( 29 | project: project, 30 | projectRootURL: url, 31 | configuration: Configuration() 32 | ) 33 | 34 | let violations = try SharedSchemesRule().run(env) 35 | 36 | XCTAssertFalse(violations.isEmpty) 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TargetsUseXCConfigRuleTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | @testable import XCLinting 4 | import XcodeProj 5 | 6 | final class TargetsUseXCConfigRuleTests: XCTestCase { 7 | func testTargetsWithoutXCConfigs() throws { 8 | let url = try Bundle.module.testDataURL(named: "StockMacOSApp.xcodeproj") 9 | 10 | let project = try XcodeProj(pathString: url.path) 11 | 12 | let env = XCLinter.Environment( 13 | project: project, 14 | projectRootURL: url, 15 | configuration: Configuration() 16 | ) 17 | 18 | let violations = try TargetsUseXCConfigRule().run(env) 19 | 20 | XCTAssertFalse(violations.isEmpty) 21 | } 22 | 23 | func testTargetsWithOnlyXCConfigs() throws { 24 | let url = try Bundle.module.testDataURL(named: "TargetsUseXCConfigFiles.xcodeproj") 25 | 26 | let project = try XcodeProj(pathString: url.path) 27 | 28 | let env = XCLinter.Environment( 29 | project: project, 30 | projectRootURL: url, 31 | configuration: Configuration() 32 | ) 33 | 34 | let violations = try TargetsUseXCConfigRule().run(env) 35 | 36 | XCTAssertTrue(violations.isEmpty) 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/AbsolueFileReference.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 56; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C965BD2C2AE6E5D700E5836A /* StockMacOSAppApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */; }; 11 | C965BD2E2AE6E5D700E5836A /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C965BD2D2AE6E5D700E5836A /* ContentView.swift */; }; 12 | C965BD302AE6E5D800E5836A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C965BD2F2AE6E5D800E5836A /* Assets.xcassets */; }; 13 | C965BD332AE6E5D800E5836A /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */; }; 14 | C973DFF32B6174AB000998F7 /* test.md in Resources */ = {isa = PBXBuildFile; fileRef = C973DFF22B6174AB000998F7 /* test.md */; }; 15 | /* End PBXBuildFile section */ 16 | 17 | /* Begin PBXFileReference section */ 18 | C965BD282AE6E5D700E5836A /* StockMacOSApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = StockMacOSApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 19 | C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StockMacOSAppApp.swift; sourceTree = ""; }; 20 | C965BD2D2AE6E5D700E5836A /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 21 | C965BD2F2AE6E5D800E5836A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 22 | C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 23 | C965BD342AE6E5D800E5836A /* StockMacOSApp.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = StockMacOSApp.entitlements; sourceTree = ""; }; 24 | C973DFF22B6174AB000998F7 /* test.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; name = test.md; path = /Users/matt/Desktop/test.md; sourceTree = ""; }; 25 | /* End PBXFileReference section */ 26 | 27 | /* Begin PBXFrameworksBuildPhase section */ 28 | C965BD252AE6E5D700E5836A /* Frameworks */ = { 29 | isa = PBXFrameworksBuildPhase; 30 | buildActionMask = 2147483647; 31 | files = ( 32 | ); 33 | runOnlyForDeploymentPostprocessing = 0; 34 | }; 35 | /* End PBXFrameworksBuildPhase section */ 36 | 37 | /* Begin PBXGroup section */ 38 | C965BD1F2AE6E5D700E5836A = { 39 | isa = PBXGroup; 40 | children = ( 41 | C965BD2A2AE6E5D700E5836A /* StockMacOSApp */, 42 | C965BD292AE6E5D700E5836A /* Products */, 43 | ); 44 | sourceTree = ""; 45 | }; 46 | C965BD292AE6E5D700E5836A /* Products */ = { 47 | isa = PBXGroup; 48 | children = ( 49 | C965BD282AE6E5D700E5836A /* StockMacOSApp.app */, 50 | ); 51 | name = Products; 52 | sourceTree = ""; 53 | }; 54 | C965BD2A2AE6E5D700E5836A /* StockMacOSApp */ = { 55 | isa = PBXGroup; 56 | children = ( 57 | C973DFF22B6174AB000998F7 /* test.md */, 58 | C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */, 59 | C965BD2D2AE6E5D700E5836A /* ContentView.swift */, 60 | C965BD2F2AE6E5D800E5836A /* Assets.xcassets */, 61 | C965BD342AE6E5D800E5836A /* StockMacOSApp.entitlements */, 62 | C965BD312AE6E5D800E5836A /* Preview Content */, 63 | ); 64 | path = StockMacOSApp; 65 | sourceTree = ""; 66 | }; 67 | C965BD312AE6E5D800E5836A /* Preview Content */ = { 68 | isa = PBXGroup; 69 | children = ( 70 | C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */, 71 | ); 72 | path = "Preview Content"; 73 | sourceTree = ""; 74 | }; 75 | /* End PBXGroup section */ 76 | 77 | /* Begin PBXNativeTarget section */ 78 | C965BD272AE6E5D700E5836A /* StockMacOSApp */ = { 79 | isa = PBXNativeTarget; 80 | buildConfigurationList = C965BD372AE6E5D800E5836A /* Build configuration list for PBXNativeTarget "StockMacOSApp" */; 81 | buildPhases = ( 82 | C965BD242AE6E5D700E5836A /* Sources */, 83 | C965BD252AE6E5D700E5836A /* Frameworks */, 84 | C965BD262AE6E5D700E5836A /* Resources */, 85 | ); 86 | buildRules = ( 87 | ); 88 | dependencies = ( 89 | ); 90 | name = StockMacOSApp; 91 | productName = StockMacOSApp; 92 | productReference = C965BD282AE6E5D700E5836A /* StockMacOSApp.app */; 93 | productType = "com.apple.product-type.application"; 94 | }; 95 | /* End PBXNativeTarget section */ 96 | 97 | /* Begin PBXProject section */ 98 | C965BD202AE6E5D700E5836A /* Project object */ = { 99 | isa = PBXProject; 100 | attributes = { 101 | BuildIndependentTargetsInParallel = 1; 102 | LastSwiftUpdateCheck = 1510; 103 | LastUpgradeCheck = 1510; 104 | TargetAttributes = { 105 | C965BD272AE6E5D700E5836A = { 106 | CreatedOnToolsVersion = 15.1; 107 | }; 108 | }; 109 | }; 110 | buildConfigurationList = C965BD232AE6E5D700E5836A /* Build configuration list for PBXProject "StockMacOSApp" */; 111 | compatibilityVersion = "Xcode 14.0"; 112 | developmentRegion = en; 113 | hasScannedForEncodings = 0; 114 | knownRegions = ( 115 | en, 116 | Base, 117 | ); 118 | mainGroup = C965BD1F2AE6E5D700E5836A; 119 | productRefGroup = C965BD292AE6E5D700E5836A /* Products */; 120 | projectDirPath = ""; 121 | projectRoot = ""; 122 | targets = ( 123 | C965BD272AE6E5D700E5836A /* StockMacOSApp */, 124 | ); 125 | }; 126 | /* End PBXProject section */ 127 | 128 | /* Begin PBXResourcesBuildPhase section */ 129 | C965BD262AE6E5D700E5836A /* Resources */ = { 130 | isa = PBXResourcesBuildPhase; 131 | buildActionMask = 2147483647; 132 | files = ( 133 | C973DFF32B6174AB000998F7 /* test.md in Resources */, 134 | C965BD332AE6E5D800E5836A /* Preview Assets.xcassets in Resources */, 135 | C965BD302AE6E5D800E5836A /* Assets.xcassets in Resources */, 136 | ); 137 | runOnlyForDeploymentPostprocessing = 0; 138 | }; 139 | /* End PBXResourcesBuildPhase section */ 140 | 141 | /* Begin PBXSourcesBuildPhase section */ 142 | C965BD242AE6E5D700E5836A /* Sources */ = { 143 | isa = PBXSourcesBuildPhase; 144 | buildActionMask = 2147483647; 145 | files = ( 146 | C965BD2E2AE6E5D700E5836A /* ContentView.swift in Sources */, 147 | C965BD2C2AE6E5D700E5836A /* StockMacOSAppApp.swift in Sources */, 148 | ); 149 | runOnlyForDeploymentPostprocessing = 0; 150 | }; 151 | /* End PBXSourcesBuildPhase section */ 152 | 153 | /* Begin XCBuildConfiguration section */ 154 | C965BD352AE6E5D800E5836A /* Debug */ = { 155 | isa = XCBuildConfiguration; 156 | buildSettings = { 157 | ALWAYS_SEARCH_USER_PATHS = NO; 158 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 159 | CLANG_ANALYZER_NONNULL = YES; 160 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 161 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 162 | CLANG_ENABLE_MODULES = YES; 163 | CLANG_ENABLE_OBJC_ARC = YES; 164 | CLANG_ENABLE_OBJC_WEAK = YES; 165 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 166 | CLANG_WARN_BOOL_CONVERSION = YES; 167 | CLANG_WARN_COMMA = YES; 168 | CLANG_WARN_CONSTANT_CONVERSION = YES; 169 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 170 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 171 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 172 | CLANG_WARN_EMPTY_BODY = YES; 173 | CLANG_WARN_ENUM_CONVERSION = YES; 174 | CLANG_WARN_INFINITE_RECURSION = YES; 175 | CLANG_WARN_INT_CONVERSION = YES; 176 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 177 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 178 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 179 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 180 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 181 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 182 | CLANG_WARN_STRICT_PROTOTYPES = YES; 183 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 184 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 185 | CLANG_WARN_UNREACHABLE_CODE = YES; 186 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 187 | COPY_PHASE_STRIP = NO; 188 | DEBUG_INFORMATION_FORMAT = dwarf; 189 | ENABLE_STRICT_OBJC_MSGSEND = YES; 190 | ENABLE_TESTABILITY = YES; 191 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 192 | GCC_C_LANGUAGE_STANDARD = gnu17; 193 | GCC_DYNAMIC_NO_PIC = NO; 194 | GCC_NO_COMMON_BLOCKS = YES; 195 | GCC_OPTIMIZATION_LEVEL = 0; 196 | GCC_PREPROCESSOR_DEFINITIONS = ( 197 | "DEBUG=1", 198 | "$(inherited)", 199 | ); 200 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 201 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 202 | GCC_WARN_UNDECLARED_SELECTOR = YES; 203 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 204 | GCC_WARN_UNUSED_FUNCTION = YES; 205 | GCC_WARN_UNUSED_VARIABLE = YES; 206 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES; 207 | MACOSX_DEPLOYMENT_TARGET = 14.0; 208 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 209 | MTL_FAST_MATH = YES; 210 | ONLY_ACTIVE_ARCH = YES; 211 | SDKROOT = macosx; 212 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; 213 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 214 | }; 215 | name = Debug; 216 | }; 217 | C965BD362AE6E5D800E5836A /* Release */ = { 218 | isa = XCBuildConfiguration; 219 | buildSettings = { 220 | ALWAYS_SEARCH_USER_PATHS = NO; 221 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 222 | CLANG_ANALYZER_NONNULL = YES; 223 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 224 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 225 | CLANG_ENABLE_MODULES = YES; 226 | CLANG_ENABLE_OBJC_ARC = YES; 227 | CLANG_ENABLE_OBJC_WEAK = YES; 228 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 229 | CLANG_WARN_BOOL_CONVERSION = YES; 230 | CLANG_WARN_COMMA = YES; 231 | CLANG_WARN_CONSTANT_CONVERSION = YES; 232 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 233 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 234 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 235 | CLANG_WARN_EMPTY_BODY = YES; 236 | CLANG_WARN_ENUM_CONVERSION = YES; 237 | CLANG_WARN_INFINITE_RECURSION = YES; 238 | CLANG_WARN_INT_CONVERSION = YES; 239 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 240 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 241 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 242 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 243 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 244 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 245 | CLANG_WARN_STRICT_PROTOTYPES = YES; 246 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 247 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 248 | CLANG_WARN_UNREACHABLE_CODE = YES; 249 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 250 | COPY_PHASE_STRIP = NO; 251 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 252 | ENABLE_NS_ASSERTIONS = NO; 253 | ENABLE_STRICT_OBJC_MSGSEND = YES; 254 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 255 | GCC_C_LANGUAGE_STANDARD = gnu17; 256 | GCC_NO_COMMON_BLOCKS = YES; 257 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 258 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 259 | GCC_WARN_UNDECLARED_SELECTOR = YES; 260 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 261 | GCC_WARN_UNUSED_FUNCTION = YES; 262 | GCC_WARN_UNUSED_VARIABLE = YES; 263 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES; 264 | MACOSX_DEPLOYMENT_TARGET = 14.0; 265 | MTL_ENABLE_DEBUG_INFO = NO; 266 | MTL_FAST_MATH = YES; 267 | SDKROOT = macosx; 268 | SWIFT_COMPILATION_MODE = wholemodule; 269 | }; 270 | name = Release; 271 | }; 272 | C965BD382AE6E5D800E5836A /* Debug */ = { 273 | isa = XCBuildConfiguration; 274 | buildSettings = { 275 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 276 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 277 | CODE_SIGN_ENTITLEMENTS = StockMacOSApp/StockMacOSApp.entitlements; 278 | CODE_SIGN_STYLE = Automatic; 279 | COMBINE_HIDPI_IMAGES = YES; 280 | CURRENT_PROJECT_VERSION = 1; 281 | DEVELOPMENT_ASSET_PATHS = "\"StockMacOSApp/Preview Content\""; 282 | DEVELOPMENT_TEAM = 77X93NZ3G2; 283 | ENABLE_HARDENED_RUNTIME = YES; 284 | ENABLE_PREVIEWS = YES; 285 | GENERATE_INFOPLIST_FILE = YES; 286 | INFOPLIST_KEY_NSHumanReadableCopyright = ""; 287 | LD_RUNPATH_SEARCH_PATHS = ( 288 | "$(inherited)", 289 | "@executable_path/../Frameworks", 290 | ); 291 | MARKETING_VERSION = 1.0; 292 | PRODUCT_BUNDLE_IDENTIFIER = org.massicotte.StockMacOSApp; 293 | PRODUCT_NAME = "$(TARGET_NAME)"; 294 | SWIFT_EMIT_LOC_STRINGS = YES; 295 | SWIFT_VERSION = 5.0; 296 | }; 297 | name = Debug; 298 | }; 299 | C965BD392AE6E5D800E5836A /* Release */ = { 300 | isa = XCBuildConfiguration; 301 | buildSettings = { 302 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 303 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 304 | CODE_SIGN_ENTITLEMENTS = StockMacOSApp/StockMacOSApp.entitlements; 305 | CODE_SIGN_STYLE = Automatic; 306 | COMBINE_HIDPI_IMAGES = YES; 307 | CURRENT_PROJECT_VERSION = 1; 308 | DEVELOPMENT_ASSET_PATHS = "\"StockMacOSApp/Preview Content\""; 309 | DEVELOPMENT_TEAM = 77X93NZ3G2; 310 | ENABLE_HARDENED_RUNTIME = YES; 311 | ENABLE_PREVIEWS = YES; 312 | GENERATE_INFOPLIST_FILE = YES; 313 | INFOPLIST_KEY_NSHumanReadableCopyright = ""; 314 | LD_RUNPATH_SEARCH_PATHS = ( 315 | "$(inherited)", 316 | "@executable_path/../Frameworks", 317 | ); 318 | MARKETING_VERSION = 1.0; 319 | PRODUCT_BUNDLE_IDENTIFIER = org.massicotte.StockMacOSApp; 320 | PRODUCT_NAME = "$(TARGET_NAME)"; 321 | SWIFT_EMIT_LOC_STRINGS = YES; 322 | SWIFT_VERSION = 5.0; 323 | }; 324 | name = Release; 325 | }; 326 | /* End XCBuildConfiguration section */ 327 | 328 | /* Begin XCConfigurationList section */ 329 | C965BD232AE6E5D700E5836A /* Build configuration list for PBXProject "StockMacOSApp" */ = { 330 | isa = XCConfigurationList; 331 | buildConfigurations = ( 332 | C965BD352AE6E5D800E5836A /* Debug */, 333 | C965BD362AE6E5D800E5836A /* Release */, 334 | ); 335 | defaultConfigurationIsVisible = 0; 336 | defaultConfigurationName = Release; 337 | }; 338 | C965BD372AE6E5D800E5836A /* Build configuration list for PBXNativeTarget "StockMacOSApp" */ = { 339 | isa = XCConfigurationList; 340 | buildConfigurations = ( 341 | C965BD382AE6E5D800E5836A /* Debug */, 342 | C965BD392AE6E5D800E5836A /* Release */, 343 | ); 344 | defaultConfigurationIsVisible = 0; 345 | defaultConfigurationName = Release; 346 | }; 347 | /* End XCConfigurationList section */ 348 | }; 349 | rootObject = C965BD202AE6E5D700E5836A /* Project object */; 350 | } 351 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/AbsolueFileReference.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/AbsolueFileReference.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/AbsolueFileReference.xcodeproj/xcshareddata/xcschemes/StockMacOSApp.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 42 | 44 | 50 | 51 | 52 | 53 | 59 | 61 | 67 | 68 | 69 | 70 | 72 | 73 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/BuildFilesOutOfOrder.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 56; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C965BD2C2AE6E5D700E5836A /* StockMacOSAppApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */; }; 11 | C965BD2E2AE6E5D700E5836A /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C965BD2D2AE6E5D700E5836A /* ContentView.swift */; }; 12 | C965BD332AE6E5D800E5836A /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */; }; 13 | C965BD302AE6E5D800E5836A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C965BD2F2AE6E5D800E5836A /* Assets.xcassets */; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXFileReference section */ 17 | C965BD282AE6E5D700E5836A /* StockMacOSApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = StockMacOSApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 18 | C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StockMacOSAppApp.swift; sourceTree = ""; }; 19 | C965BD2D2AE6E5D700E5836A /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 20 | C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 21 | C965BD2F2AE6E5D800E5836A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 22 | C965BD342AE6E5D800E5836A /* StockMacOSApp.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = StockMacOSApp.entitlements; sourceTree = ""; }; 23 | /* End PBXFileReference section */ 24 | 25 | /* Begin PBXFrameworksBuildPhase section */ 26 | C965BD252AE6E5D700E5836A /* Frameworks */ = { 27 | isa = PBXFrameworksBuildPhase; 28 | buildActionMask = 2147483647; 29 | files = ( 30 | ); 31 | runOnlyForDeploymentPostprocessing = 0; 32 | }; 33 | /* End PBXFrameworksBuildPhase section */ 34 | 35 | /* Begin PBXGroup section */ 36 | C965BD1F2AE6E5D700E5836A = { 37 | isa = PBXGroup; 38 | children = ( 39 | C965BD2A2AE6E5D700E5836A /* StockMacOSApp */, 40 | C965BD292AE6E5D700E5836A /* Products */, 41 | ); 42 | sourceTree = ""; 43 | }; 44 | C965BD292AE6E5D700E5836A /* Products */ = { 45 | isa = PBXGroup; 46 | children = ( 47 | C965BD282AE6E5D700E5836A /* StockMacOSApp.app */, 48 | ); 49 | name = Products; 50 | sourceTree = ""; 51 | }; 52 | C965BD2A2AE6E5D700E5836A /* StockMacOSApp */ = { 53 | isa = PBXGroup; 54 | children = ( 55 | C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */, 56 | C965BD2D2AE6E5D700E5836A /* ContentView.swift */, 57 | C965BD2F2AE6E5D800E5836A /* Assets.xcassets */, 58 | C965BD342AE6E5D800E5836A /* StockMacOSApp.entitlements */, 59 | C965BD312AE6E5D800E5836A /* Preview Content */, 60 | ); 61 | path = StockMacOSApp; 62 | sourceTree = ""; 63 | }; 64 | C965BD312AE6E5D800E5836A /* Preview Content */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */, 68 | ); 69 | path = "Preview Content"; 70 | sourceTree = ""; 71 | }; 72 | /* End PBXGroup section */ 73 | 74 | /* Begin PBXNativeTarget section */ 75 | C965BD272AE6E5D700E5836A /* StockMacOSApp */ = { 76 | isa = PBXNativeTarget; 77 | buildConfigurationList = C965BD372AE6E5D800E5836A /* Build configuration list for PBXNativeTarget "StockMacOSApp" */; 78 | buildPhases = ( 79 | C965BD242AE6E5D700E5836A /* Sources */, 80 | C965BD252AE6E5D700E5836A /* Frameworks */, 81 | C965BD262AE6E5D700E5836A /* Resources */, 82 | ); 83 | buildRules = ( 84 | ); 85 | dependencies = ( 86 | ); 87 | name = StockMacOSApp; 88 | productName = StockMacOSApp; 89 | productReference = C965BD282AE6E5D700E5836A /* StockMacOSApp.app */; 90 | productType = "com.apple.product-type.application"; 91 | }; 92 | /* End PBXNativeTarget section */ 93 | 94 | /* Begin PBXProject section */ 95 | C965BD202AE6E5D700E5836A /* Project object */ = { 96 | isa = PBXProject; 97 | attributes = { 98 | BuildIndependentTargetsInParallel = 1; 99 | LastSwiftUpdateCheck = 1510; 100 | LastUpgradeCheck = 1510; 101 | TargetAttributes = { 102 | C965BD272AE6E5D700E5836A = { 103 | CreatedOnToolsVersion = 15.1; 104 | }; 105 | }; 106 | }; 107 | buildConfigurationList = C965BD232AE6E5D700E5836A /* Build configuration list for PBXProject "StockMacOSApp" */; 108 | compatibilityVersion = "Xcode 14.0"; 109 | developmentRegion = en; 110 | hasScannedForEncodings = 0; 111 | knownRegions = ( 112 | en, 113 | Base, 114 | ); 115 | mainGroup = C965BD1F2AE6E5D700E5836A; 116 | productRefGroup = C965BD292AE6E5D700E5836A /* Products */; 117 | projectDirPath = ""; 118 | projectRoot = ""; 119 | targets = ( 120 | C965BD272AE6E5D700E5836A /* StockMacOSApp */, 121 | ); 122 | }; 123 | /* End PBXProject section */ 124 | 125 | /* Begin PBXResourcesBuildPhase section */ 126 | C965BD262AE6E5D700E5836A /* Resources */ = { 127 | isa = PBXResourcesBuildPhase; 128 | buildActionMask = 2147483647; 129 | files = ( 130 | C965BD332AE6E5D800E5836A /* Preview Assets.xcassets in Resources */, 131 | C965BD302AE6E5D800E5836A /* Assets.xcassets in Resources */, 132 | ); 133 | runOnlyForDeploymentPostprocessing = 0; 134 | }; 135 | /* End PBXResourcesBuildPhase section */ 136 | 137 | /* Begin PBXSourcesBuildPhase section */ 138 | C965BD242AE6E5D700E5836A /* Sources */ = { 139 | isa = PBXSourcesBuildPhase; 140 | buildActionMask = 2147483647; 141 | files = ( 142 | C965BD2E2AE6E5D700E5836A /* ContentView.swift in Sources */, 143 | C965BD2C2AE6E5D700E5836A /* StockMacOSAppApp.swift in Sources */, 144 | ); 145 | runOnlyForDeploymentPostprocessing = 0; 146 | }; 147 | /* End PBXSourcesBuildPhase section */ 148 | 149 | /* Begin XCBuildConfiguration section */ 150 | C965BD352AE6E5D800E5836A /* Debug */ = { 151 | isa = XCBuildConfiguration; 152 | buildSettings = { 153 | ALWAYS_SEARCH_USER_PATHS = NO; 154 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 155 | CLANG_ANALYZER_NONNULL = YES; 156 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 157 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 158 | CLANG_ENABLE_MODULES = YES; 159 | CLANG_ENABLE_OBJC_ARC = YES; 160 | CLANG_ENABLE_OBJC_WEAK = YES; 161 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 162 | CLANG_WARN_BOOL_CONVERSION = YES; 163 | CLANG_WARN_COMMA = YES; 164 | CLANG_WARN_CONSTANT_CONVERSION = YES; 165 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 166 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 167 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 168 | CLANG_WARN_EMPTY_BODY = YES; 169 | CLANG_WARN_ENUM_CONVERSION = YES; 170 | CLANG_WARN_INFINITE_RECURSION = YES; 171 | CLANG_WARN_INT_CONVERSION = YES; 172 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 173 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 174 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 175 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 176 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 177 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 178 | CLANG_WARN_STRICT_PROTOTYPES = YES; 179 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 180 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 181 | CLANG_WARN_UNREACHABLE_CODE = YES; 182 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 183 | COPY_PHASE_STRIP = NO; 184 | DEBUG_INFORMATION_FORMAT = dwarf; 185 | ENABLE_STRICT_OBJC_MSGSEND = YES; 186 | ENABLE_TESTABILITY = YES; 187 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 188 | GCC_C_LANGUAGE_STANDARD = gnu17; 189 | GCC_DYNAMIC_NO_PIC = NO; 190 | GCC_NO_COMMON_BLOCKS = YES; 191 | GCC_OPTIMIZATION_LEVEL = 0; 192 | GCC_PREPROCESSOR_DEFINITIONS = ( 193 | "DEBUG=1", 194 | "$(inherited)", 195 | ); 196 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 197 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 198 | GCC_WARN_UNDECLARED_SELECTOR = YES; 199 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 200 | GCC_WARN_UNUSED_FUNCTION = YES; 201 | GCC_WARN_UNUSED_VARIABLE = YES; 202 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES; 203 | MACOSX_DEPLOYMENT_TARGET = 14.0; 204 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 205 | MTL_FAST_MATH = YES; 206 | ONLY_ACTIVE_ARCH = YES; 207 | SDKROOT = macosx; 208 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; 209 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 210 | }; 211 | name = Debug; 212 | }; 213 | C965BD362AE6E5D800E5836A /* Release */ = { 214 | isa = XCBuildConfiguration; 215 | buildSettings = { 216 | ALWAYS_SEARCH_USER_PATHS = NO; 217 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 218 | CLANG_ANALYZER_NONNULL = YES; 219 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 220 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 221 | CLANG_ENABLE_MODULES = YES; 222 | CLANG_ENABLE_OBJC_ARC = YES; 223 | CLANG_ENABLE_OBJC_WEAK = YES; 224 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 225 | CLANG_WARN_BOOL_CONVERSION = YES; 226 | CLANG_WARN_COMMA = YES; 227 | CLANG_WARN_CONSTANT_CONVERSION = YES; 228 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 229 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 230 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 231 | CLANG_WARN_EMPTY_BODY = YES; 232 | CLANG_WARN_ENUM_CONVERSION = YES; 233 | CLANG_WARN_INFINITE_RECURSION = YES; 234 | CLANG_WARN_INT_CONVERSION = YES; 235 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 236 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 237 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 238 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 239 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 240 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 241 | CLANG_WARN_STRICT_PROTOTYPES = YES; 242 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 243 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 244 | CLANG_WARN_UNREACHABLE_CODE = YES; 245 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 246 | COPY_PHASE_STRIP = NO; 247 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 248 | ENABLE_NS_ASSERTIONS = NO; 249 | ENABLE_STRICT_OBJC_MSGSEND = YES; 250 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 251 | GCC_C_LANGUAGE_STANDARD = gnu17; 252 | GCC_NO_COMMON_BLOCKS = YES; 253 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 254 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 255 | GCC_WARN_UNDECLARED_SELECTOR = YES; 256 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 257 | GCC_WARN_UNUSED_FUNCTION = YES; 258 | GCC_WARN_UNUSED_VARIABLE = YES; 259 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES; 260 | MACOSX_DEPLOYMENT_TARGET = 14.0; 261 | MTL_ENABLE_DEBUG_INFO = NO; 262 | MTL_FAST_MATH = YES; 263 | SDKROOT = macosx; 264 | SWIFT_COMPILATION_MODE = wholemodule; 265 | }; 266 | name = Release; 267 | }; 268 | C965BD382AE6E5D800E5836A /* Debug */ = { 269 | isa = XCBuildConfiguration; 270 | buildSettings = { 271 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 272 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 273 | CODE_SIGN_ENTITLEMENTS = StockMacOSApp/StockMacOSApp.entitlements; 274 | CODE_SIGN_STYLE = Automatic; 275 | COMBINE_HIDPI_IMAGES = YES; 276 | CURRENT_PROJECT_VERSION = 1; 277 | DEVELOPMENT_ASSET_PATHS = "\"StockMacOSApp/Preview Content\""; 278 | DEVELOPMENT_TEAM = 77X93NZ3G2; 279 | ENABLE_HARDENED_RUNTIME = YES; 280 | ENABLE_PREVIEWS = YES; 281 | GENERATE_INFOPLIST_FILE = YES; 282 | INFOPLIST_KEY_NSHumanReadableCopyright = ""; 283 | LD_RUNPATH_SEARCH_PATHS = ( 284 | "$(inherited)", 285 | "@executable_path/../Frameworks", 286 | ); 287 | MARKETING_VERSION = 1.0; 288 | PRODUCT_BUNDLE_IDENTIFIER = org.massicotte.StockMacOSApp; 289 | PRODUCT_NAME = "$(TARGET_NAME)"; 290 | SWIFT_EMIT_LOC_STRINGS = YES; 291 | SWIFT_VERSION = 5.0; 292 | }; 293 | name = Debug; 294 | }; 295 | C965BD392AE6E5D800E5836A /* Release */ = { 296 | isa = XCBuildConfiguration; 297 | buildSettings = { 298 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 299 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 300 | CODE_SIGN_ENTITLEMENTS = StockMacOSApp/StockMacOSApp.entitlements; 301 | CODE_SIGN_STYLE = Automatic; 302 | COMBINE_HIDPI_IMAGES = YES; 303 | CURRENT_PROJECT_VERSION = 1; 304 | DEVELOPMENT_ASSET_PATHS = "\"StockMacOSApp/Preview Content\""; 305 | DEVELOPMENT_TEAM = 77X93NZ3G2; 306 | ENABLE_HARDENED_RUNTIME = YES; 307 | ENABLE_PREVIEWS = YES; 308 | GENERATE_INFOPLIST_FILE = YES; 309 | INFOPLIST_KEY_NSHumanReadableCopyright = ""; 310 | LD_RUNPATH_SEARCH_PATHS = ( 311 | "$(inherited)", 312 | "@executable_path/../Frameworks", 313 | ); 314 | MARKETING_VERSION = 1.0; 315 | PRODUCT_BUNDLE_IDENTIFIER = org.massicotte.StockMacOSApp; 316 | PRODUCT_NAME = "$(TARGET_NAME)"; 317 | SWIFT_EMIT_LOC_STRINGS = YES; 318 | SWIFT_VERSION = 5.0; 319 | }; 320 | name = Release; 321 | }; 322 | /* End XCBuildConfiguration section */ 323 | 324 | /* Begin XCConfigurationList section */ 325 | C965BD232AE6E5D700E5836A /* Build configuration list for PBXProject "StockMacOSApp" */ = { 326 | isa = XCConfigurationList; 327 | buildConfigurations = ( 328 | C965BD352AE6E5D800E5836A /* Debug */, 329 | C965BD362AE6E5D800E5836A /* Release */, 330 | ); 331 | defaultConfigurationIsVisible = 0; 332 | defaultConfigurationName = Release; 333 | }; 334 | C965BD372AE6E5D800E5836A /* Build configuration list for PBXNativeTarget "StockMacOSApp" */ = { 335 | isa = XCConfigurationList; 336 | buildConfigurations = ( 337 | C965BD382AE6E5D800E5836A /* Debug */, 338 | C965BD392AE6E5D800E5836A /* Release */, 339 | ); 340 | defaultConfigurationIsVisible = 0; 341 | defaultConfigurationName = Release; 342 | }; 343 | /* End XCConfigurationList section */ 344 | }; 345 | rootObject = C965BD202AE6E5D700E5836A /* Project object */; 346 | } 347 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/BuildFilesOutOfOrder.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/BuildFilesOutOfOrder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/BuildSettingsRemoved.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 56; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C965BD2C2AE6E5D700E5836A /* StockMacOSAppApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */; }; 11 | C965BD2E2AE6E5D700E5836A /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C965BD2D2AE6E5D700E5836A /* ContentView.swift */; }; 12 | C965BD302AE6E5D800E5836A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C965BD2F2AE6E5D800E5836A /* Assets.xcassets */; }; 13 | C965BD332AE6E5D800E5836A /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXFileReference section */ 17 | C965BD282AE6E5D700E5836A /* .app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = .app; sourceTree = BUILT_PRODUCTS_DIR; }; 18 | C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StockMacOSAppApp.swift; sourceTree = ""; }; 19 | C965BD2D2AE6E5D700E5836A /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 20 | C965BD2F2AE6E5D800E5836A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 21 | C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 22 | C965BD342AE6E5D800E5836A /* StockMacOSApp.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = StockMacOSApp.entitlements; sourceTree = ""; }; 23 | /* End PBXFileReference section */ 24 | 25 | /* Begin PBXFrameworksBuildPhase section */ 26 | C965BD252AE6E5D700E5836A /* Frameworks */ = { 27 | isa = PBXFrameworksBuildPhase; 28 | buildActionMask = 2147483647; 29 | files = ( 30 | ); 31 | runOnlyForDeploymentPostprocessing = 0; 32 | }; 33 | /* End PBXFrameworksBuildPhase section */ 34 | 35 | /* Begin PBXGroup section */ 36 | C965BD1F2AE6E5D700E5836A = { 37 | isa = PBXGroup; 38 | children = ( 39 | C965BD2A2AE6E5D700E5836A /* StockMacOSApp */, 40 | C965BD292AE6E5D700E5836A /* Products */, 41 | ); 42 | sourceTree = ""; 43 | }; 44 | C965BD292AE6E5D700E5836A /* Products */ = { 45 | isa = PBXGroup; 46 | children = ( 47 | C965BD282AE6E5D700E5836A /* .app */, 48 | ); 49 | name = Products; 50 | sourceTree = ""; 51 | }; 52 | C965BD2A2AE6E5D700E5836A /* StockMacOSApp */ = { 53 | isa = PBXGroup; 54 | children = ( 55 | C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */, 56 | C965BD2D2AE6E5D700E5836A /* ContentView.swift */, 57 | C965BD2F2AE6E5D800E5836A /* Assets.xcassets */, 58 | C965BD342AE6E5D800E5836A /* StockMacOSApp.entitlements */, 59 | C965BD312AE6E5D800E5836A /* Preview Content */, 60 | ); 61 | path = StockMacOSApp; 62 | sourceTree = ""; 63 | }; 64 | C965BD312AE6E5D800E5836A /* Preview Content */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */, 68 | ); 69 | path = "Preview Content"; 70 | sourceTree = ""; 71 | }; 72 | /* End PBXGroup section */ 73 | 74 | /* Begin PBXNativeTarget section */ 75 | C965BD272AE6E5D700E5836A /* StockMacOSApp */ = { 76 | isa = PBXNativeTarget; 77 | buildConfigurationList = C965BD372AE6E5D800E5836A /* Build configuration list for PBXNativeTarget "StockMacOSApp" */; 78 | buildPhases = ( 79 | C965BD242AE6E5D700E5836A /* Sources */, 80 | C965BD252AE6E5D700E5836A /* Frameworks */, 81 | C965BD262AE6E5D700E5836A /* Resources */, 82 | ); 83 | buildRules = ( 84 | ); 85 | dependencies = ( 86 | ); 87 | name = StockMacOSApp; 88 | productName = StockMacOSApp; 89 | productReference = C965BD282AE6E5D700E5836A /* .app */; 90 | productType = "com.apple.product-type.application"; 91 | }; 92 | /* End PBXNativeTarget section */ 93 | 94 | /* Begin PBXProject section */ 95 | C965BD202AE6E5D700E5836A /* Project object */ = { 96 | isa = PBXProject; 97 | attributes = { 98 | BuildIndependentTargetsInParallel = 1; 99 | LastSwiftUpdateCheck = 1510; 100 | LastUpgradeCheck = 1510; 101 | TargetAttributes = { 102 | C965BD272AE6E5D700E5836A = { 103 | CreatedOnToolsVersion = 15.1; 104 | }; 105 | }; 106 | }; 107 | buildConfigurationList = C965BD232AE6E5D700E5836A /* Build configuration list for PBXProject "BulidSettingsRemoved" */; 108 | compatibilityVersion = "Xcode 14.0"; 109 | developmentRegion = en; 110 | hasScannedForEncodings = 0; 111 | knownRegions = ( 112 | en, 113 | Base, 114 | ); 115 | mainGroup = C965BD1F2AE6E5D700E5836A; 116 | productRefGroup = C965BD292AE6E5D700E5836A /* Products */; 117 | projectDirPath = ""; 118 | projectRoot = ""; 119 | targets = ( 120 | C965BD272AE6E5D700E5836A /* StockMacOSApp */, 121 | ); 122 | }; 123 | /* End PBXProject section */ 124 | 125 | /* Begin PBXResourcesBuildPhase section */ 126 | C965BD262AE6E5D700E5836A /* Resources */ = { 127 | isa = PBXResourcesBuildPhase; 128 | buildActionMask = 2147483647; 129 | files = ( 130 | C965BD332AE6E5D800E5836A /* Preview Assets.xcassets in Resources */, 131 | C965BD302AE6E5D800E5836A /* Assets.xcassets in Resources */, 132 | ); 133 | runOnlyForDeploymentPostprocessing = 0; 134 | }; 135 | /* End PBXResourcesBuildPhase section */ 136 | 137 | /* Begin PBXSourcesBuildPhase section */ 138 | C965BD242AE6E5D700E5836A /* Sources */ = { 139 | isa = PBXSourcesBuildPhase; 140 | buildActionMask = 2147483647; 141 | files = ( 142 | C965BD2E2AE6E5D700E5836A /* ContentView.swift in Sources */, 143 | C965BD2C2AE6E5D700E5836A /* StockMacOSAppApp.swift in Sources */, 144 | ); 145 | runOnlyForDeploymentPostprocessing = 0; 146 | }; 147 | /* End PBXSourcesBuildPhase section */ 148 | 149 | /* Begin XCBuildConfiguration section */ 150 | C965BD352AE6E5D800E5836A /* Debug */ = { 151 | isa = XCBuildConfiguration; 152 | buildSettings = { 153 | }; 154 | name = Debug; 155 | }; 156 | C965BD362AE6E5D800E5836A /* Release */ = { 157 | isa = XCBuildConfiguration; 158 | buildSettings = { 159 | }; 160 | name = Release; 161 | }; 162 | C965BD382AE6E5D800E5836A /* Debug */ = { 163 | isa = XCBuildConfiguration; 164 | buildSettings = { 165 | }; 166 | name = Debug; 167 | }; 168 | C965BD392AE6E5D800E5836A /* Release */ = { 169 | isa = XCBuildConfiguration; 170 | buildSettings = { 171 | }; 172 | name = Release; 173 | }; 174 | /* End XCBuildConfiguration section */ 175 | 176 | /* Begin XCConfigurationList section */ 177 | C965BD232AE6E5D700E5836A /* Build configuration list for PBXProject "BulidSettingsRemoved" */ = { 178 | isa = XCConfigurationList; 179 | buildConfigurations = ( 180 | C965BD352AE6E5D800E5836A /* Debug */, 181 | C965BD362AE6E5D800E5836A /* Release */, 182 | ); 183 | defaultConfigurationIsVisible = 0; 184 | defaultConfigurationName = Release; 185 | }; 186 | C965BD372AE6E5D800E5836A /* Build configuration list for PBXNativeTarget "StockMacOSApp" */ = { 187 | isa = XCConfigurationList; 188 | buildConfigurations = ( 189 | C965BD382AE6E5D800E5836A /* Debug */, 190 | C965BD392AE6E5D800E5836A /* Release */, 191 | ); 192 | defaultConfigurationIsVisible = 0; 193 | defaultConfigurationName = Release; 194 | }; 195 | /* End XCConfigurationList section */ 196 | }; 197 | rootObject = C965BD202AE6E5D700E5836A /* Project object */; 198 | } 199 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/BuildSettingsRemoved.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/BuildSettingsRemoved.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/FileOrderedWithExtensions.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 77; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C95E7D852DE1CD3C0098F248 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C95E7D7F2DE1CD3C0098F248 /* Assets.xcassets */; }; 11 | C95E7D862DE1CD3C0098F248 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C95E7D802DE1CD3C0098F248 /* ContentView.swift */; }; 12 | C95E7D872DE1CD3C0098F248 /* ContentView-2.swift in Sources */ = {isa = PBXBuildFile; fileRef = C95E7D812DE1CD3C0098F248 /* ContentView-2.swift */; }; 13 | C95E7D882DE1CD3C0098F248 /* FileOrderedWithExtensionsApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = C95E7D832DE1CD3C0098F248 /* FileOrderedWithExtensionsApp.swift */; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXFileReference section */ 17 | C95E7D6E2DE1CD1A0098F248 /* FileOrderedWithExtensions.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FileOrderedWithExtensions.app; sourceTree = BUILT_PRODUCTS_DIR; }; 18 | C95E7D7F2DE1CD3C0098F248 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 19 | C95E7D802DE1CD3C0098F248 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 20 | C95E7D812DE1CD3C0098F248 /* ContentView-2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ContentView-2.swift"; sourceTree = ""; }; 21 | C95E7D822DE1CD3C0098F248 /* FileOrderedWithExtensions.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = FileOrderedWithExtensions.entitlements; sourceTree = ""; }; 22 | C95E7D832DE1CD3C0098F248 /* FileOrderedWithExtensionsApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileOrderedWithExtensionsApp.swift; sourceTree = ""; }; 23 | /* End PBXFileReference section */ 24 | 25 | /* Begin PBXFrameworksBuildPhase section */ 26 | C95E7D6B2DE1CD1A0098F248 /* Frameworks */ = { 27 | isa = PBXFrameworksBuildPhase; 28 | buildActionMask = 2147483647; 29 | files = ( 30 | ); 31 | runOnlyForDeploymentPostprocessing = 0; 32 | }; 33 | /* End PBXFrameworksBuildPhase section */ 34 | 35 | /* Begin PBXGroup section */ 36 | C95E7D652DE1CD1A0098F248 = { 37 | isa = PBXGroup; 38 | children = ( 39 | C95E7D842DE1CD3C0098F248 /* FileOrderedWithExtensions */, 40 | C95E7D6F2DE1CD1A0098F248 /* Products */, 41 | ); 42 | sourceTree = ""; 43 | }; 44 | C95E7D6F2DE1CD1A0098F248 /* Products */ = { 45 | isa = PBXGroup; 46 | children = ( 47 | C95E7D6E2DE1CD1A0098F248 /* FileOrderedWithExtensions.app */, 48 | ); 49 | name = Products; 50 | sourceTree = ""; 51 | }; 52 | C95E7D842DE1CD3C0098F248 /* FileOrderedWithExtensions */ = { 53 | isa = PBXGroup; 54 | children = ( 55 | C95E7D7F2DE1CD3C0098F248 /* Assets.xcassets */, 56 | C95E7D802DE1CD3C0098F248 /* ContentView.swift */, 57 | C95E7D812DE1CD3C0098F248 /* ContentView-2.swift */, 58 | C95E7D822DE1CD3C0098F248 /* FileOrderedWithExtensions.entitlements */, 59 | C95E7D832DE1CD3C0098F248 /* FileOrderedWithExtensionsApp.swift */, 60 | ); 61 | path = FileOrderedWithExtensions; 62 | sourceTree = ""; 63 | }; 64 | /* End PBXGroup section */ 65 | 66 | /* Begin PBXNativeTarget section */ 67 | C95E7D6D2DE1CD1A0098F248 /* FileOrderedWithExtensions */ = { 68 | isa = PBXNativeTarget; 69 | buildConfigurationList = C95E7D7A2DE1CD1C0098F248 /* Build configuration list for PBXNativeTarget "FileOrderedWithExtensions" */; 70 | buildPhases = ( 71 | C95E7D6A2DE1CD1A0098F248 /* Sources */, 72 | C95E7D6B2DE1CD1A0098F248 /* Frameworks */, 73 | C95E7D6C2DE1CD1A0098F248 /* Resources */, 74 | ); 75 | buildRules = ( 76 | ); 77 | dependencies = ( 78 | ); 79 | name = FileOrderedWithExtensions; 80 | packageProductDependencies = ( 81 | ); 82 | productName = FileOrderedWithExtensions; 83 | productReference = C95E7D6E2DE1CD1A0098F248 /* FileOrderedWithExtensions.app */; 84 | productType = "com.apple.product-type.application"; 85 | }; 86 | /* End PBXNativeTarget section */ 87 | 88 | /* Begin PBXProject section */ 89 | C95E7D662DE1CD1A0098F248 /* Project object */ = { 90 | isa = PBXProject; 91 | attributes = { 92 | BuildIndependentTargetsInParallel = 1; 93 | LastSwiftUpdateCheck = 1630; 94 | LastUpgradeCheck = 1630; 95 | TargetAttributes = { 96 | C95E7D6D2DE1CD1A0098F248 = { 97 | CreatedOnToolsVersion = 16.3; 98 | }; 99 | }; 100 | }; 101 | buildConfigurationList = C95E7D692DE1CD1A0098F248 /* Build configuration list for PBXProject "FileOrderedWithExtensions" */; 102 | developmentRegion = en; 103 | hasScannedForEncodings = 0; 104 | knownRegions = ( 105 | en, 106 | Base, 107 | ); 108 | mainGroup = C95E7D652DE1CD1A0098F248; 109 | minimizedProjectReferenceProxies = 1; 110 | preferredProjectObjectVersion = 77; 111 | productRefGroup = C95E7D6F2DE1CD1A0098F248 /* Products */; 112 | projectDirPath = ""; 113 | projectRoot = ""; 114 | targets = ( 115 | C95E7D6D2DE1CD1A0098F248 /* FileOrderedWithExtensions */, 116 | ); 117 | }; 118 | /* End PBXProject section */ 119 | 120 | /* Begin PBXResourcesBuildPhase section */ 121 | C95E7D6C2DE1CD1A0098F248 /* Resources */ = { 122 | isa = PBXResourcesBuildPhase; 123 | buildActionMask = 2147483647; 124 | files = ( 125 | C95E7D852DE1CD3C0098F248 /* Assets.xcassets in Resources */, 126 | ); 127 | runOnlyForDeploymentPostprocessing = 0; 128 | }; 129 | /* End PBXResourcesBuildPhase section */ 130 | 131 | /* Begin PBXSourcesBuildPhase section */ 132 | C95E7D6A2DE1CD1A0098F248 /* Sources */ = { 133 | isa = PBXSourcesBuildPhase; 134 | buildActionMask = 2147483647; 135 | files = ( 136 | C95E7D862DE1CD3C0098F248 /* ContentView.swift in Sources */, 137 | C95E7D872DE1CD3C0098F248 /* ContentView-2.swift in Sources */, 138 | C95E7D882DE1CD3C0098F248 /* FileOrderedWithExtensionsApp.swift in Sources */, 139 | ); 140 | runOnlyForDeploymentPostprocessing = 0; 141 | }; 142 | /* End PBXSourcesBuildPhase section */ 143 | 144 | /* Begin XCBuildConfiguration section */ 145 | C95E7D782DE1CD1C0098F248 /* Debug */ = { 146 | isa = XCBuildConfiguration; 147 | buildSettings = { 148 | ALWAYS_SEARCH_USER_PATHS = NO; 149 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 150 | CLANG_ANALYZER_NONNULL = YES; 151 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 152 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 153 | CLANG_ENABLE_MODULES = YES; 154 | CLANG_ENABLE_OBJC_ARC = YES; 155 | CLANG_ENABLE_OBJC_WEAK = YES; 156 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 157 | CLANG_WARN_BOOL_CONVERSION = YES; 158 | CLANG_WARN_COMMA = YES; 159 | CLANG_WARN_CONSTANT_CONVERSION = YES; 160 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 161 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 162 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 163 | CLANG_WARN_EMPTY_BODY = YES; 164 | CLANG_WARN_ENUM_CONVERSION = YES; 165 | CLANG_WARN_INFINITE_RECURSION = YES; 166 | CLANG_WARN_INT_CONVERSION = YES; 167 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 168 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 169 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 170 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 171 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 172 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 173 | CLANG_WARN_STRICT_PROTOTYPES = YES; 174 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 175 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 176 | CLANG_WARN_UNREACHABLE_CODE = YES; 177 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 178 | COPY_PHASE_STRIP = NO; 179 | DEBUG_INFORMATION_FORMAT = dwarf; 180 | ENABLE_STRICT_OBJC_MSGSEND = YES; 181 | ENABLE_TESTABILITY = YES; 182 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 183 | GCC_C_LANGUAGE_STANDARD = gnu17; 184 | GCC_DYNAMIC_NO_PIC = NO; 185 | GCC_NO_COMMON_BLOCKS = YES; 186 | GCC_OPTIMIZATION_LEVEL = 0; 187 | GCC_PREPROCESSOR_DEFINITIONS = ( 188 | "DEBUG=1", 189 | "$(inherited)", 190 | ); 191 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 192 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 193 | GCC_WARN_UNDECLARED_SELECTOR = YES; 194 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 195 | GCC_WARN_UNUSED_FUNCTION = YES; 196 | GCC_WARN_UNUSED_VARIABLE = YES; 197 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES; 198 | MACOSX_DEPLOYMENT_TARGET = 15.4; 199 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 200 | MTL_FAST_MATH = YES; 201 | ONLY_ACTIVE_ARCH = YES; 202 | SDKROOT = macosx; 203 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; 204 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 205 | }; 206 | name = Debug; 207 | }; 208 | C95E7D792DE1CD1C0098F248 /* Release */ = { 209 | isa = XCBuildConfiguration; 210 | buildSettings = { 211 | ALWAYS_SEARCH_USER_PATHS = NO; 212 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 213 | CLANG_ANALYZER_NONNULL = YES; 214 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 215 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 216 | CLANG_ENABLE_MODULES = YES; 217 | CLANG_ENABLE_OBJC_ARC = YES; 218 | CLANG_ENABLE_OBJC_WEAK = YES; 219 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 220 | CLANG_WARN_BOOL_CONVERSION = YES; 221 | CLANG_WARN_COMMA = YES; 222 | CLANG_WARN_CONSTANT_CONVERSION = YES; 223 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 224 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 225 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 226 | CLANG_WARN_EMPTY_BODY = YES; 227 | CLANG_WARN_ENUM_CONVERSION = YES; 228 | CLANG_WARN_INFINITE_RECURSION = YES; 229 | CLANG_WARN_INT_CONVERSION = YES; 230 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 231 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 232 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 233 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 234 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 235 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 236 | CLANG_WARN_STRICT_PROTOTYPES = YES; 237 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 238 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 239 | CLANG_WARN_UNREACHABLE_CODE = YES; 240 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 241 | COPY_PHASE_STRIP = NO; 242 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 243 | ENABLE_NS_ASSERTIONS = NO; 244 | ENABLE_STRICT_OBJC_MSGSEND = YES; 245 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 246 | GCC_C_LANGUAGE_STANDARD = gnu17; 247 | GCC_NO_COMMON_BLOCKS = YES; 248 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 249 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 250 | GCC_WARN_UNDECLARED_SELECTOR = YES; 251 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 252 | GCC_WARN_UNUSED_FUNCTION = YES; 253 | GCC_WARN_UNUSED_VARIABLE = YES; 254 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES; 255 | MACOSX_DEPLOYMENT_TARGET = 15.4; 256 | MTL_ENABLE_DEBUG_INFO = NO; 257 | MTL_FAST_MATH = YES; 258 | SDKROOT = macosx; 259 | SWIFT_COMPILATION_MODE = wholemodule; 260 | }; 261 | name = Release; 262 | }; 263 | C95E7D7B2DE1CD1C0098F248 /* Debug */ = { 264 | isa = XCBuildConfiguration; 265 | buildSettings = { 266 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 267 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 268 | CODE_SIGN_ENTITLEMENTS = FileOrderedWithExtensions/FileOrderedWithExtensions.entitlements; 269 | CODE_SIGN_STYLE = Automatic; 270 | COMBINE_HIDPI_IMAGES = YES; 271 | CURRENT_PROJECT_VERSION = 1; 272 | ENABLE_PREVIEWS = YES; 273 | GENERATE_INFOPLIST_FILE = YES; 274 | INFOPLIST_KEY_NSHumanReadableCopyright = ""; 275 | LD_RUNPATH_SEARCH_PATHS = ( 276 | "$(inherited)", 277 | "@executable_path/../Frameworks", 278 | ); 279 | MARKETING_VERSION = 1.0; 280 | PRODUCT_BUNDLE_IDENTIFIER = com.mycompany.FileOrderedWithExtensions; 281 | PRODUCT_NAME = "$(TARGET_NAME)"; 282 | REGISTER_APP_GROUPS = YES; 283 | SWIFT_EMIT_LOC_STRINGS = YES; 284 | SWIFT_VERSION = 5.0; 285 | }; 286 | name = Debug; 287 | }; 288 | C95E7D7C2DE1CD1C0098F248 /* Release */ = { 289 | isa = XCBuildConfiguration; 290 | buildSettings = { 291 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 292 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 293 | CODE_SIGN_ENTITLEMENTS = FileOrderedWithExtensions/FileOrderedWithExtensions.entitlements; 294 | CODE_SIGN_STYLE = Automatic; 295 | COMBINE_HIDPI_IMAGES = YES; 296 | CURRENT_PROJECT_VERSION = 1; 297 | ENABLE_PREVIEWS = YES; 298 | GENERATE_INFOPLIST_FILE = YES; 299 | INFOPLIST_KEY_NSHumanReadableCopyright = ""; 300 | LD_RUNPATH_SEARCH_PATHS = ( 301 | "$(inherited)", 302 | "@executable_path/../Frameworks", 303 | ); 304 | MARKETING_VERSION = 1.0; 305 | PRODUCT_BUNDLE_IDENTIFIER = com.mycompany.FileOrderedWithExtensions; 306 | PRODUCT_NAME = "$(TARGET_NAME)"; 307 | REGISTER_APP_GROUPS = YES; 308 | SWIFT_EMIT_LOC_STRINGS = YES; 309 | SWIFT_VERSION = 5.0; 310 | }; 311 | name = Release; 312 | }; 313 | /* End XCBuildConfiguration section */ 314 | 315 | /* Begin XCConfigurationList section */ 316 | C95E7D692DE1CD1A0098F248 /* Build configuration list for PBXProject "FileOrderedWithExtensions" */ = { 317 | isa = XCConfigurationList; 318 | buildConfigurations = ( 319 | C95E7D782DE1CD1C0098F248 /* Debug */, 320 | C95E7D792DE1CD1C0098F248 /* Release */, 321 | ); 322 | defaultConfigurationIsVisible = 0; 323 | defaultConfigurationName = Release; 324 | }; 325 | C95E7D7A2DE1CD1C0098F248 /* Build configuration list for PBXNativeTarget "FileOrderedWithExtensions" */ = { 326 | isa = XCConfigurationList; 327 | buildConfigurations = ( 328 | C95E7D7B2DE1CD1C0098F248 /* Debug */, 329 | C95E7D7C2DE1CD1C0098F248 /* Release */, 330 | ); 331 | defaultConfigurationIsVisible = 0; 332 | defaultConfigurationName = Release; 333 | }; 334 | /* End XCConfigurationList section */ 335 | }; 336 | rootObject = C95E7D662DE1CD1A0098F248 /* Project object */; 337 | } 338 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/FileOrderedWithExtensions.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/ImplicitDependenciesDisabled.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 56; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C965BD2C2AE6E5D700E5836A /* StockMacOSAppApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */; }; 11 | C965BD2E2AE6E5D700E5836A /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C965BD2D2AE6E5D700E5836A /* ContentView.swift */; }; 12 | C965BD302AE6E5D800E5836A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C965BD2F2AE6E5D800E5836A /* Assets.xcassets */; }; 13 | C965BD332AE6E5D800E5836A /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXFileReference section */ 17 | C965BD282AE6E5D700E5836A /* StockMacOSApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = StockMacOSApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 18 | C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StockMacOSAppApp.swift; sourceTree = ""; }; 19 | C965BD2D2AE6E5D700E5836A /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 20 | C965BD2F2AE6E5D800E5836A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 21 | C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 22 | C965BD342AE6E5D800E5836A /* StockMacOSApp.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = StockMacOSApp.entitlements; sourceTree = ""; }; 23 | /* End PBXFileReference section */ 24 | 25 | /* Begin PBXFrameworksBuildPhase section */ 26 | C965BD252AE6E5D700E5836A /* Frameworks */ = { 27 | isa = PBXFrameworksBuildPhase; 28 | buildActionMask = 2147483647; 29 | files = ( 30 | ); 31 | runOnlyForDeploymentPostprocessing = 0; 32 | }; 33 | /* End PBXFrameworksBuildPhase section */ 34 | 35 | /* Begin PBXGroup section */ 36 | C965BD1F2AE6E5D700E5836A = { 37 | isa = PBXGroup; 38 | children = ( 39 | C965BD2A2AE6E5D700E5836A /* StockMacOSApp */, 40 | C965BD292AE6E5D700E5836A /* Products */, 41 | ); 42 | sourceTree = ""; 43 | }; 44 | C965BD292AE6E5D700E5836A /* Products */ = { 45 | isa = PBXGroup; 46 | children = ( 47 | C965BD282AE6E5D700E5836A /* StockMacOSApp.app */, 48 | ); 49 | name = Products; 50 | sourceTree = ""; 51 | }; 52 | C965BD2A2AE6E5D700E5836A /* StockMacOSApp */ = { 53 | isa = PBXGroup; 54 | children = ( 55 | C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */, 56 | C965BD2D2AE6E5D700E5836A /* ContentView.swift */, 57 | C965BD2F2AE6E5D800E5836A /* Assets.xcassets */, 58 | C965BD342AE6E5D800E5836A /* StockMacOSApp.entitlements */, 59 | C965BD312AE6E5D800E5836A /* Preview Content */, 60 | ); 61 | path = StockMacOSApp; 62 | sourceTree = ""; 63 | }; 64 | C965BD312AE6E5D800E5836A /* Preview Content */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */, 68 | ); 69 | path = "Preview Content"; 70 | sourceTree = ""; 71 | }; 72 | /* End PBXGroup section */ 73 | 74 | /* Begin PBXNativeTarget section */ 75 | C965BD272AE6E5D700E5836A /* StockMacOSApp */ = { 76 | isa = PBXNativeTarget; 77 | buildConfigurationList = C965BD372AE6E5D800E5836A /* Build configuration list for PBXNativeTarget "StockMacOSApp" */; 78 | buildPhases = ( 79 | C965BD242AE6E5D700E5836A /* Sources */, 80 | C965BD252AE6E5D700E5836A /* Frameworks */, 81 | C965BD262AE6E5D700E5836A /* Resources */, 82 | ); 83 | buildRules = ( 84 | ); 85 | dependencies = ( 86 | ); 87 | name = StockMacOSApp; 88 | productName = StockMacOSApp; 89 | productReference = C965BD282AE6E5D700E5836A /* StockMacOSApp.app */; 90 | productType = "com.apple.product-type.application"; 91 | }; 92 | /* End PBXNativeTarget section */ 93 | 94 | /* Begin PBXProject section */ 95 | C965BD202AE6E5D700E5836A /* Project object */ = { 96 | isa = PBXProject; 97 | attributes = { 98 | BuildIndependentTargetsInParallel = 1; 99 | LastSwiftUpdateCheck = 1510; 100 | LastUpgradeCheck = 1510; 101 | TargetAttributes = { 102 | C965BD272AE6E5D700E5836A = { 103 | CreatedOnToolsVersion = 15.1; 104 | }; 105 | }; 106 | }; 107 | buildConfigurationList = C965BD232AE6E5D700E5836A /* Build configuration list for PBXProject "StockMacOSApp" */; 108 | compatibilityVersion = "Xcode 14.0"; 109 | developmentRegion = en; 110 | hasScannedForEncodings = 0; 111 | knownRegions = ( 112 | en, 113 | Base, 114 | ); 115 | mainGroup = C965BD1F2AE6E5D700E5836A; 116 | productRefGroup = C965BD292AE6E5D700E5836A /* Products */; 117 | projectDirPath = ""; 118 | projectRoot = ""; 119 | targets = ( 120 | C965BD272AE6E5D700E5836A /* StockMacOSApp */, 121 | ); 122 | }; 123 | /* End PBXProject section */ 124 | 125 | /* Begin PBXResourcesBuildPhase section */ 126 | C965BD262AE6E5D700E5836A /* Resources */ = { 127 | isa = PBXResourcesBuildPhase; 128 | buildActionMask = 2147483647; 129 | files = ( 130 | C965BD332AE6E5D800E5836A /* Preview Assets.xcassets in Resources */, 131 | C965BD302AE6E5D800E5836A /* Assets.xcassets in Resources */, 132 | ); 133 | runOnlyForDeploymentPostprocessing = 0; 134 | }; 135 | /* End PBXResourcesBuildPhase section */ 136 | 137 | /* Begin PBXSourcesBuildPhase section */ 138 | C965BD242AE6E5D700E5836A /* Sources */ = { 139 | isa = PBXSourcesBuildPhase; 140 | buildActionMask = 2147483647; 141 | files = ( 142 | C965BD2E2AE6E5D700E5836A /* ContentView.swift in Sources */, 143 | C965BD2C2AE6E5D700E5836A /* StockMacOSAppApp.swift in Sources */, 144 | ); 145 | runOnlyForDeploymentPostprocessing = 0; 146 | }; 147 | /* End PBXSourcesBuildPhase section */ 148 | 149 | /* Begin XCBuildConfiguration section */ 150 | C965BD352AE6E5D800E5836A /* Debug */ = { 151 | isa = XCBuildConfiguration; 152 | buildSettings = { 153 | ALWAYS_SEARCH_USER_PATHS = NO; 154 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 155 | CLANG_ANALYZER_NONNULL = YES; 156 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 157 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 158 | CLANG_ENABLE_MODULES = YES; 159 | CLANG_ENABLE_OBJC_ARC = YES; 160 | CLANG_ENABLE_OBJC_WEAK = YES; 161 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 162 | CLANG_WARN_BOOL_CONVERSION = YES; 163 | CLANG_WARN_COMMA = YES; 164 | CLANG_WARN_CONSTANT_CONVERSION = YES; 165 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 166 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 167 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 168 | CLANG_WARN_EMPTY_BODY = YES; 169 | CLANG_WARN_ENUM_CONVERSION = YES; 170 | CLANG_WARN_INFINITE_RECURSION = YES; 171 | CLANG_WARN_INT_CONVERSION = YES; 172 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 173 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 174 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 175 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 176 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 177 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 178 | CLANG_WARN_STRICT_PROTOTYPES = YES; 179 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 180 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 181 | CLANG_WARN_UNREACHABLE_CODE = YES; 182 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 183 | COPY_PHASE_STRIP = NO; 184 | DEBUG_INFORMATION_FORMAT = dwarf; 185 | ENABLE_STRICT_OBJC_MSGSEND = YES; 186 | ENABLE_TESTABILITY = YES; 187 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 188 | GCC_C_LANGUAGE_STANDARD = gnu17; 189 | GCC_DYNAMIC_NO_PIC = NO; 190 | GCC_NO_COMMON_BLOCKS = YES; 191 | GCC_OPTIMIZATION_LEVEL = 0; 192 | GCC_PREPROCESSOR_DEFINITIONS = ( 193 | "DEBUG=1", 194 | "$(inherited)", 195 | ); 196 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 197 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 198 | GCC_WARN_UNDECLARED_SELECTOR = YES; 199 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 200 | GCC_WARN_UNUSED_FUNCTION = YES; 201 | GCC_WARN_UNUSED_VARIABLE = YES; 202 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES; 203 | MACOSX_DEPLOYMENT_TARGET = 14.0; 204 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 205 | MTL_FAST_MATH = YES; 206 | ONLY_ACTIVE_ARCH = YES; 207 | SDKROOT = macosx; 208 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; 209 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 210 | }; 211 | name = Debug; 212 | }; 213 | C965BD362AE6E5D800E5836A /* Release */ = { 214 | isa = XCBuildConfiguration; 215 | buildSettings = { 216 | ALWAYS_SEARCH_USER_PATHS = NO; 217 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 218 | CLANG_ANALYZER_NONNULL = YES; 219 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 220 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 221 | CLANG_ENABLE_MODULES = YES; 222 | CLANG_ENABLE_OBJC_ARC = YES; 223 | CLANG_ENABLE_OBJC_WEAK = YES; 224 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 225 | CLANG_WARN_BOOL_CONVERSION = YES; 226 | CLANG_WARN_COMMA = YES; 227 | CLANG_WARN_CONSTANT_CONVERSION = YES; 228 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 229 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 230 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 231 | CLANG_WARN_EMPTY_BODY = YES; 232 | CLANG_WARN_ENUM_CONVERSION = YES; 233 | CLANG_WARN_INFINITE_RECURSION = YES; 234 | CLANG_WARN_INT_CONVERSION = YES; 235 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 236 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 237 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 238 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 239 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 240 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 241 | CLANG_WARN_STRICT_PROTOTYPES = YES; 242 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 243 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 244 | CLANG_WARN_UNREACHABLE_CODE = YES; 245 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 246 | COPY_PHASE_STRIP = NO; 247 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 248 | ENABLE_NS_ASSERTIONS = NO; 249 | ENABLE_STRICT_OBJC_MSGSEND = YES; 250 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 251 | GCC_C_LANGUAGE_STANDARD = gnu17; 252 | GCC_NO_COMMON_BLOCKS = YES; 253 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 254 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 255 | GCC_WARN_UNDECLARED_SELECTOR = YES; 256 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 257 | GCC_WARN_UNUSED_FUNCTION = YES; 258 | GCC_WARN_UNUSED_VARIABLE = YES; 259 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES; 260 | MACOSX_DEPLOYMENT_TARGET = 14.0; 261 | MTL_ENABLE_DEBUG_INFO = NO; 262 | MTL_FAST_MATH = YES; 263 | SDKROOT = macosx; 264 | SWIFT_COMPILATION_MODE = wholemodule; 265 | }; 266 | name = Release; 267 | }; 268 | C965BD382AE6E5D800E5836A /* Debug */ = { 269 | isa = XCBuildConfiguration; 270 | buildSettings = { 271 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 272 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 273 | CODE_SIGN_ENTITLEMENTS = StockMacOSApp/StockMacOSApp.entitlements; 274 | CODE_SIGN_STYLE = Automatic; 275 | COMBINE_HIDPI_IMAGES = YES; 276 | CURRENT_PROJECT_VERSION = 1; 277 | DEVELOPMENT_ASSET_PATHS = "\"StockMacOSApp/Preview Content\""; 278 | DEVELOPMENT_TEAM = 77X93NZ3G2; 279 | ENABLE_HARDENED_RUNTIME = YES; 280 | ENABLE_PREVIEWS = YES; 281 | GENERATE_INFOPLIST_FILE = YES; 282 | INFOPLIST_KEY_NSHumanReadableCopyright = ""; 283 | LD_RUNPATH_SEARCH_PATHS = ( 284 | "$(inherited)", 285 | "@executable_path/../Frameworks", 286 | ); 287 | MARKETING_VERSION = 1.0; 288 | PRODUCT_BUNDLE_IDENTIFIER = org.massicotte.StockMacOSApp; 289 | PRODUCT_NAME = "$(TARGET_NAME)"; 290 | SWIFT_EMIT_LOC_STRINGS = YES; 291 | SWIFT_VERSION = 5.0; 292 | }; 293 | name = Debug; 294 | }; 295 | C965BD392AE6E5D800E5836A /* Release */ = { 296 | isa = XCBuildConfiguration; 297 | buildSettings = { 298 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 299 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 300 | CODE_SIGN_ENTITLEMENTS = StockMacOSApp/StockMacOSApp.entitlements; 301 | CODE_SIGN_STYLE = Automatic; 302 | COMBINE_HIDPI_IMAGES = YES; 303 | CURRENT_PROJECT_VERSION = 1; 304 | DEVELOPMENT_ASSET_PATHS = "\"StockMacOSApp/Preview Content\""; 305 | DEVELOPMENT_TEAM = 77X93NZ3G2; 306 | ENABLE_HARDENED_RUNTIME = YES; 307 | ENABLE_PREVIEWS = YES; 308 | GENERATE_INFOPLIST_FILE = YES; 309 | INFOPLIST_KEY_NSHumanReadableCopyright = ""; 310 | LD_RUNPATH_SEARCH_PATHS = ( 311 | "$(inherited)", 312 | "@executable_path/../Frameworks", 313 | ); 314 | MARKETING_VERSION = 1.0; 315 | PRODUCT_BUNDLE_IDENTIFIER = org.massicotte.StockMacOSApp; 316 | PRODUCT_NAME = "$(TARGET_NAME)"; 317 | SWIFT_EMIT_LOC_STRINGS = YES; 318 | SWIFT_VERSION = 5.0; 319 | }; 320 | name = Release; 321 | }; 322 | /* End XCBuildConfiguration section */ 323 | 324 | /* Begin XCConfigurationList section */ 325 | C965BD232AE6E5D700E5836A /* Build configuration list for PBXProject "StockMacOSApp" */ = { 326 | isa = XCConfigurationList; 327 | buildConfigurations = ( 328 | C965BD352AE6E5D800E5836A /* Debug */, 329 | C965BD362AE6E5D800E5836A /* Release */, 330 | ); 331 | defaultConfigurationIsVisible = 0; 332 | defaultConfigurationName = Release; 333 | }; 334 | C965BD372AE6E5D800E5836A /* Build configuration list for PBXNativeTarget "StockMacOSApp" */ = { 335 | isa = XCConfigurationList; 336 | buildConfigurations = ( 337 | C965BD382AE6E5D800E5836A /* Debug */, 338 | C965BD392AE6E5D800E5836A /* Release */, 339 | ); 340 | defaultConfigurationIsVisible = 0; 341 | defaultConfigurationName = Release; 342 | }; 343 | /* End XCConfigurationList section */ 344 | }; 345 | rootObject = C965BD202AE6E5D700E5836A /* Project object */; 346 | } 347 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/ImplicitDependenciesDisabled.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/ImplicitDependenciesDisabled.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/ImplicitDependenciesDisabled.xcodeproj/xcshareddata/xcschemes/StockMacOSApp.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 42 | 44 | 50 | 51 | 52 | 53 | 59 | 61 | 67 | 68 | 69 | 70 | 72 | 73 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/InvalidEmbeddedBuildSettings.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 56; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C965BD2C2AE6E5D700E5836A /* StockMacOSAppApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */; }; 11 | C965BD2E2AE6E5D700E5836A /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C965BD2D2AE6E5D700E5836A /* ContentView.swift */; }; 12 | C965BD302AE6E5D800E5836A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C965BD2F2AE6E5D800E5836A /* Assets.xcassets */; }; 13 | C965BD332AE6E5D800E5836A /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXFileReference section */ 17 | C965BD282AE6E5D700E5836A /* StockMacOSApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = StockMacOSApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 18 | C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StockMacOSAppApp.swift; sourceTree = ""; }; 19 | C965BD2D2AE6E5D700E5836A /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 20 | C965BD2F2AE6E5D800E5836A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 21 | C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 22 | C965BD342AE6E5D800E5836A /* StockMacOSApp.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = StockMacOSApp.entitlements; sourceTree = ""; }; 23 | /* End PBXFileReference section */ 24 | 25 | /* Begin PBXFrameworksBuildPhase section */ 26 | C965BD252AE6E5D700E5836A /* Frameworks */ = { 27 | isa = PBXFrameworksBuildPhase; 28 | buildActionMask = 2147483647; 29 | files = ( 30 | ); 31 | runOnlyForDeploymentPostprocessing = 0; 32 | }; 33 | /* End PBXFrameworksBuildPhase section */ 34 | 35 | /* Begin PBXGroup section */ 36 | C965BD1F2AE6E5D700E5836A = { 37 | isa = PBXGroup; 38 | children = ( 39 | C965BD2A2AE6E5D700E5836A /* StockMacOSApp */, 40 | C965BD292AE6E5D700E5836A /* Products */, 41 | ); 42 | sourceTree = ""; 43 | }; 44 | C965BD292AE6E5D700E5836A /* Products */ = { 45 | isa = PBXGroup; 46 | children = ( 47 | C965BD282AE6E5D700E5836A /* StockMacOSApp.app */, 48 | ); 49 | name = Products; 50 | sourceTree = ""; 51 | }; 52 | C965BD2A2AE6E5D700E5836A /* StockMacOSApp */ = { 53 | isa = PBXGroup; 54 | children = ( 55 | C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */, 56 | C965BD2D2AE6E5D700E5836A /* ContentView.swift */, 57 | C965BD2F2AE6E5D800E5836A /* Assets.xcassets */, 58 | C965BD342AE6E5D800E5836A /* StockMacOSApp.entitlements */, 59 | C965BD312AE6E5D800E5836A /* Preview Content */, 60 | ); 61 | path = StockMacOSApp; 62 | sourceTree = ""; 63 | }; 64 | C965BD312AE6E5D800E5836A /* Preview Content */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */, 68 | ); 69 | path = "Preview Content"; 70 | sourceTree = ""; 71 | }; 72 | /* End PBXGroup section */ 73 | 74 | /* Begin PBXNativeTarget section */ 75 | C965BD272AE6E5D700E5836A /* StockMacOSApp */ = { 76 | isa = PBXNativeTarget; 77 | buildConfigurationList = C965BD372AE6E5D800E5836A /* Build configuration list for PBXNativeTarget "StockMacOSApp" */; 78 | buildPhases = ( 79 | C965BD242AE6E5D700E5836A /* Sources */, 80 | C965BD252AE6E5D700E5836A /* Frameworks */, 81 | C965BD262AE6E5D700E5836A /* Resources */, 82 | ); 83 | buildRules = ( 84 | ); 85 | dependencies = ( 86 | ); 87 | name = StockMacOSApp; 88 | productName = StockMacOSApp; 89 | productReference = C965BD282AE6E5D700E5836A /* StockMacOSApp.app */; 90 | productType = "com.apple.product-type.application"; 91 | }; 92 | /* End PBXNativeTarget section */ 93 | 94 | /* Begin PBXProject section */ 95 | C965BD202AE6E5D700E5836A /* Project object */ = { 96 | isa = PBXProject; 97 | attributes = { 98 | BuildIndependentTargetsInParallel = 1; 99 | LastSwiftUpdateCheck = 1510; 100 | LastUpgradeCheck = 1510; 101 | TargetAttributes = { 102 | C965BD272AE6E5D700E5836A = { 103 | CreatedOnToolsVersion = 15.1; 104 | }; 105 | }; 106 | }; 107 | buildConfigurationList = C965BD232AE6E5D700E5836A /* Build configuration list for PBXProject "InvalidEmbeddedBuildSettings" */; 108 | compatibilityVersion = "Xcode 14.0"; 109 | developmentRegion = en; 110 | hasScannedForEncodings = 0; 111 | knownRegions = ( 112 | en, 113 | Base, 114 | ); 115 | mainGroup = C965BD1F2AE6E5D700E5836A; 116 | productRefGroup = C965BD292AE6E5D700E5836A /* Products */; 117 | projectDirPath = ""; 118 | projectRoot = ""; 119 | targets = ( 120 | C965BD272AE6E5D700E5836A /* StockMacOSApp */, 121 | ); 122 | }; 123 | /* End PBXProject section */ 124 | 125 | /* Begin PBXResourcesBuildPhase section */ 126 | C965BD262AE6E5D700E5836A /* Resources */ = { 127 | isa = PBXResourcesBuildPhase; 128 | buildActionMask = 2147483647; 129 | files = ( 130 | C965BD332AE6E5D800E5836A /* Preview Assets.xcassets in Resources */, 131 | C965BD302AE6E5D800E5836A /* Assets.xcassets in Resources */, 132 | ); 133 | runOnlyForDeploymentPostprocessing = 0; 134 | }; 135 | /* End PBXResourcesBuildPhase section */ 136 | 137 | /* Begin PBXSourcesBuildPhase section */ 138 | C965BD242AE6E5D700E5836A /* Sources */ = { 139 | isa = PBXSourcesBuildPhase; 140 | buildActionMask = 2147483647; 141 | files = ( 142 | C965BD2E2AE6E5D700E5836A /* ContentView.swift in Sources */, 143 | C965BD2C2AE6E5D700E5836A /* StockMacOSAppApp.swift in Sources */, 144 | ); 145 | runOnlyForDeploymentPostprocessing = 0; 146 | }; 147 | /* End PBXSourcesBuildPhase section */ 148 | 149 | /* Begin XCBuildConfiguration section */ 150 | C965BD352AE6E5D800E5836A /* Debug */ = { 151 | isa = XCBuildConfiguration; 152 | buildSettings = { 153 | ALWAYS_SEARCH_USER_PATHS = YES; 154 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 155 | CLANG_ANALYZER_NONNULL = YES; 156 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 157 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 158 | CLANG_ENABLE_MODULES = YES; 159 | CLANG_ENABLE_OBJC_ARC = YES; 160 | CLANG_ENABLE_OBJC_WEAK = YES; 161 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 162 | CLANG_WARN_BOOL_CONVERSION = YES; 163 | CLANG_WARN_COMMA = YES; 164 | CLANG_WARN_CONSTANT_CONVERSION = YES; 165 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 166 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 167 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 168 | CLANG_WARN_EMPTY_BODY = YES; 169 | CLANG_WARN_ENUM_CONVERSION = YES; 170 | CLANG_WARN_INFINITE_RECURSION = YES; 171 | CLANG_WARN_INT_CONVERSION = YES; 172 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 173 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 174 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 175 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 176 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 177 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 178 | CLANG_WARN_STRICT_PROTOTYPES = YES; 179 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 180 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 181 | CLANG_WARN_UNREACHABLE_CODE = YES; 182 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 183 | COPY_PHASE_STRIP = NO; 184 | DEBUG_INFORMATION_FORMAT = dwarf; 185 | ENABLE_STRICT_OBJC_MSGSEND = YES; 186 | ENABLE_TESTABILITY = YES; 187 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 188 | GCC_C_LANGUAGE_STANDARD = gnu17; 189 | GCC_DYNAMIC_NO_PIC = NO; 190 | GCC_NO_COMMON_BLOCKS = YES; 191 | GCC_OPTIMIZATION_LEVEL = 0; 192 | GCC_PREPROCESSOR_DEFINITIONS = ( 193 | "DEBUG=1", 194 | "$(inherited)", 195 | ); 196 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 197 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 198 | GCC_WARN_UNDECLARED_SELECTOR = YES; 199 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 200 | GCC_WARN_UNUSED_FUNCTION = YES; 201 | GCC_WARN_UNUSED_VARIABLE = YES; 202 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES; 203 | MACOSX_DEPLOYMENT_TARGET = 14.0; 204 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 205 | MTL_FAST_MATH = YES; 206 | ONLY_ACTIVE_ARCH = YES; 207 | SDKROOT = macosx; 208 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; 209 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 210 | }; 211 | name = Debug; 212 | }; 213 | C965BD362AE6E5D800E5836A /* Release */ = { 214 | isa = XCBuildConfiguration; 215 | buildSettings = { 216 | ALWAYS_SEARCH_USER_PATHS = YES; 217 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 218 | CLANG_ANALYZER_NONNULL = YES; 219 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 220 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 221 | CLANG_ENABLE_MODULES = YES; 222 | CLANG_ENABLE_OBJC_ARC = YES; 223 | CLANG_ENABLE_OBJC_WEAK = YES; 224 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 225 | CLANG_WARN_BOOL_CONVERSION = YES; 226 | CLANG_WARN_COMMA = YES; 227 | CLANG_WARN_CONSTANT_CONVERSION = YES; 228 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 229 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 230 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 231 | CLANG_WARN_EMPTY_BODY = YES; 232 | CLANG_WARN_ENUM_CONVERSION = YES; 233 | CLANG_WARN_INFINITE_RECURSION = YES; 234 | CLANG_WARN_INT_CONVERSION = YES; 235 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 236 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 237 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 238 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 239 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 240 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 241 | CLANG_WARN_STRICT_PROTOTYPES = YES; 242 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 243 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 244 | CLANG_WARN_UNREACHABLE_CODE = YES; 245 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 246 | COPY_PHASE_STRIP = NO; 247 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 248 | ENABLE_NS_ASSERTIONS = NO; 249 | ENABLE_STRICT_OBJC_MSGSEND = YES; 250 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 251 | GCC_C_LANGUAGE_STANDARD = gnu17; 252 | GCC_NO_COMMON_BLOCKS = YES; 253 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 254 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 255 | GCC_WARN_UNDECLARED_SELECTOR = YES; 256 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 257 | GCC_WARN_UNUSED_FUNCTION = YES; 258 | GCC_WARN_UNUSED_VARIABLE = YES; 259 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES; 260 | MACOSX_DEPLOYMENT_TARGET = 14.0; 261 | MTL_ENABLE_DEBUG_INFO = NO; 262 | MTL_FAST_MATH = YES; 263 | SDKROOT = macosx; 264 | SWIFT_COMPILATION_MODE = wholemodule; 265 | }; 266 | name = Release; 267 | }; 268 | C965BD382AE6E5D800E5836A /* Debug */ = { 269 | isa = XCBuildConfiguration; 270 | buildSettings = { 271 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 272 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 273 | CODE_SIGN_ENTITLEMENTS = StockMacOSApp/StockMacOSApp.entitlements; 274 | CODE_SIGN_STYLE = Automatic; 275 | COMBINE_HIDPI_IMAGES = YES; 276 | CURRENT_PROJECT_VERSION = 1; 277 | DEVELOPMENT_ASSET_PATHS = "\"StockMacOSApp/Preview Content\""; 278 | DEVELOPMENT_TEAM = 77X93NZ3G2; 279 | ENABLE_HARDENED_RUNTIME = YES; 280 | ENABLE_PREVIEWS = YES; 281 | GENERATE_INFOPLIST_FILE = YES; 282 | INFOPLIST_KEY_NSHumanReadableCopyright = ""; 283 | LD_RUNPATH_SEARCH_PATHS = ( 284 | "$(inherited)", 285 | "@executable_path/../Frameworks", 286 | ); 287 | MARKETING_VERSION = 1.0; 288 | PRODUCT_BUNDLE_IDENTIFIER = org.massicotte.StockMacOSApp; 289 | PRODUCT_NAME = "$(TARGET_NAME)"; 290 | SWIFT_EMIT_LOC_STRINGS = YES; 291 | SWIFT_VERSION = 5.0; 292 | }; 293 | name = Debug; 294 | }; 295 | C965BD392AE6E5D800E5836A /* Release */ = { 296 | isa = XCBuildConfiguration; 297 | buildSettings = { 298 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 299 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 300 | CODE_SIGN_ENTITLEMENTS = StockMacOSApp/StockMacOSApp.entitlements; 301 | CODE_SIGN_STYLE = Automatic; 302 | COMBINE_HIDPI_IMAGES = YES; 303 | CURRENT_PROJECT_VERSION = 1; 304 | DEVELOPMENT_ASSET_PATHS = "\"StockMacOSApp/Preview Content\""; 305 | DEVELOPMENT_TEAM = 77X93NZ3G2; 306 | ENABLE_HARDENED_RUNTIME = YES; 307 | ENABLE_PREVIEWS = YES; 308 | GENERATE_INFOPLIST_FILE = YES; 309 | INFOPLIST_KEY_NSHumanReadableCopyright = ""; 310 | LD_RUNPATH_SEARCH_PATHS = ( 311 | "$(inherited)", 312 | "@executable_path/../Frameworks", 313 | ); 314 | MARKETING_VERSION = 1.0; 315 | PRODUCT_BUNDLE_IDENTIFIER = org.massicotte.StockMacOSApp; 316 | PRODUCT_NAME = "$(TARGET_NAME)"; 317 | SWIFT_EMIT_LOC_STRINGS = YES; 318 | SWIFT_VERSION = 5.0; 319 | }; 320 | name = Release; 321 | }; 322 | /* End XCBuildConfiguration section */ 323 | 324 | /* Begin XCConfigurationList section */ 325 | C965BD232AE6E5D700E5836A /* Build configuration list for PBXProject "InvalidEmbeddedBuildSettings" */ = { 326 | isa = XCConfigurationList; 327 | buildConfigurations = ( 328 | C965BD352AE6E5D800E5836A /* Debug */, 329 | C965BD362AE6E5D800E5836A /* Release */, 330 | ); 331 | defaultConfigurationIsVisible = 0; 332 | defaultConfigurationName = Release; 333 | }; 334 | C965BD372AE6E5D800E5836A /* Build configuration list for PBXNativeTarget "StockMacOSApp" */ = { 335 | isa = XCConfigurationList; 336 | buildConfigurations = ( 337 | C965BD382AE6E5D800E5836A /* Debug */, 338 | C965BD392AE6E5D800E5836A /* Release */, 339 | ); 340 | defaultConfigurationIsVisible = 0; 341 | defaultConfigurationName = Release; 342 | }; 343 | /* End XCConfigurationList section */ 344 | }; 345 | rootObject = C965BD202AE6E5D700E5836A /* Project object */; 346 | } 347 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/ProjectOnlyBuildSettings.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 56; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C965BD2C2AE6E5D700E5836A /* StockMacOSAppApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */; }; 11 | C965BD2E2AE6E5D700E5836A /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C965BD2D2AE6E5D700E5836A /* ContentView.swift */; }; 12 | C965BD302AE6E5D800E5836A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C965BD2F2AE6E5D800E5836A /* Assets.xcassets */; }; 13 | C965BD332AE6E5D800E5836A /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXFileReference section */ 17 | C965BD282AE6E5D700E5836A /* .app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = .app; sourceTree = BUILT_PRODUCTS_DIR; }; 18 | C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StockMacOSAppApp.swift; sourceTree = ""; }; 19 | C965BD2D2AE6E5D700E5836A /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 20 | C965BD2F2AE6E5D800E5836A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 21 | C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 22 | C965BD342AE6E5D800E5836A /* StockMacOSApp.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = StockMacOSApp.entitlements; sourceTree = ""; }; 23 | /* End PBXFileReference section */ 24 | 25 | /* Begin PBXFrameworksBuildPhase section */ 26 | C965BD252AE6E5D700E5836A /* Frameworks */ = { 27 | isa = PBXFrameworksBuildPhase; 28 | buildActionMask = 2147483647; 29 | files = ( 30 | ); 31 | runOnlyForDeploymentPostprocessing = 0; 32 | }; 33 | /* End PBXFrameworksBuildPhase section */ 34 | 35 | /* Begin PBXGroup section */ 36 | C965BD1F2AE6E5D700E5836A = { 37 | isa = PBXGroup; 38 | children = ( 39 | C965BD2A2AE6E5D700E5836A /* StockMacOSApp */, 40 | C965BD292AE6E5D700E5836A /* Products */, 41 | ); 42 | sourceTree = ""; 43 | }; 44 | C965BD292AE6E5D700E5836A /* Products */ = { 45 | isa = PBXGroup; 46 | children = ( 47 | C965BD282AE6E5D700E5836A /* .app */, 48 | ); 49 | name = Products; 50 | sourceTree = ""; 51 | }; 52 | C965BD2A2AE6E5D700E5836A /* StockMacOSApp */ = { 53 | isa = PBXGroup; 54 | children = ( 55 | C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */, 56 | C965BD2D2AE6E5D700E5836A /* ContentView.swift */, 57 | C965BD2F2AE6E5D800E5836A /* Assets.xcassets */, 58 | C965BD342AE6E5D800E5836A /* StockMacOSApp.entitlements */, 59 | C965BD312AE6E5D800E5836A /* Preview Content */, 60 | ); 61 | path = StockMacOSApp; 62 | sourceTree = ""; 63 | }; 64 | C965BD312AE6E5D800E5836A /* Preview Content */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */, 68 | ); 69 | path = "Preview Content"; 70 | sourceTree = ""; 71 | }; 72 | /* End PBXGroup section */ 73 | 74 | /* Begin PBXNativeTarget section */ 75 | C965BD272AE6E5D700E5836A /* StockMacOSApp */ = { 76 | isa = PBXNativeTarget; 77 | buildConfigurationList = C965BD372AE6E5D800E5836A /* Build configuration list for PBXNativeTarget "StockMacOSApp" */; 78 | buildPhases = ( 79 | C965BD242AE6E5D700E5836A /* Sources */, 80 | C965BD252AE6E5D700E5836A /* Frameworks */, 81 | C965BD262AE6E5D700E5836A /* Resources */, 82 | ); 83 | buildRules = ( 84 | ); 85 | dependencies = ( 86 | ); 87 | name = StockMacOSApp; 88 | productName = StockMacOSApp; 89 | productReference = C965BD282AE6E5D700E5836A /* .app */; 90 | productType = "com.apple.product-type.application"; 91 | }; 92 | /* End PBXNativeTarget section */ 93 | 94 | /* Begin PBXProject section */ 95 | C965BD202AE6E5D700E5836A /* Project object */ = { 96 | isa = PBXProject; 97 | attributes = { 98 | BuildIndependentTargetsInParallel = 1; 99 | LastSwiftUpdateCheck = 1510; 100 | LastUpgradeCheck = 1510; 101 | TargetAttributes = { 102 | C965BD272AE6E5D700E5836A = { 103 | CreatedOnToolsVersion = 15.1; 104 | }; 105 | }; 106 | }; 107 | buildConfigurationList = C965BD232AE6E5D700E5836A /* Build configuration list for PBXProject "ProjectOnlyBuildSettings" */; 108 | compatibilityVersion = "Xcode 14.0"; 109 | developmentRegion = en; 110 | hasScannedForEncodings = 0; 111 | knownRegions = ( 112 | en, 113 | Base, 114 | ); 115 | mainGroup = C965BD1F2AE6E5D700E5836A; 116 | productRefGroup = C965BD292AE6E5D700E5836A /* Products */; 117 | projectDirPath = ""; 118 | projectRoot = ""; 119 | targets = ( 120 | C965BD272AE6E5D700E5836A /* StockMacOSApp */, 121 | ); 122 | }; 123 | /* End PBXProject section */ 124 | 125 | /* Begin PBXResourcesBuildPhase section */ 126 | C965BD262AE6E5D700E5836A /* Resources */ = { 127 | isa = PBXResourcesBuildPhase; 128 | buildActionMask = 2147483647; 129 | files = ( 130 | C965BD332AE6E5D800E5836A /* Preview Assets.xcassets in Resources */, 131 | C965BD302AE6E5D800E5836A /* Assets.xcassets in Resources */, 132 | ); 133 | runOnlyForDeploymentPostprocessing = 0; 134 | }; 135 | /* End PBXResourcesBuildPhase section */ 136 | 137 | /* Begin PBXSourcesBuildPhase section */ 138 | C965BD242AE6E5D700E5836A /* Sources */ = { 139 | isa = PBXSourcesBuildPhase; 140 | buildActionMask = 2147483647; 141 | files = ( 142 | C965BD2E2AE6E5D700E5836A /* ContentView.swift in Sources */, 143 | C965BD2C2AE6E5D700E5836A /* StockMacOSAppApp.swift in Sources */, 144 | ); 145 | runOnlyForDeploymentPostprocessing = 0; 146 | }; 147 | /* End PBXSourcesBuildPhase section */ 148 | 149 | /* Begin XCBuildConfiguration section */ 150 | C965BD352AE6E5D800E5836A /* Debug */ = { 151 | isa = XCBuildConfiguration; 152 | buildSettings = { 153 | ONLY_ACTIVE_ARCH = YES; 154 | }; 155 | name = Debug; 156 | }; 157 | C965BD362AE6E5D800E5836A /* Release */ = { 158 | isa = XCBuildConfiguration; 159 | buildSettings = { 160 | ONLY_ACTIVE_ARCH = YES; 161 | }; 162 | name = Release; 163 | }; 164 | C965BD382AE6E5D800E5836A /* Debug */ = { 165 | isa = XCBuildConfiguration; 166 | buildSettings = { 167 | }; 168 | name = Debug; 169 | }; 170 | C965BD392AE6E5D800E5836A /* Release */ = { 171 | isa = XCBuildConfiguration; 172 | buildSettings = { 173 | }; 174 | name = Release; 175 | }; 176 | /* End XCBuildConfiguration section */ 177 | 178 | /* Begin XCConfigurationList section */ 179 | C965BD232AE6E5D700E5836A /* Build configuration list for PBXProject "ProjectOnlyBuildSettings" */ = { 180 | isa = XCConfigurationList; 181 | buildConfigurations = ( 182 | C965BD352AE6E5D800E5836A /* Debug */, 183 | C965BD362AE6E5D800E5836A /* Release */, 184 | ); 185 | defaultConfigurationIsVisible = 0; 186 | defaultConfigurationName = Release; 187 | }; 188 | C965BD372AE6E5D800E5836A /* Build configuration list for PBXNativeTarget "StockMacOSApp" */ = { 189 | isa = XCConfigurationList; 190 | buildConfigurations = ( 191 | C965BD382AE6E5D800E5836A /* Debug */, 192 | C965BD392AE6E5D800E5836A /* Release */, 193 | ); 194 | defaultConfigurationIsVisible = 0; 195 | defaultConfigurationName = Release; 196 | }; 197 | /* End XCConfigurationList section */ 198 | }; 199 | rootObject = C965BD202AE6E5D700E5836A /* Project object */; 200 | } 201 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/ProjectOnlyBuildSettings.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/ProjectOnlyBuildSettings.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/ProjectsUseXCConfigFiles.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/ProjectsUseXCConfigFiles.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/SchemeSkipsTestBundles.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/SchemeSkipsTestBundles.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/SchemeSkipsTestBundles.xcodeproj/xcshareddata/xcschemes/SchemeSkipsTests.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 35 | 41 | 42 | 43 | 46 | 52 | 53 | 54 | 55 | 56 | 66 | 68 | 74 | 75 | 76 | 77 | 83 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/SchemeSkipsTests.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/SchemeSkipsTests.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/SchemeSkipsTests.xcodeproj/xcshareddata/xcschemes/SchemeSkipsTests.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 35 | 41 | 42 | 43 | 45 | 46 | 47 | 48 | 51 | 57 | 58 | 59 | 60 | 61 | 71 | 73 | 79 | 80 | 81 | 82 | 88 | 90 | 96 | 97 | 98 | 99 | 101 | 102 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/SortedGroups.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 56; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C965BD2C2AE6E5D700E5836A /* StockMacOSAppApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */; }; 11 | C965BD2E2AE6E5D700E5836A /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C965BD2D2AE6E5D700E5836A /* ContentView.swift */; }; 12 | C965BD302AE6E5D800E5836A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C965BD2F2AE6E5D800E5836A /* Assets.xcassets */; }; 13 | C965BD332AE6E5D800E5836A /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXFileReference section */ 17 | C965BD282AE6E5D700E5836A /* .app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = .app; sourceTree = BUILT_PRODUCTS_DIR; }; 18 | C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StockMacOSAppApp.swift; sourceTree = ""; }; 19 | C965BD2D2AE6E5D700E5836A /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 20 | C965BD2F2AE6E5D800E5836A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 21 | C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 22 | C965BD342AE6E5D800E5836A /* StockMacOSApp.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = StockMacOSApp.entitlements; sourceTree = ""; }; 23 | /* End PBXFileReference section */ 24 | 25 | /* Begin PBXFrameworksBuildPhase section */ 26 | C965BD252AE6E5D700E5836A /* Frameworks */ = { 27 | isa = PBXFrameworksBuildPhase; 28 | buildActionMask = 2147483647; 29 | files = ( 30 | ); 31 | runOnlyForDeploymentPostprocessing = 0; 32 | }; 33 | /* End PBXFrameworksBuildPhase section */ 34 | 35 | /* Begin PBXGroup section */ 36 | C965BD1F2AE6E5D700E5836A = { 37 | isa = PBXGroup; 38 | children = ( 39 | C965BD2A2AE6E5D700E5836A /* StockMacOSApp */, 40 | C965BD292AE6E5D700E5836A /* Products */, 41 | ); 42 | sourceTree = ""; 43 | }; 44 | C965BD292AE6E5D700E5836A /* Products */ = { 45 | isa = PBXGroup; 46 | children = ( 47 | C965BD282AE6E5D700E5836A /* .app */, 48 | ); 49 | name = Products; 50 | sourceTree = ""; 51 | }; 52 | C965BD2A2AE6E5D700E5836A /* StockMacOSApp */ = { 53 | isa = PBXGroup; 54 | children = ( 55 | C965BD2F2AE6E5D800E5836A /* Assets.xcassets */, 56 | C965BD2D2AE6E5D700E5836A /* ContentView.swift */, 57 | C965BD312AE6E5D800E5836A /* Preview Content */, 58 | C965BD342AE6E5D800E5836A /* StockMacOSApp.entitlements */, 59 | C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */, 60 | ); 61 | path = StockMacOSApp; 62 | sourceTree = ""; 63 | }; 64 | C965BD312AE6E5D800E5836A /* Preview Content */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */, 68 | ); 69 | path = "Preview Content"; 70 | sourceTree = ""; 71 | }; 72 | /* End PBXGroup section */ 73 | 74 | /* Begin PBXNativeTarget section */ 75 | C965BD272AE6E5D700E5836A /* StockMacOSApp */ = { 76 | isa = PBXNativeTarget; 77 | buildConfigurationList = C965BD372AE6E5D800E5836A /* Build configuration list for PBXNativeTarget "StockMacOSApp" */; 78 | buildPhases = ( 79 | C965BD242AE6E5D700E5836A /* Sources */, 80 | C965BD252AE6E5D700E5836A /* Frameworks */, 81 | C965BD262AE6E5D700E5836A /* Resources */, 82 | ); 83 | buildRules = ( 84 | ); 85 | dependencies = ( 86 | ); 87 | name = StockMacOSApp; 88 | productName = StockMacOSApp; 89 | productReference = C965BD282AE6E5D700E5836A /* .app */; 90 | productType = "com.apple.product-type.application"; 91 | }; 92 | /* End PBXNativeTarget section */ 93 | 94 | /* Begin PBXProject section */ 95 | C965BD202AE6E5D700E5836A /* Project object */ = { 96 | isa = PBXProject; 97 | attributes = { 98 | BuildIndependentTargetsInParallel = 1; 99 | LastSwiftUpdateCheck = 1510; 100 | LastUpgradeCheck = 1510; 101 | TargetAttributes = { 102 | C965BD272AE6E5D700E5836A = { 103 | CreatedOnToolsVersion = 15.1; 104 | }; 105 | }; 106 | }; 107 | buildConfigurationList = C965BD232AE6E5D700E5836A /* Build configuration list for PBXProject "BulidSettingsRemoved" */; 108 | compatibilityVersion = "Xcode 14.0"; 109 | developmentRegion = en; 110 | hasScannedForEncodings = 0; 111 | knownRegions = ( 112 | en, 113 | Base, 114 | ); 115 | mainGroup = C965BD1F2AE6E5D700E5836A; 116 | productRefGroup = C965BD292AE6E5D700E5836A /* Products */; 117 | projectDirPath = ""; 118 | projectRoot = ""; 119 | targets = ( 120 | C965BD272AE6E5D700E5836A /* StockMacOSApp */, 121 | ); 122 | }; 123 | /* End PBXProject section */ 124 | 125 | /* Begin PBXResourcesBuildPhase section */ 126 | C965BD262AE6E5D700E5836A /* Resources */ = { 127 | isa = PBXResourcesBuildPhase; 128 | buildActionMask = 2147483647; 129 | files = ( 130 | C965BD332AE6E5D800E5836A /* Preview Assets.xcassets in Resources */, 131 | C965BD302AE6E5D800E5836A /* Assets.xcassets in Resources */, 132 | ); 133 | runOnlyForDeploymentPostprocessing = 0; 134 | }; 135 | /* End PBXResourcesBuildPhase section */ 136 | 137 | /* Begin PBXSourcesBuildPhase section */ 138 | C965BD242AE6E5D700E5836A /* Sources */ = { 139 | isa = PBXSourcesBuildPhase; 140 | buildActionMask = 2147483647; 141 | files = ( 142 | C965BD2E2AE6E5D700E5836A /* ContentView.swift in Sources */, 143 | C965BD2C2AE6E5D700E5836A /* StockMacOSAppApp.swift in Sources */, 144 | ); 145 | runOnlyForDeploymentPostprocessing = 0; 146 | }; 147 | /* End PBXSourcesBuildPhase section */ 148 | 149 | /* Begin XCBuildConfiguration section */ 150 | C965BD352AE6E5D800E5836A /* Debug */ = { 151 | isa = XCBuildConfiguration; 152 | buildSettings = { 153 | }; 154 | name = Debug; 155 | }; 156 | C965BD362AE6E5D800E5836A /* Release */ = { 157 | isa = XCBuildConfiguration; 158 | buildSettings = { 159 | }; 160 | name = Release; 161 | }; 162 | C965BD382AE6E5D800E5836A /* Debug */ = { 163 | isa = XCBuildConfiguration; 164 | buildSettings = { 165 | }; 166 | name = Debug; 167 | }; 168 | C965BD392AE6E5D800E5836A /* Release */ = { 169 | isa = XCBuildConfiguration; 170 | buildSettings = { 171 | }; 172 | name = Release; 173 | }; 174 | /* End XCBuildConfiguration section */ 175 | 176 | /* Begin XCConfigurationList section */ 177 | C965BD232AE6E5D700E5836A /* Build configuration list for PBXProject "BulidSettingsRemoved" */ = { 178 | isa = XCConfigurationList; 179 | buildConfigurations = ( 180 | C965BD352AE6E5D800E5836A /* Debug */, 181 | C965BD362AE6E5D800E5836A /* Release */, 182 | ); 183 | defaultConfigurationIsVisible = 0; 184 | defaultConfigurationName = Release; 185 | }; 186 | C965BD372AE6E5D800E5836A /* Build configuration list for PBXNativeTarget "StockMacOSApp" */ = { 187 | isa = XCConfigurationList; 188 | buildConfigurations = ( 189 | C965BD382AE6E5D800E5836A /* Debug */, 190 | C965BD392AE6E5D800E5836A /* Release */, 191 | ); 192 | defaultConfigurationIsVisible = 0; 193 | defaultConfigurationName = Release; 194 | }; 195 | /* End XCConfigurationList section */ 196 | }; 197 | rootObject = C965BD202AE6E5D700E5836A /* Project object */; 198 | } 199 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/SortedGroups.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/SortedGroups.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/SortedGroupsByReference.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 56; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C965BD2C2AE6E5D700E5836A /* StockMacOSAppApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */; }; 11 | C965BD2E2AE6E5D700E5836A /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C965BD2D2AE6E5D700E5836A /* ContentView.swift */; }; 12 | C965BD302AE6E5D800E5836A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C965BD2F2AE6E5D800E5836A /* Assets.xcassets */; }; 13 | C965BD332AE6E5D800E5836A /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXFileReference section */ 17 | C965BD282AE6E5D700E5836A /* .app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = .app; sourceTree = BUILT_PRODUCTS_DIR; }; 18 | C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = StockMacOSAppApp.swift; path = A/StockMacOSAppApp.swift; sourceTree = SOURCE_ROOT; }; 19 | C965BD2D2AE6E5D700E5836A /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = SOURCE_ROOT; }; 20 | C965BD2F2AE6E5D800E5836A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 21 | C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 22 | C965BD342AE6E5D800E5836A /* StockMacOSApp.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = StockMacOSApp.entitlements; sourceTree = ""; }; 23 | /* End PBXFileReference section */ 24 | 25 | /* Begin PBXFrameworksBuildPhase section */ 26 | C965BD252AE6E5D700E5836A /* Frameworks */ = { 27 | isa = PBXFrameworksBuildPhase; 28 | buildActionMask = 2147483647; 29 | files = ( 30 | ); 31 | runOnlyForDeploymentPostprocessing = 0; 32 | }; 33 | /* End PBXFrameworksBuildPhase section */ 34 | 35 | /* Begin PBXGroup section */ 36 | C965BD1F2AE6E5D700E5836A = { 37 | isa = PBXGroup; 38 | children = ( 39 | C965BD2A2AE6E5D700E5836A /* StockMacOSApp */, 40 | C965BD292AE6E5D700E5836A /* Products */, 41 | ); 42 | sourceTree = ""; 43 | }; 44 | C965BD292AE6E5D700E5836A /* Products */ = { 45 | isa = PBXGroup; 46 | children = ( 47 | C965BD282AE6E5D700E5836A /* .app */, 48 | ); 49 | name = Products; 50 | sourceTree = ""; 51 | }; 52 | C965BD2A2AE6E5D700E5836A /* StockMacOSApp */ = { 53 | isa = PBXGroup; 54 | children = ( 55 | C965BD2F2AE6E5D800E5836A /* Assets.xcassets */, 56 | C965BD2D2AE6E5D700E5836A /* ContentView.swift */, 57 | C965BD312AE6E5D800E5836A /* Preview Content */, 58 | C965BD342AE6E5D800E5836A /* StockMacOSApp.entitlements */, 59 | C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */, 60 | ); 61 | path = StockMacOSApp; 62 | sourceTree = ""; 63 | }; 64 | C965BD312AE6E5D800E5836A /* Preview Content */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */, 68 | ); 69 | path = "Preview Content"; 70 | sourceTree = ""; 71 | }; 72 | /* End PBXGroup section */ 73 | 74 | /* Begin PBXNativeTarget section */ 75 | C965BD272AE6E5D700E5836A /* StockMacOSApp */ = { 76 | isa = PBXNativeTarget; 77 | buildConfigurationList = C965BD372AE6E5D800E5836A /* Build configuration list for PBXNativeTarget "StockMacOSApp" */; 78 | buildPhases = ( 79 | C965BD242AE6E5D700E5836A /* Sources */, 80 | C965BD252AE6E5D700E5836A /* Frameworks */, 81 | C965BD262AE6E5D700E5836A /* Resources */, 82 | ); 83 | buildRules = ( 84 | ); 85 | dependencies = ( 86 | ); 87 | name = StockMacOSApp; 88 | productName = StockMacOSApp; 89 | productReference = C965BD282AE6E5D700E5836A /* .app */; 90 | productType = "com.apple.product-type.application"; 91 | }; 92 | /* End PBXNativeTarget section */ 93 | 94 | /* Begin PBXProject section */ 95 | C965BD202AE6E5D700E5836A /* Project object */ = { 96 | isa = PBXProject; 97 | attributes = { 98 | BuildIndependentTargetsInParallel = 1; 99 | LastSwiftUpdateCheck = 1510; 100 | LastUpgradeCheck = 1510; 101 | TargetAttributes = { 102 | C965BD272AE6E5D700E5836A = { 103 | CreatedOnToolsVersion = 15.1; 104 | }; 105 | }; 106 | }; 107 | buildConfigurationList = C965BD232AE6E5D700E5836A /* Build configuration list for PBXProject "SortedGroupsByReference" */; 108 | compatibilityVersion = "Xcode 14.0"; 109 | developmentRegion = en; 110 | hasScannedForEncodings = 0; 111 | knownRegions = ( 112 | en, 113 | Base, 114 | ); 115 | mainGroup = C965BD1F2AE6E5D700E5836A; 116 | productRefGroup = C965BD292AE6E5D700E5836A /* Products */; 117 | projectDirPath = ""; 118 | projectRoot = ""; 119 | targets = ( 120 | C965BD272AE6E5D700E5836A /* StockMacOSApp */, 121 | ); 122 | }; 123 | /* End PBXProject section */ 124 | 125 | /* Begin PBXResourcesBuildPhase section */ 126 | C965BD262AE6E5D700E5836A /* Resources */ = { 127 | isa = PBXResourcesBuildPhase; 128 | buildActionMask = 2147483647; 129 | files = ( 130 | C965BD332AE6E5D800E5836A /* Preview Assets.xcassets in Resources */, 131 | C965BD302AE6E5D800E5836A /* Assets.xcassets in Resources */, 132 | ); 133 | runOnlyForDeploymentPostprocessing = 0; 134 | }; 135 | /* End PBXResourcesBuildPhase section */ 136 | 137 | /* Begin PBXSourcesBuildPhase section */ 138 | C965BD242AE6E5D700E5836A /* Sources */ = { 139 | isa = PBXSourcesBuildPhase; 140 | buildActionMask = 2147483647; 141 | files = ( 142 | C965BD2E2AE6E5D700E5836A /* ContentView.swift in Sources */, 143 | C965BD2C2AE6E5D700E5836A /* StockMacOSAppApp.swift in Sources */, 144 | ); 145 | runOnlyForDeploymentPostprocessing = 0; 146 | }; 147 | /* End PBXSourcesBuildPhase section */ 148 | 149 | /* Begin XCBuildConfiguration section */ 150 | C965BD352AE6E5D800E5836A /* Debug */ = { 151 | isa = XCBuildConfiguration; 152 | buildSettings = { 153 | }; 154 | name = Debug; 155 | }; 156 | C965BD362AE6E5D800E5836A /* Release */ = { 157 | isa = XCBuildConfiguration; 158 | buildSettings = { 159 | }; 160 | name = Release; 161 | }; 162 | C965BD382AE6E5D800E5836A /* Debug */ = { 163 | isa = XCBuildConfiguration; 164 | buildSettings = { 165 | }; 166 | name = Debug; 167 | }; 168 | C965BD392AE6E5D800E5836A /* Release */ = { 169 | isa = XCBuildConfiguration; 170 | buildSettings = { 171 | }; 172 | name = Release; 173 | }; 174 | /* End XCBuildConfiguration section */ 175 | 176 | /* Begin XCConfigurationList section */ 177 | C965BD232AE6E5D700E5836A /* Build configuration list for PBXProject "SortedGroupsByReference" */ = { 178 | isa = XCConfigurationList; 179 | buildConfigurations = ( 180 | C965BD352AE6E5D800E5836A /* Debug */, 181 | C965BD362AE6E5D800E5836A /* Release */, 182 | ); 183 | defaultConfigurationIsVisible = 0; 184 | defaultConfigurationName = Release; 185 | }; 186 | C965BD372AE6E5D800E5836A /* Build configuration list for PBXNativeTarget "StockMacOSApp" */ = { 187 | isa = XCConfigurationList; 188 | buildConfigurations = ( 189 | C965BD382AE6E5D800E5836A /* Debug */, 190 | C965BD392AE6E5D800E5836A /* Release */, 191 | ); 192 | defaultConfigurationIsVisible = 0; 193 | defaultConfigurationName = Release; 194 | }; 195 | /* End XCConfigurationList section */ 196 | }; 197 | rootObject = C965BD202AE6E5D700E5836A /* Project object */; 198 | } 199 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/SortedGroupsByReference.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/SortedGroupsByReference.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/StockMacOSApp.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 56; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C965BD2C2AE6E5D700E5836A /* StockMacOSAppApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */; }; 11 | C965BD2E2AE6E5D700E5836A /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C965BD2D2AE6E5D700E5836A /* ContentView.swift */; }; 12 | C965BD302AE6E5D800E5836A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C965BD2F2AE6E5D800E5836A /* Assets.xcassets */; }; 13 | C965BD332AE6E5D800E5836A /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXFileReference section */ 17 | C965BD282AE6E5D700E5836A /* StockMacOSApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = StockMacOSApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 18 | C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StockMacOSAppApp.swift; sourceTree = ""; }; 19 | C965BD2D2AE6E5D700E5836A /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 20 | C965BD2F2AE6E5D800E5836A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 21 | C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 22 | C965BD342AE6E5D800E5836A /* StockMacOSApp.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = StockMacOSApp.entitlements; sourceTree = ""; }; 23 | /* End PBXFileReference section */ 24 | 25 | /* Begin PBXFrameworksBuildPhase section */ 26 | C965BD252AE6E5D700E5836A /* Frameworks */ = { 27 | isa = PBXFrameworksBuildPhase; 28 | buildActionMask = 2147483647; 29 | files = ( 30 | ); 31 | runOnlyForDeploymentPostprocessing = 0; 32 | }; 33 | /* End PBXFrameworksBuildPhase section */ 34 | 35 | /* Begin PBXGroup section */ 36 | C965BD1F2AE6E5D700E5836A = { 37 | isa = PBXGroup; 38 | children = ( 39 | C965BD2A2AE6E5D700E5836A /* StockMacOSApp */, 40 | C965BD292AE6E5D700E5836A /* Products */, 41 | ); 42 | sourceTree = ""; 43 | }; 44 | C965BD292AE6E5D700E5836A /* Products */ = { 45 | isa = PBXGroup; 46 | children = ( 47 | C965BD282AE6E5D700E5836A /* StockMacOSApp.app */, 48 | ); 49 | name = Products; 50 | sourceTree = ""; 51 | }; 52 | C965BD2A2AE6E5D700E5836A /* StockMacOSApp */ = { 53 | isa = PBXGroup; 54 | children = ( 55 | C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */, 56 | C965BD2D2AE6E5D700E5836A /* ContentView.swift */, 57 | C965BD2F2AE6E5D800E5836A /* Assets.xcassets */, 58 | C965BD342AE6E5D800E5836A /* StockMacOSApp.entitlements */, 59 | C965BD312AE6E5D800E5836A /* Preview Content */, 60 | ); 61 | path = StockMacOSApp; 62 | sourceTree = ""; 63 | }; 64 | C965BD312AE6E5D800E5836A /* Preview Content */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */, 68 | ); 69 | path = "Preview Content"; 70 | sourceTree = ""; 71 | }; 72 | /* End PBXGroup section */ 73 | 74 | /* Begin PBXNativeTarget section */ 75 | C965BD272AE6E5D700E5836A /* StockMacOSApp */ = { 76 | isa = PBXNativeTarget; 77 | buildConfigurationList = C965BD372AE6E5D800E5836A /* Build configuration list for PBXNativeTarget "StockMacOSApp" */; 78 | buildPhases = ( 79 | C965BD242AE6E5D700E5836A /* Sources */, 80 | C965BD252AE6E5D700E5836A /* Frameworks */, 81 | C965BD262AE6E5D700E5836A /* Resources */, 82 | ); 83 | buildRules = ( 84 | ); 85 | dependencies = ( 86 | ); 87 | name = StockMacOSApp; 88 | productName = StockMacOSApp; 89 | productReference = C965BD282AE6E5D700E5836A /* StockMacOSApp.app */; 90 | productType = "com.apple.product-type.application"; 91 | }; 92 | /* End PBXNativeTarget section */ 93 | 94 | /* Begin PBXProject section */ 95 | C965BD202AE6E5D700E5836A /* Project object */ = { 96 | isa = PBXProject; 97 | attributes = { 98 | BuildIndependentTargetsInParallel = 1; 99 | LastSwiftUpdateCheck = 1510; 100 | LastUpgradeCheck = 1510; 101 | TargetAttributes = { 102 | C965BD272AE6E5D700E5836A = { 103 | CreatedOnToolsVersion = 15.1; 104 | }; 105 | }; 106 | }; 107 | buildConfigurationList = C965BD232AE6E5D700E5836A /* Build configuration list for PBXProject "StockMacOSApp" */; 108 | compatibilityVersion = "Xcode 14.0"; 109 | developmentRegion = en; 110 | hasScannedForEncodings = 0; 111 | knownRegions = ( 112 | en, 113 | Base, 114 | ); 115 | mainGroup = C965BD1F2AE6E5D700E5836A; 116 | productRefGroup = C965BD292AE6E5D700E5836A /* Products */; 117 | projectDirPath = ""; 118 | projectRoot = ""; 119 | targets = ( 120 | C965BD272AE6E5D700E5836A /* StockMacOSApp */, 121 | ); 122 | }; 123 | /* End PBXProject section */ 124 | 125 | /* Begin PBXResourcesBuildPhase section */ 126 | C965BD262AE6E5D700E5836A /* Resources */ = { 127 | isa = PBXResourcesBuildPhase; 128 | buildActionMask = 2147483647; 129 | files = ( 130 | C965BD332AE6E5D800E5836A /* Preview Assets.xcassets in Resources */, 131 | C965BD302AE6E5D800E5836A /* Assets.xcassets in Resources */, 132 | ); 133 | runOnlyForDeploymentPostprocessing = 0; 134 | }; 135 | /* End PBXResourcesBuildPhase section */ 136 | 137 | /* Begin PBXSourcesBuildPhase section */ 138 | C965BD242AE6E5D700E5836A /* Sources */ = { 139 | isa = PBXSourcesBuildPhase; 140 | buildActionMask = 2147483647; 141 | files = ( 142 | C965BD2E2AE6E5D700E5836A /* ContentView.swift in Sources */, 143 | C965BD2C2AE6E5D700E5836A /* StockMacOSAppApp.swift in Sources */, 144 | ); 145 | runOnlyForDeploymentPostprocessing = 0; 146 | }; 147 | /* End PBXSourcesBuildPhase section */ 148 | 149 | /* Begin XCBuildConfiguration section */ 150 | C965BD352AE6E5D800E5836A /* Debug */ = { 151 | isa = XCBuildConfiguration; 152 | buildSettings = { 153 | ALWAYS_SEARCH_USER_PATHS = NO; 154 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 155 | CLANG_ANALYZER_NONNULL = YES; 156 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 157 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 158 | CLANG_ENABLE_MODULES = YES; 159 | CLANG_ENABLE_OBJC_ARC = YES; 160 | CLANG_ENABLE_OBJC_WEAK = YES; 161 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 162 | CLANG_WARN_BOOL_CONVERSION = YES; 163 | CLANG_WARN_COMMA = YES; 164 | CLANG_WARN_CONSTANT_CONVERSION = YES; 165 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 166 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 167 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 168 | CLANG_WARN_EMPTY_BODY = YES; 169 | CLANG_WARN_ENUM_CONVERSION = YES; 170 | CLANG_WARN_INFINITE_RECURSION = YES; 171 | CLANG_WARN_INT_CONVERSION = YES; 172 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 173 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 174 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 175 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 176 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 177 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 178 | CLANG_WARN_STRICT_PROTOTYPES = YES; 179 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 180 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 181 | CLANG_WARN_UNREACHABLE_CODE = YES; 182 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 183 | COPY_PHASE_STRIP = NO; 184 | DEBUG_INFORMATION_FORMAT = dwarf; 185 | ENABLE_STRICT_OBJC_MSGSEND = YES; 186 | ENABLE_TESTABILITY = YES; 187 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 188 | GCC_C_LANGUAGE_STANDARD = gnu17; 189 | GCC_DYNAMIC_NO_PIC = NO; 190 | GCC_NO_COMMON_BLOCKS = YES; 191 | GCC_OPTIMIZATION_LEVEL = 0; 192 | GCC_PREPROCESSOR_DEFINITIONS = ( 193 | "DEBUG=1", 194 | "$(inherited)", 195 | ); 196 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 197 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 198 | GCC_WARN_UNDECLARED_SELECTOR = YES; 199 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 200 | GCC_WARN_UNUSED_FUNCTION = YES; 201 | GCC_WARN_UNUSED_VARIABLE = YES; 202 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES; 203 | MACOSX_DEPLOYMENT_TARGET = 14.0; 204 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 205 | MTL_FAST_MATH = YES; 206 | ONLY_ACTIVE_ARCH = YES; 207 | SDKROOT = macosx; 208 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; 209 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 210 | }; 211 | name = Debug; 212 | }; 213 | C965BD362AE6E5D800E5836A /* Release */ = { 214 | isa = XCBuildConfiguration; 215 | buildSettings = { 216 | ALWAYS_SEARCH_USER_PATHS = NO; 217 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 218 | CLANG_ANALYZER_NONNULL = YES; 219 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 220 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 221 | CLANG_ENABLE_MODULES = YES; 222 | CLANG_ENABLE_OBJC_ARC = YES; 223 | CLANG_ENABLE_OBJC_WEAK = YES; 224 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 225 | CLANG_WARN_BOOL_CONVERSION = YES; 226 | CLANG_WARN_COMMA = YES; 227 | CLANG_WARN_CONSTANT_CONVERSION = YES; 228 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 229 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 230 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 231 | CLANG_WARN_EMPTY_BODY = YES; 232 | CLANG_WARN_ENUM_CONVERSION = YES; 233 | CLANG_WARN_INFINITE_RECURSION = YES; 234 | CLANG_WARN_INT_CONVERSION = YES; 235 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 236 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 237 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 238 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 239 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 240 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 241 | CLANG_WARN_STRICT_PROTOTYPES = YES; 242 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 243 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 244 | CLANG_WARN_UNREACHABLE_CODE = YES; 245 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 246 | COPY_PHASE_STRIP = NO; 247 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 248 | ENABLE_NS_ASSERTIONS = NO; 249 | ENABLE_STRICT_OBJC_MSGSEND = YES; 250 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 251 | GCC_C_LANGUAGE_STANDARD = gnu17; 252 | GCC_NO_COMMON_BLOCKS = YES; 253 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 254 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 255 | GCC_WARN_UNDECLARED_SELECTOR = YES; 256 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 257 | GCC_WARN_UNUSED_FUNCTION = YES; 258 | GCC_WARN_UNUSED_VARIABLE = YES; 259 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES; 260 | MACOSX_DEPLOYMENT_TARGET = 14.0; 261 | MTL_ENABLE_DEBUG_INFO = NO; 262 | MTL_FAST_MATH = YES; 263 | SDKROOT = macosx; 264 | SWIFT_COMPILATION_MODE = wholemodule; 265 | }; 266 | name = Release; 267 | }; 268 | C965BD382AE6E5D800E5836A /* Debug */ = { 269 | isa = XCBuildConfiguration; 270 | buildSettings = { 271 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 272 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 273 | CODE_SIGN_ENTITLEMENTS = StockMacOSApp/StockMacOSApp.entitlements; 274 | CODE_SIGN_STYLE = Automatic; 275 | COMBINE_HIDPI_IMAGES = YES; 276 | CURRENT_PROJECT_VERSION = 1; 277 | DEVELOPMENT_ASSET_PATHS = "\"StockMacOSApp/Preview Content\""; 278 | DEVELOPMENT_TEAM = 77X93NZ3G2; 279 | ENABLE_HARDENED_RUNTIME = YES; 280 | ENABLE_PREVIEWS = YES; 281 | GENERATE_INFOPLIST_FILE = YES; 282 | INFOPLIST_KEY_NSHumanReadableCopyright = ""; 283 | LD_RUNPATH_SEARCH_PATHS = ( 284 | "$(inherited)", 285 | "@executable_path/../Frameworks", 286 | ); 287 | MARKETING_VERSION = 1.0; 288 | PRODUCT_BUNDLE_IDENTIFIER = org.massicotte.StockMacOSApp; 289 | PRODUCT_NAME = "$(TARGET_NAME)"; 290 | SWIFT_EMIT_LOC_STRINGS = YES; 291 | SWIFT_VERSION = 5.0; 292 | }; 293 | name = Debug; 294 | }; 295 | C965BD392AE6E5D800E5836A /* Release */ = { 296 | isa = XCBuildConfiguration; 297 | buildSettings = { 298 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 299 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 300 | CODE_SIGN_ENTITLEMENTS = StockMacOSApp/StockMacOSApp.entitlements; 301 | CODE_SIGN_STYLE = Automatic; 302 | COMBINE_HIDPI_IMAGES = YES; 303 | CURRENT_PROJECT_VERSION = 1; 304 | DEVELOPMENT_ASSET_PATHS = "\"StockMacOSApp/Preview Content\""; 305 | DEVELOPMENT_TEAM = 77X93NZ3G2; 306 | ENABLE_HARDENED_RUNTIME = YES; 307 | ENABLE_PREVIEWS = YES; 308 | GENERATE_INFOPLIST_FILE = YES; 309 | INFOPLIST_KEY_NSHumanReadableCopyright = ""; 310 | LD_RUNPATH_SEARCH_PATHS = ( 311 | "$(inherited)", 312 | "@executable_path/../Frameworks", 313 | ); 314 | MARKETING_VERSION = 1.0; 315 | PRODUCT_BUNDLE_IDENTIFIER = org.massicotte.StockMacOSApp; 316 | PRODUCT_NAME = "$(TARGET_NAME)"; 317 | SWIFT_EMIT_LOC_STRINGS = YES; 318 | SWIFT_VERSION = 5.0; 319 | }; 320 | name = Release; 321 | }; 322 | /* End XCBuildConfiguration section */ 323 | 324 | /* Begin XCConfigurationList section */ 325 | C965BD232AE6E5D700E5836A /* Build configuration list for PBXProject "StockMacOSApp" */ = { 326 | isa = XCConfigurationList; 327 | buildConfigurations = ( 328 | C965BD352AE6E5D800E5836A /* Debug */, 329 | C965BD362AE6E5D800E5836A /* Release */, 330 | ); 331 | defaultConfigurationIsVisible = 0; 332 | defaultConfigurationName = Release; 333 | }; 334 | C965BD372AE6E5D800E5836A /* Build configuration list for PBXNativeTarget "StockMacOSApp" */ = { 335 | isa = XCConfigurationList; 336 | buildConfigurations = ( 337 | C965BD382AE6E5D800E5836A /* Debug */, 338 | C965BD392AE6E5D800E5836A /* Release */, 339 | ); 340 | defaultConfigurationIsVisible = 0; 341 | defaultConfigurationName = Release; 342 | }; 343 | /* End XCConfigurationList section */ 344 | }; 345 | rootObject = C965BD202AE6E5D700E5836A /* Project object */; 346 | } 347 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/StockMacOSApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/StockMacOSApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/StockMacOSApp.xcodeproj/xcshareddata/xcschemes/StockMacOSApp.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 42 | 44 | 50 | 51 | 52 | 53 | 59 | 61 | 67 | 68 | 69 | 70 | 72 | 73 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/TargetsUseXCConfigFiles.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/TargetsUseXCConfigFiles.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/UnsortedGroups.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 56; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C965BD2C2AE6E5D700E5836A /* StockMacOSAppApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */; }; 11 | C965BD2E2AE6E5D700E5836A /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C965BD2D2AE6E5D700E5836A /* ContentView.swift */; }; 12 | C965BD302AE6E5D800E5836A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C965BD2F2AE6E5D800E5836A /* Assets.xcassets */; }; 13 | C965BD332AE6E5D800E5836A /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXFileReference section */ 17 | C965BD282AE6E5D700E5836A /* .app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = .app; sourceTree = BUILT_PRODUCTS_DIR; }; 18 | C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StockMacOSAppApp.swift; sourceTree = ""; }; 19 | C965BD2D2AE6E5D700E5836A /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 20 | C965BD2F2AE6E5D800E5836A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 21 | C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 22 | C965BD342AE6E5D800E5836A /* StockMacOSApp.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = StockMacOSApp.entitlements; sourceTree = ""; }; 23 | /* End PBXFileReference section */ 24 | 25 | /* Begin PBXFrameworksBuildPhase section */ 26 | C965BD252AE6E5D700E5836A /* Frameworks */ = { 27 | isa = PBXFrameworksBuildPhase; 28 | buildActionMask = 2147483647; 29 | files = ( 30 | ); 31 | runOnlyForDeploymentPostprocessing = 0; 32 | }; 33 | /* End PBXFrameworksBuildPhase section */ 34 | 35 | /* Begin PBXGroup section */ 36 | C965BD1F2AE6E5D700E5836A = { 37 | isa = PBXGroup; 38 | children = ( 39 | C965BD2A2AE6E5D700E5836A /* StockMacOSApp */, 40 | C965BD292AE6E5D700E5836A /* Products */, 41 | ); 42 | sourceTree = ""; 43 | }; 44 | C965BD292AE6E5D700E5836A /* Products */ = { 45 | isa = PBXGroup; 46 | children = ( 47 | C965BD282AE6E5D700E5836A /* .app */, 48 | ); 49 | name = Products; 50 | sourceTree = ""; 51 | }; 52 | C965BD2A2AE6E5D700E5836A /* StockMacOSApp */ = { 53 | isa = PBXGroup; 54 | children = ( 55 | C965BD2B2AE6E5D700E5836A /* StockMacOSAppApp.swift */, 56 | C965BD2D2AE6E5D700E5836A /* ContentView.swift */, 57 | C965BD2F2AE6E5D800E5836A /* Assets.xcassets */, 58 | C965BD342AE6E5D800E5836A /* StockMacOSApp.entitlements */, 59 | C965BD312AE6E5D800E5836A /* Preview Content */, 60 | ); 61 | path = StockMacOSApp; 62 | sourceTree = ""; 63 | }; 64 | C965BD312AE6E5D800E5836A /* Preview Content */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | C965BD322AE6E5D800E5836A /* Preview Assets.xcassets */, 68 | ); 69 | path = "Preview Content"; 70 | sourceTree = ""; 71 | }; 72 | /* End PBXGroup section */ 73 | 74 | /* Begin PBXNativeTarget section */ 75 | C965BD272AE6E5D700E5836A /* StockMacOSApp */ = { 76 | isa = PBXNativeTarget; 77 | buildConfigurationList = C965BD372AE6E5D800E5836A /* Build configuration list for PBXNativeTarget "StockMacOSApp" */; 78 | buildPhases = ( 79 | C965BD242AE6E5D700E5836A /* Sources */, 80 | C965BD252AE6E5D700E5836A /* Frameworks */, 81 | C965BD262AE6E5D700E5836A /* Resources */, 82 | ); 83 | buildRules = ( 84 | ); 85 | dependencies = ( 86 | ); 87 | name = StockMacOSApp; 88 | productName = StockMacOSApp; 89 | productReference = C965BD282AE6E5D700E5836A /* .app */; 90 | productType = "com.apple.product-type.application"; 91 | }; 92 | /* End PBXNativeTarget section */ 93 | 94 | /* Begin PBXProject section */ 95 | C965BD202AE6E5D700E5836A /* Project object */ = { 96 | isa = PBXProject; 97 | attributes = { 98 | BuildIndependentTargetsInParallel = 1; 99 | LastSwiftUpdateCheck = 1510; 100 | LastUpgradeCheck = 1510; 101 | TargetAttributes = { 102 | C965BD272AE6E5D700E5836A = { 103 | CreatedOnToolsVersion = 15.1; 104 | }; 105 | }; 106 | }; 107 | buildConfigurationList = C965BD232AE6E5D700E5836A /* Build configuration list for PBXProject "BulidSettingsRemoved" */; 108 | compatibilityVersion = "Xcode 14.0"; 109 | developmentRegion = en; 110 | hasScannedForEncodings = 0; 111 | knownRegions = ( 112 | en, 113 | Base, 114 | ); 115 | mainGroup = C965BD1F2AE6E5D700E5836A; 116 | productRefGroup = C965BD292AE6E5D700E5836A /* Products */; 117 | projectDirPath = ""; 118 | projectRoot = ""; 119 | targets = ( 120 | C965BD272AE6E5D700E5836A /* StockMacOSApp */, 121 | ); 122 | }; 123 | /* End PBXProject section */ 124 | 125 | /* Begin PBXResourcesBuildPhase section */ 126 | C965BD262AE6E5D700E5836A /* Resources */ = { 127 | isa = PBXResourcesBuildPhase; 128 | buildActionMask = 2147483647; 129 | files = ( 130 | C965BD332AE6E5D800E5836A /* Preview Assets.xcassets in Resources */, 131 | C965BD302AE6E5D800E5836A /* Assets.xcassets in Resources */, 132 | ); 133 | runOnlyForDeploymentPostprocessing = 0; 134 | }; 135 | /* End PBXResourcesBuildPhase section */ 136 | 137 | /* Begin PBXSourcesBuildPhase section */ 138 | C965BD242AE6E5D700E5836A /* Sources */ = { 139 | isa = PBXSourcesBuildPhase; 140 | buildActionMask = 2147483647; 141 | files = ( 142 | C965BD2E2AE6E5D700E5836A /* ContentView.swift in Sources */, 143 | C965BD2C2AE6E5D700E5836A /* StockMacOSAppApp.swift in Sources */, 144 | ); 145 | runOnlyForDeploymentPostprocessing = 0; 146 | }; 147 | /* End PBXSourcesBuildPhase section */ 148 | 149 | /* Begin XCBuildConfiguration section */ 150 | C965BD352AE6E5D800E5836A /* Debug */ = { 151 | isa = XCBuildConfiguration; 152 | buildSettings = { 153 | }; 154 | name = Debug; 155 | }; 156 | C965BD362AE6E5D800E5836A /* Release */ = { 157 | isa = XCBuildConfiguration; 158 | buildSettings = { 159 | }; 160 | name = Release; 161 | }; 162 | C965BD382AE6E5D800E5836A /* Debug */ = { 163 | isa = XCBuildConfiguration; 164 | buildSettings = { 165 | }; 166 | name = Debug; 167 | }; 168 | C965BD392AE6E5D800E5836A /* Release */ = { 169 | isa = XCBuildConfiguration; 170 | buildSettings = { 171 | }; 172 | name = Release; 173 | }; 174 | /* End XCBuildConfiguration section */ 175 | 176 | /* Begin XCConfigurationList section */ 177 | C965BD232AE6E5D700E5836A /* Build configuration list for PBXProject "BulidSettingsRemoved" */ = { 178 | isa = XCConfigurationList; 179 | buildConfigurations = ( 180 | C965BD352AE6E5D800E5836A /* Debug */, 181 | C965BD362AE6E5D800E5836A /* Release */, 182 | ); 183 | defaultConfigurationIsVisible = 0; 184 | defaultConfigurationName = Release; 185 | }; 186 | C965BD372AE6E5D800E5836A /* Build configuration list for PBXNativeTarget "StockMacOSApp" */ = { 187 | isa = XCConfigurationList; 188 | buildConfigurations = ( 189 | C965BD382AE6E5D800E5836A /* Debug */, 190 | C965BD392AE6E5D800E5836A /* Release */, 191 | ); 192 | defaultConfigurationIsVisible = 0; 193 | defaultConfigurationName = Release; 194 | }; 195 | /* End XCConfigurationList section */ 196 | }; 197 | rootObject = C965BD202AE6E5D700E5836A /* Project object */; 198 | } 199 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/UnsortedGroups.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/UnsortedGroups.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/XCConfFile-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_SEARCH_USER_PATHS = NO 2 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/XCConfFile-Release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_SEARCH_USER_PATHS = YES 2 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/XCConfFileTarget-Release.xcconfig: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/XCConfigFiles.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Tests/XCLintTests/TestData/XCConfigFiles.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Tests/XCLintTests/ValidateBuildSettingsRuleTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | @testable import XCLinting 4 | import XcodeProj 5 | 6 | final class ValidateBuildSettingsRuleTests: XCTestCase { 7 | func testProjectWithNoInvalidBuildSettings() throws { 8 | let url = try Bundle.module.testDataURL(named: "StockMacOSApp.xcodeproj") 9 | 10 | let project = try XcodeProj(pathString: url.path) 11 | 12 | let env = XCLinter.Environment( 13 | project: project, 14 | projectRootURL: url, 15 | configuration: Configuration() 16 | ) 17 | 18 | let violations = try ValidateBuildSettingsRule().run(env) 19 | 20 | XCTAssertEqual(violations, []) 21 | } 22 | 23 | func testProjectWithInvalidBuildSettings() throws { 24 | // This has ALWAYS_SEARCH_USER_PATHS set to YES at the project level 25 | let url = try Bundle.module.testDataURL(named: "InvalidEmbeddedBuildSettings.xcodeproj") 26 | 27 | let project = try XcodeProj(pathString: url.path) 28 | 29 | let env = XCLinter.Environment( 30 | project: project, 31 | projectRootURL: url, 32 | configuration: Configuration() 33 | ) 34 | 35 | let violations = try ValidateBuildSettingsRule().run(env) 36 | 37 | XCTAssertFalse(violations.isEmpty) 38 | } 39 | 40 | func testInvalidSettingsInXCConfigFile() throws { 41 | let url = try Bundle.module.testDataURL(named: "XCConfigFiles.xcodeproj") 42 | 43 | let project = try XcodeProj(pathString: url.path) 44 | 45 | let env = XCLinter.Environment( 46 | project: project, 47 | projectRootURL: url, 48 | configuration: Configuration() 49 | ) 50 | 51 | let violations = try ValidateBuildSettingsRule().run(env) 52 | 53 | XCTAssertFalse(violations.isEmpty) 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Tests/XCLintTests/XCLinterTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import XCLinting 3 | 4 | final class XCLinterTests: XCTestCase { 5 | 6 | func testEmptyProjectPathThrowsError() throws { 7 | do { 8 | _ = try XCLinter(projectPath: "", configuration: Configuration()) 9 | XCTFail() 10 | } catch XCLintError.noProjectFileSpecified { 11 | } catch { 12 | XCTFail("wrong error: \(error)") 13 | } 14 | } 15 | 16 | 17 | func testMissingProjectFileThrowsError() throws { 18 | do { 19 | _ = try XCLinter(projectPath: "/dev/null", configuration: Configuration()) 20 | XCTFail() 21 | } catch { 22 | } 23 | } 24 | } 25 | --------------------------------------------------------------------------------