Skip to content

Yard types for certain config options like keep_files are incorrect #1079

@jaredcwhite

Description

@jaredcwhite

Bridgetown Version:
2.1.1

To Reproduce
When looking at the types provided by Yard for the Bridgetown configuration DSL, it says for include, exclude, and keep_files, you can pass an array of files as an argument. But that's not how they work, they return arrays that should be added to. In other words:

# Bad:
config.keep_files "file1"
config.keep_files ["file2", file3"]

# Good
config.keep_files << "file1"
["file2", "file3"].each { config.keep_files << it }

As an alternative to resolving the Yarn types, we could consider adding more advanced methods to the DSL so that the "bad" syntax above does work. This would require additional effort, as we'd want to continue supporting the current "good" syntax as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions