An Xcode plug-in to format your code using SwiftLint.

Related tags

Tools SwiftLintXcode
Overview

SwiftLintXcode

An Xcode plug-in to format your code using SwiftLint.

Runs swiftlint autocorrect --path CURRENT_FILE before *.swift file is saved.

Screenshot

IMPORTANT: Xcode 8 Installation

Xcode 8 won't load any unsigned plugins without resigning Xcode itself. https://github.com/alcatraz/Alcatraz/issues/475

See XVim's nice and simple installation doc to resign it..! (NOTE: AT YOUR OWN SECURITY RISK) https://github.com/XVimProject/XVim/blob/3167408ade82cfef87acc704822da61af69688f8/INSTALL_Xcode8.md

INSTALLATION

Install via Alcatraz, a package manager for Xcode.

This plugin does not bundle swiftlint binary. Please ensure swiftlint is on PATH.

brew update && brew install swiftlint

Manual installation

git clone https://github.com/ypresto/SwiftLintXcode
cd SwiftLintXcode
# Build and install.
xcodebuild -configuration Release

To uninstall, just remove plug-in directory.

rm -rf "$HOME/Library/Application Support/Developer/Shared/Xcode/Plug-ins/SwiftLintXcode.xcplugin"

THANKS

This plug-in contains TRVSXcode from ClangFormat-Xcode to interact with Xcode internal interface.

ClangFormat-Xcode is awesome plugin for auto-formatting Objective-C code..!

LICENSE

The MIT License (MIT)

Copyright (c) 2016 Yuya Tanaka <https://github.com/ypresto>

(For TRVSXcode from ClangFormat-Xcode)
Copyright (c) 2014 Travis Jeffery <https://travisjeffery.com, https://twitter.com/travisjeffery, https://github.com/travisjeffery>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Comments
  • Read from .swiftlint.yml when autocorrecting

    Read from .swiftlint.yml when autocorrecting

    SwiftLintXcode does not respect the rules defined in a project's .swiftlint.yml file. Perhaps provide the ability to optionally specify the path to the config file?

    opened by blau2 4
  • Swift 3.0 not supported with Xcode 11

    Swift 3.0 not supported with Xcode 11

    When building, I get error: SWIFT_VERSION '3.0' is unsupported, supported versions are: 4.0, 4.2, 5.0. (in target 'SwiftLintXcode' from project 'SwiftLintXcode')

    opened by michaeleisel 5
  • SwiftLint failing build with missing product_type

    SwiftLint failing build with missing product_type

    SwiftLint causes the build of an iOS project to fail with the attached error message. Setup:

    Xcode 10.3
    MacOS Mojave
    Carthage Builds
    XCode project generated using xcodegen
    

    The thing is: i cant seem to interpret this message. I am missing something obvious, but i cant guess what.

    Does anyone know what exact SwiftLint is referring here to?

    Thx in advance.

    🌱  Failed to read Package.swift file:
    Couldn't decode package dump:
    keyNotFound(CodingKeys(stringValue: "product_type", intValue: nil), Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "products", intValue: nil), _JSONKey(stringValue: "Index 0", intValue: 0)], debugDescription: "No value associated with key CodingKeys(stringValue: \"product_type\", intValue: nil) (\"product_type\").", underlyingError: nil))
    Command PhaseScriptExecution failed with a nonzero exit code
    
    opened by flowinhoBSCH 2
  • Convert to Extension

    Convert to Extension

    I'm probably not understanding, but extensions which format correction such as Swiftmat exist in Xcode 8. Could this be converted from a plugin to an extension and work in 8 without resigning Xcode?

    opened by Juice805 1
  • DVTPlugInCompatibilityUUIDs Error on XCode 8

    DVTPlugInCompatibilityUUIDs Error on XCode 8

    I resigned my XCode 8, then ran

    git clone https://github.com/ypresto/SwiftLintXcode
    cd SwiftLintXcode
    # Build and install.
    xcodebuild -configuration Release
    

    It returns an error:

    2017-01-15 04:19:39.496 xcodebuild[1328:19000] [MT] PluginLoading: Required plug-in compatibility UUID E0A62D1F-3C18-4D74-BFE5-A4167D643966 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/SwiftLintXcode.xcplugin' not present in DVTPlugInCompatibilityUUIDs
    

    What's the problem?

    opened by James2516 0
Owner
Yuya Tanaka
Full remote Software Engineer / UI Designer. ex- codetakt, ex- freelance, ex- mixi, Inc.
Yuya Tanaka
SwiftGen is a tool to automatically generate Swift code for resources of your projects

SwiftGen SwiftGen is a tool to automatically generate Swift code for resources of your projects (like images, localised strings, etc), to make them ty

null 8.3k Jan 5, 2023
Automatically build and rebuild Xcode image catalogs for app icons, universal images, and more

Better asset workflow for iOS developers. Generate Xcode image catalogs for iOS / OSX app icons, universal images, and more.

Dotan J. Nahum 822 Dec 21, 2022
Xcode storyboards diff and merge tool.

StoryboardMerge Storyboard diff and merge tool which: compares and merges two storyboard files, provides an automatic merge-facility, The storyboardin

null 238 Sep 12, 2022
Xcode .appiconset generator for Adobe Illustrator.

Creating AppIcon sets from Adobe Illustrator This repo is rewrited from original repo https://github.com/CaryChamplin/CreatingIconsFromAI. Just genera

gitmerge 73 Nov 9, 2020
A git plugin for real-world xcode versioning workflow.

git-xcp The most simplest, safe, and fully automatic git plugin for versioning workflow of real-world xcode projects. Current working or draft content

gitmerge 11 Dec 29, 2019
An Xcode Plugin to convert Objective-C to Swift

XCSwiftr Convert Objective-C code into Swift from within Xcode. This plugin uses the Java applet of objc2swift to do the conversion. Noticed that the

Ignacio Romero Zurbuchen 338 Nov 29, 2022
Xcode-compatible build tool.

xcbuild xcbuild is an Xcode-compatible build tool with the goal of providing faster builds, better documentation of the build process and running on m

Meta Archive 2k Dec 11, 2022
An executable that can be called from a Run Script Build Phase that makes comments such as // TODO: or // SERIOUS: appear in Xcode's Issue Navigator giving them project-wide visibility.

XcodeIssueGenerator An executable that can be called from a Run Script Build Phase that makes comments such as // TODO: or // SERIOUS: appear in Xcode

Wunderman Thompson Apps 143 Oct 11, 2022
This repository contains rules for Bazel that can be used to generate Xcode projects

rules_xcodeproj This repository contains rules for Bazel that can be used to generate Xcode projects. If you run into any problems with these rules, p

BuildBuddy 233 Dec 28, 2022
Shows your current framerate (fps) in the status bar of your iOS app

WatchdogInspector Shows your current framerate (fps) in the status bar of your iOS app Be a good citizen! Don't block your main thread! WatchdogInspec

Christian Menschel 510 Nov 24, 2022
Objective-c code Apple style documentation set generator.

About appledoc IMPORTANT NOTICE: collaborators needed appledoc is command line tool that helps Objective-C developers generate Apple-like source code

tomaz 4.2k Dec 20, 2022
Laurine - Localization code generator written in Swift. Sweet!

Author's note: Thanks everyone for making Laurine the TOP trending Swift repository in the world - this is amazing and very heart-warming! But this is

Jiri Trecak 1.3k Dec 28, 2022
AVXCAssets Generator takes path for your assets images and creates appiconset and imageset for you in just one click

AVXCAssets Generator Often while developing an app, We ran into a condition when we need to scale images to each and every aspect ratios for icons and

Angel Vasa 339 Dec 6, 2022
All new design. Inspect your iOS application at runtime.

Peek: All new design Peek 5 with an all new design and all new features. Whether you're a developer, designer or QA/tester, Peek can help you at all s

Shaps 2.6k Dec 17, 2022
An iOS app decrypter, full static using fouldecrypt.

Iridium An iOS app decrypter, full static using fouldecrypt. Supporting iOS 13+ Note We have built everything into the package, you can install and fl

Lakr Aream 234 Jan 9, 2023
An iOS app decrypter, full static using fouldecrypt.

Iridium An iOS app decrypter, full static using fouldecrypt. Supporting iOS 13+ Note We have built everything into the package, you can install and fl

Lakr Aream 226 Dec 24, 2022
An Xcode formatter plug-in to format your swift code.

Swimat Swimat is an Xcode plug-in to format your Swift code. Preview Installation There are three way to install. Install via homebrew-cask # Homebrew

Jintin 1.6k Jan 7, 2023
null 13 Oct 28, 2022
SwiftLint Plugin for Xcode.

SwiftLint Xcode Plugin Demo Usage Set SwiftLint Path default: Default path is /usr/local/bin/swiftlint relative: Relative path with the current projec

null 18 Jul 23, 2022
Swift Package Manager plug-in to compile Metal files that can be debugged in Xcode Metal Debugger.

MetalCompilerPlugin Swift Package Manager plug-in to compile Metal files that can be debugged in Xcode Metal Debugger. Description Swift Package Manag

Jonathan Wight 10 Oct 30, 2022