Disable trailing_comma on allRules collection (#183)
Disable SwiftLint trailing_comma rule
Add trailing common to allRules collection to avoid spurious differences in code review
Disable SwiftLint trailing_comma rule
Co-authored-by: Max Air Toto max_air_toto@toto.net
IBLinter
A linter tool to normalize
.xiband.storyboardfiles. Inspired by realm/SwiftLintInstallation
Using Homebrew
Using Mint
Using CocoaPods
This will download the IBLinter binaries and dependencies in
Pods/during your nextpod installexecution and will allow you to invoke it via${PODS_ROOT}/IBLinter/bin/iblinterin your Script Build Phases.Compiling from source
You can build from source by cloning this repository and running
iblinterwill be installed in/usr/local/bin.Usage
You can see all description by
iblinter --helpXcode
Add a
Run Script Phaseto integrate IBLinter with XcodeAlternatively, if you’ve installed IBLinter via CocoaPods the script should look like this:
Requirements
IBLinter requires Swift5.0 runtime. Please satisfy at least one of following requirements.
Swift 5 Runtime Support for Command Line Toolsfrom More Downloads for Apple DevelopersRules
All rules are documented in Rules.md
Pull requests are encouraged.
Configuration
You can configure IBLinter by adding a
.iblinter.ymlfile from project root directory.enabled_rulesdisabled_rulesexcludedincludedcustom_module_ruleuse_base_class_ruleview_as_device_ruleCustomModuleConfig
You can configure
custom_modulerule byCustomModuleConfiglist.moduleincluded*.swiftclasses of the module forcustom_modulelint.excluded*.swiftclasses of the module forcustom_modulelint.UseBaseClassConfig
You can configure
use_base_classrule byUseBaseClassConfiglist.element_classbase_classesNote: UseBaseClassRule does not work for classes that inherit base class. You need to add all classes to
base_classesto check.ViewAsDeviceConfig
You can configure
view_as_devicerule byViewAsDeviceConfig. If there are no config,device_idis set asretina4_7.device_idappx. Table of mapping device name to
device_id(onXcode 10.2)iPhone 4sretina3_5iPhone SEretina4_0iPhone 8retina4_7iPhone 8 Plusretina5_5iPhone XSretina5_9iPhone XRretina6_1iPhone XS Maxretina6_5UseTraitCollectionsConfig
You can configure
use_trait_collectionsrule byUseTraitCollectionsConfig. If there is no config then use_trait_collections is set to truetrueHidesBottomBarConfig
You can configure
hides_bottom_barrule byHidesBottomBarConfiglist.excluded_view_controllershides_bottom_barrule.