SwiftQuality
Common configuration files for SwiftLint and SwiftFormat
Install / Use
/learn @yonat/SwiftQualityREADME
SwiftQuality
Common configuration files for SwiftLint and SwiftFormat.
Installation
CocoaPods:
pod 'SwiftQuality', :git => 'https://github.com/yonat/SwiftQuality'
target `MyApp` do
script_phase :name => 'SwiftFormat',
:execution_position => :before_compile,
:script => 'if [[ "Debug" == "${CONFIGURATION}" && ! $ENABLE_PREVIEWS == "YES" ]]; then "${PODS_ROOT}/SwiftFormat/CommandLineTool/swiftformat" --swiftversion ${SWIFT_VERSION} --config "${PODS_ROOT}/SwiftQuality/.swiftformat" "${SRCROOT}" ; fi'
script_phase :name => 'SwiftLintAutocorrect',
:execution_position => :before_compile,
:script => 'if [[ "Debug" == "${CONFIGURATION}" && ! $ENABLE_PREVIEWS == "YES" ]]; then "${PODS_ROOT}/SwiftLint/swiftlint" --fix --config "${PODS_ROOT}/SwiftQuality/.swiftlint.yml" "${SRCROOT}" ; fi'
script_phase :name => 'SwiftLint',
:execution_position => :after_compile,
:script => 'if [ "Debug" == "${CONFIGURATION}" && ! $ENABLE_PREVIEWS == "YES" ]; then "${PODS_ROOT}/SwiftLint/swiftlint" --config "${PODS_ROOT}/SwiftQuality/.swiftlint.yml" "${SRCROOT}" ; fi'
end
end
# Fix Xcode 14 warnings "Run script build phase '[CP] _____' will be run during every build because it does not specify any outputs."
# Based on https://github.com/CocoaPods/CocoaPods/issues/11444#issuecomment-1300023416
post_integrate do |installer|
main_project = installer.aggregate_targets[0].user_project
main_project.targets.each do |target|
target.build_phases.each do |phase|
next unless phase.is_a?(Xcodeproj::Project::Object::PBXShellScriptBuildPhase)
next unless phase.name.start_with?("[CP")
next unless (phase.input_paths || []).empty? && (phase.output_paths || []).empty?
phase.always_out_of_date = "1"
end
end
main_project.save
end
Meta
Related Skills
node-connect
354.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
112.3kCreate 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
354.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
354.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
