mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Move documentation-related rules into its own group
This commit is contained in:
parent
0c6745781e
commit
8569355b5a
7 changed files with 12 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
|||
Lint/DocumentationAdmonition:
|
||||
Documentation/DocumentationAdmonition:
|
||||
Timezone: UTC
|
||||
Admonitions: [FIXME, BUG]
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require "../../../spec_helper"
|
||||
|
||||
module Ameba::Rule::Lint
|
||||
module Ameba::Rule::Documentation
|
||||
subject = DocumentationAdmonition.new
|
||||
|
||||
describe DocumentationAdmonition do
|
|
@ -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)
|
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -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
|
Loading…
Reference in a new issue