Rules.md

February 6, 2022 ยท View on GitHub

CustomClassNameRule

identifiercustom_class_name
Default Rulefalse

Custom class name of ViewController in storyboard should be same as file name.

RelativeToMarginRule

identifierrelative_to_margin
Default Rulefalse

Forbid to use relative to margin option.

MisplacedViewRule

identifiermisplaced
Default Rulefalse

Display error when views are misplaced.

ForceToEnableAutoLayoutRule

identifierenable_autolayout
Default Ruletrue

Force to use useAutolayout option

DuplicateConstraintRule

identifierduplicate_constraint
Default Ruletrue

Display warning when view has duplicated constraint.

DuplicateIDRule

identifierduplicate_id
Default Ruletrue

Display warning when elements use same id.

StoryboardViewControllerId

identifierstoryboard_viewcontroller_id
Default Rulefalse

Check that Storyboard ID same as ViewController class name.

StackViewBackgroundColorRule

identifierstackview_backgroundcolor
Default Rulefalse

Force background color of stackview to be default.

ImageResourcesRule

identifierimage_resources
Default Rulefalse

Check if image resources are valid.

CustomModuleRule

identifiercustom_module
Default Ruletrue

Check if custom class match custom module by custom_module_rule config.

UseBaseClassRule

identifieruse_base_class
Default Rulefalse

Check if custom class is in base classes by use_base_class_rule config.

AmbiguousViewRule

identifierambiguous
Default Ruletrue

Display error when views are ambiguous.

ViewAsDeviceRule

identifierview_as_device
Default Rulefalse

Check View as: set as a device specified by view_as_device_rule config.

ReuseIdentifierRule

identifierreuse_identifier
Default Rulefalse

Check that ReuseIdentifier same as class name.

ColorResourcesRule

identifiercolor_resources
Default Rulefalse

Check if named color resources are valid.

UseTraitCollectionsRule

identifieruse_trait_collections
Default Rulefalse

Check if a document useTraitCollections is enabled or disabled

HidesBottomBarConfigRule

identifierhides_bottom_bar
Default Rulefalse

Check if ViewController's hidesBottomBarWhenPushed is enabled