diff --git a/.ameba.yml b/.ameba.yml index 4c4f9838..e9816260 100644 --- a/.ameba.yml +++ b/.ameba.yml @@ -1,4 +1,4 @@ -Lint/DocumentationAdmonition: +Documentation/DocumentationAdmonition: Timezone: UTC Admonitions: [FIXME, BUG] diff --git a/spec/ameba/base_spec.cr b/spec/ameba/base_spec.cr index e643a558..d3afb5c8 100644 --- a/spec/ameba/base_spec.cr +++ b/spec/ameba/base_spec.cr @@ -12,6 +12,7 @@ module Ameba::Rule it "contains rules across all the available groups" do Rule.rules.map(&.group_name).uniq!.reject!(&.empty?).sort.should eq %w( Ameba + Documentation Layout Lint Metrics diff --git a/spec/ameba/rule/lint/documentation_admonition_spec.cr b/spec/ameba/rule/documentation/documentation_admonition_spec.cr similarity index 99% rename from spec/ameba/rule/lint/documentation_admonition_spec.cr rename to spec/ameba/rule/documentation/documentation_admonition_spec.cr index e07d0613..b4c9e405 100644 --- a/spec/ameba/rule/lint/documentation_admonition_spec.cr +++ b/spec/ameba/rule/documentation/documentation_admonition_spec.cr @@ -1,6 +1,6 @@ require "../../../spec_helper" -module Ameba::Rule::Lint +module Ameba::Rule::Documentation subject = DocumentationAdmonition.new describe DocumentationAdmonition do diff --git a/spec/ameba/rule/lint/documentation_spec.cr b/spec/ameba/rule/documentation/documentation_spec.cr similarity index 98% rename from spec/ameba/rule/lint/documentation_spec.cr rename to spec/ameba/rule/documentation/documentation_spec.cr index 442b1444..0d1b485b 100644 --- a/spec/ameba/rule/lint/documentation_spec.cr +++ b/spec/ameba/rule/documentation/documentation_spec.cr @@ -1,6 +1,6 @@ require "../../../spec_helper" -module Ameba::Rule::Lint +module Ameba::Rule::Documentation subject = Documentation.new .tap(&.ignore_classes = false) .tap(&.ignore_modules = false) diff --git a/src/ameba/config.cr b/src/ameba/config.cr index 5030740c..b6e1d3a5 100644 --- a/src/ameba/config.cr +++ b/src/ameba/config.cr @@ -326,9 +326,10 @@ class Ameba::Config macro included GROUP_SEVERITY = { - Lint: Ameba::Severity::Warning, - Metrics: Ameba::Severity::Warning, - Performance: Ameba::Severity::Warning, + Documentation: Ameba::Severity::Warning, + Lint: Ameba::Severity::Warning, + Metrics: Ameba::Severity::Warning, + Performance: Ameba::Severity::Warning, } class_getter default_severity : Ameba::Severity do diff --git a/src/ameba/rule/lint/documentation.cr b/src/ameba/rule/documentation/documentation.cr similarity index 96% rename from src/ameba/rule/lint/documentation.cr rename to src/ameba/rule/documentation/documentation.cr index f08a2a0f..45cbfc36 100644 --- a/src/ameba/rule/lint/documentation.cr +++ b/src/ameba/rule/documentation/documentation.cr @@ -1,11 +1,11 @@ -module Ameba::Rule::Lint +module Ameba::Rule::Documentation # A rule that enforces documentation for public types: # modules, classes, enums, methods and macros. # # YAML configuration example: # # ``` - # Lint/Documentation: + # Documentation/Documentation: # Enabled: true # IgnoreClasses: false # IgnoreModules: true diff --git a/src/ameba/rule/lint/documentation_admonition.cr b/src/ameba/rule/documentation/documentation_admonition.cr similarity index 97% rename from src/ameba/rule/lint/documentation_admonition.cr rename to src/ameba/rule/documentation/documentation_admonition.cr index 726c9616..75547750 100644 --- a/src/ameba/rule/lint/documentation_admonition.cr +++ b/src/ameba/rule/documentation/documentation_admonition.cr @@ -1,4 +1,4 @@ -module Ameba::Rule::Lint +module Ameba::Rule::Documentation # A rule that reports documentation admonitions. # # Optionally, these can fail at an appropriate time. @@ -27,7 +27,7 @@ module Ameba::Rule::Lint # YAML configuration example: # # ``` - # Lint/DocumentationAdmonition: + # Documentation/DocumentationAdmonition: # Enabled: true # Admonitions: [TODO, FIXME, BUG] # Timezone: UTC