Module: Yard::Lint::Validators::Warnings::DuplicatedParameterName

Defined in:
lib/yard/lint/validators/warnings/duplicated_parameter_name.rb,
lib/yard/lint/validators/warnings/duplicated_parameter_name/config.rb,
lib/yard/lint/validators/warnings/duplicated_parameter_name/parser.rb,
lib/yard/lint/validators/warnings/duplicated_parameter_name/result.rb,
lib/yard/lint/validators/warnings/duplicated_parameter_name/validator.rb

Overview

DuplicatedParameterName validator

Detects duplicate @param tags for the same parameter name. If a parameter is documented multiple times, it's unclear which documentation is correct and can confuse both readers and YARD's parser. This validator is enabled by default.

Configuration

To disable this validator:

Warnings/DuplicatedParameterName:
  Enabled: false

Examples:

Bad - Duplicate @param tags

# @param name [String] the name
# @param name [Symbol] oops, documented again
def process(name)
end

Good - Each parameter documented once

# @param name [String] the name
# @param age [Integer] the age
def process(name, age)
end

Defined Under Namespace

Classes: Config, Parser, Result, Validator