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
|
Timezone: UTC
|
||||||
Admonitions: [FIXME, BUG]
|
Admonitions: [FIXME, BUG]
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ module Ameba::Rule
|
||||||
it "contains rules across all the available groups" do
|
it "contains rules across all the available groups" do
|
||||||
Rule.rules.map(&.group_name).uniq!.reject!(&.empty?).sort.should eq %w(
|
Rule.rules.map(&.group_name).uniq!.reject!(&.empty?).sort.should eq %w(
|
||||||
Ameba
|
Ameba
|
||||||
|
Documentation
|
||||||
Layout
|
Layout
|
||||||
Lint
|
Lint
|
||||||
Metrics
|
Metrics
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
require "../../../spec_helper"
|
require "../../../spec_helper"
|
||||||
|
|
||||||
module Ameba::Rule::Lint
|
module Ameba::Rule::Documentation
|
||||||
subject = DocumentationAdmonition.new
|
subject = DocumentationAdmonition.new
|
||||||
|
|
||||||
describe DocumentationAdmonition do
|
describe DocumentationAdmonition do
|
|
@ -1,6 +1,6 @@
|
||||||
require "../../../spec_helper"
|
require "../../../spec_helper"
|
||||||
|
|
||||||
module Ameba::Rule::Lint
|
module Ameba::Rule::Documentation
|
||||||
subject = Documentation.new
|
subject = Documentation.new
|
||||||
.tap(&.ignore_classes = false)
|
.tap(&.ignore_classes = false)
|
||||||
.tap(&.ignore_modules = false)
|
.tap(&.ignore_modules = false)
|
|
@ -326,9 +326,10 @@ class Ameba::Config
|
||||||
|
|
||||||
macro included
|
macro included
|
||||||
GROUP_SEVERITY = {
|
GROUP_SEVERITY = {
|
||||||
Lint: Ameba::Severity::Warning,
|
Documentation: Ameba::Severity::Warning,
|
||||||
Metrics: Ameba::Severity::Warning,
|
Lint: Ameba::Severity::Warning,
|
||||||
Performance: Ameba::Severity::Warning,
|
Metrics: Ameba::Severity::Warning,
|
||||||
|
Performance: Ameba::Severity::Warning,
|
||||||
}
|
}
|
||||||
|
|
||||||
class_getter default_severity : Ameba::Severity do
|
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:
|
# A rule that enforces documentation for public types:
|
||||||
# modules, classes, enums, methods and macros.
|
# modules, classes, enums, methods and macros.
|
||||||
#
|
#
|
||||||
# YAML configuration example:
|
# YAML configuration example:
|
||||||
#
|
#
|
||||||
# ```
|
# ```
|
||||||
# Lint/Documentation:
|
# Documentation/Documentation:
|
||||||
# Enabled: true
|
# Enabled: true
|
||||||
# IgnoreClasses: false
|
# IgnoreClasses: false
|
||||||
# IgnoreModules: true
|
# IgnoreModules: true
|
|
@ -1,4 +1,4 @@
|
||||||
module Ameba::Rule::Lint
|
module Ameba::Rule::Documentation
|
||||||
# A rule that reports documentation admonitions.
|
# A rule that reports documentation admonitions.
|
||||||
#
|
#
|
||||||
# Optionally, these can fail at an appropriate time.
|
# Optionally, these can fail at an appropriate time.
|
||||||
|
@ -27,7 +27,7 @@ module Ameba::Rule::Lint
|
||||||
# YAML configuration example:
|
# YAML configuration example:
|
||||||
#
|
#
|
||||||
# ```
|
# ```
|
||||||
# Lint/DocumentationAdmonition:
|
# Documentation/DocumentationAdmonition:
|
||||||
# Enabled: true
|
# Enabled: true
|
||||||
# Admonitions: [TODO, FIXME, BUG]
|
# Admonitions: [TODO, FIXME, BUG]
|
||||||
# Timezone: UTC
|
# Timezone: UTC
|
Loading…
Reference in a new issue