SwiftLintAppCode
Provides highlighting of the SwiftLint errors in the AppCode
Install / Use
/learn @bealex/SwiftLintAppCodeREADME
SwiftLint for AppCode
This plugin shows errors and warnings from SwiftLint in JetBrains AppCode.
Screenshot:<br/> <img src="img/swiftlint.png" alt="Screenshot of the plugin showing a warning on a Swift file in AppCode"/>
Install
- Install
swiftlintbinary from https://github.com/realm/SwiftLint - Install plugin
- Open AppCode Preferences and go to Plugins.
- Click the Marketplace tab
- Enter "SwiftLint" in the search box
- Click Install
- Click OK
- Restart AppCode
- Set
swiftlintbinary path (per project setting, should be OK by default but who knows)- Open AppCode Preferences and go to Tools > SwiftLint.
- Update the "SwiftLint binary path" box
- <details><summary>Screenshot</summary> <img src="img/preferences.png" width="897" alt="SwiftLint settings in AppCode Preferences"/> </details>
- Enable inspection (per project setting)
- Open AppCode Preferences and go to Editor > Inspections.
- Check the box next to Swift > "SwiftLint (available for Code|Inspect Code)"
- <details><summary>Screenshot</summary> <img src="img/inspections.png" width="900" alt="Section Inspections of AppCode Preferences"/> </details>
Use
Lint errors appear in your code as red underlines, orange highlighting. This depends on severity.
How to configure the lint rules:
- Create a file called
.swiftlint.ymlin the root directory of your project. - Add rules configuration there. Consult the docs: https://github.com/realm/SwiftLint#rules
How to disable rules in code: https://github.com/realm/SwiftLint#disable-rules-in-code. There is an autocompletion for that. Just try autocompletion inside the comment.
Develop the Plugin
This is a DevKit plugin. And it is old, so be prepared.
You will need:
- JDK 11 (I use OpenJDK)
- IntelliJ Idea with "Plugin DevKit" plugin enabled
- These sources
- You will need to set up project SDK (as IntelliJ SDK) correctly:
- File -> Project Structure -> SDKs -> "+" button
- Add IntelliJ Platform Plugin SDK...
- Select "AppCode.app" (needed version)
- Now you need to add some plugins from AppCode so that code can compile. They all are inside
AppCode.app/contents/pluginsfolder. Add them onClasspathtab of SDK configuration page.- cidr-cocoa-plugin/lib/cidr-cocoa-plugin.jar
- c-plugin/lib/c-plugin.jar
- cidr-base-plugin/lib/cidr-base-plugin.jar
- swift-plugin/lib/swift-plugin.jar
- (You can also configure other things like Sourcepath and Documentation paths if you want, they are not requried)
- Select created SDK in "Project Structure -> Project -> SDK"
- Press OK button in Project Structure window
- After that plugin should compile and run.
- To pack it, you can use "Build/Prepare Plugin Module 'SwiftLint' For Deployment" menu. zip will appear in
.ideafolder, because it appears where .iml file is, and I put it into .idea folder.
Related Skills
node-connect
349.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
