JamitLabs / ProjLint

Project Linter to enforce your non-code best practices.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New Rule: Xcode Project Navigator

Jeehut opened this issue · comments

A rule that allows to specify how the project navigator structure should look like. This will allow to check the existence and order of folders and files. Also it can be used to specify that a specific folders contents or even entire substructure should be sorted by name or type or both. An example configuration could look something like this:

- rules:
  - xcode_project_navigator:
      project: {{project_name}}.xcodeproj
      sorted: true
      inner_group_order:
        - [interfaces, code_files] # Storyboards & XIB files, Code are mixed & sorted together
        - assets
        - strings
        - others
        - folders
      structure:
        - App:
            - Sources:
                - AppDelegate.swift
                - Globals:
                    - Extensions
            - Resources:
                - Colors.xcassets
                - Images.xcassets
                - Localizable.strings
                - Fonts
            - SuportingFiles:
                - LaunchScreen.storyboard
                - Info.plist
            - Generated:
                - SwiftGen
        - Tests:
            - Sources:
            - Resources:
            - SupportingFiles:
                - Info.plist
        - UITests:
            - Sources:
            - Resources:
            - SupportingFiles:
                - Info.plist
        - Extensions:
        - RootFiles:
            - beak.swift
            - .projlint.yml
            - .swiftlint.yml
            - Cartfile
            - Cartfile.ignore
            - Cartfile.private
            - Cartfile.resolved
            - SwiftGen-Colors.stencil
        - Frameworks:
            - Carthage:
                - App
                - Tests
            - Local:
                - App
                - Tests
        - Products