class SpecPlatformDirectoryRule
- SpecPlatformDirectoryRule
- ConventionRule
- Reference
- Object
Overview
Rule: every spec file lives in spec/web/, spec/native_macos/, spec/native_ios/, OR spec/native_android/. The only allowed root spec file is spec/spec_helper.cr.
Defined in:
lsp_rules/family_5_partial/spec_platform_directory_rule.crConstant Summary
-
ALLOWED_DIRS =
["spec/web/", "spec/native_macos/", "spec/native_ios/", "spec/native_android/"] -
ALLOWED_ROOT_FILES =
["spec/spec_helper.cr"] -
RULE_NAME =
"family_5_partial/spec_platform_directory"
Instance Method Summary
-
#check(file_path : String, content : String) : Array(Diagnostic)
contentis provided by the runner for parity with other rules (Family 1 reads content). - #rule_name : String
Instance methods inherited from class ConventionRule
check(file_path : String, content : String) : Array(Diagnostic)
check,
configure(config : ConventionConfig) : Nil
configure,
find_line(content : String, pattern : Regex) : Int32 | Nil
find_line,
rule_name : String
rule_name,
snake_case(identifier : String) : String
snake_case
Class methods inherited from class ConventionRule
registered_rules : Array(ConventionRule.class)
registered_rules
Instance Method Detail
def check(file_path : String, content : String) : Array(Diagnostic)
#
content is provided by the runner for parity with other rules
(Family 1 reads content). This rule is path-based only, so content
is ignored.