mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Implement Documentation
rule on top of the ScopeVisitor
This commit is contained in:
parent
4c740f394a
commit
4d8346509e
2 changed files with 31 additions and 45 deletions
|
@ -4,15 +4,21 @@ module Ameba::Rule::Lint
|
|||
subject = Documentation.new
|
||||
.tap(&.ignore_classes = false)
|
||||
.tap(&.ignore_modules = false)
|
||||
.tap(&.ignore_enums = false)
|
||||
.tap(&.ignore_defs = false)
|
||||
.tap(&.ignore_macros = false)
|
||||
|
||||
describe Documentation do
|
||||
it "passes for undocumented private types" do
|
||||
expect_no_issues subject, <<-CRYSTAL
|
||||
private class Foo
|
||||
def foo
|
||||
end
|
||||
end
|
||||
|
||||
private module Bar
|
||||
def bar
|
||||
end
|
||||
end
|
||||
|
||||
private enum Baz
|
||||
|
@ -30,10 +36,16 @@ module Ameba::Rule::Lint
|
|||
expect_no_issues subject, <<-CRYSTAL
|
||||
# Foo
|
||||
class Foo
|
||||
# foo
|
||||
def foo
|
||||
end
|
||||
end
|
||||
|
||||
# Bar
|
||||
module Bar
|
||||
# bar
|
||||
def bar
|
||||
end
|
||||
end
|
||||
|
||||
# Baz
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue