Move documentation-related rules into its own group

This commit is contained in:
Sijawusz Pur Rahnama 2023-11-08 18:31:12 +01:00
parent 0c6745781e
commit 8569355b5a
7 changed files with 12 additions and 10 deletions

View file

@ -1,4 +1,4 @@
Lint/DocumentationAdmonition:
Documentation/DocumentationAdmonition:
Timezone: UTC
Admonitions: [FIXME, BUG]

View file

@ -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

View file

@ -1,6 +1,6 @@
require "../../../spec_helper"
module Ameba::Rule::Lint
module Ameba::Rule::Documentation
subject = DocumentationAdmonition.new
describe DocumentationAdmonition do

View file

@ -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)

View file

@ -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

View file

@ -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

View file

@ -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