lsegal / yard

YARD is a Ruby Documentation tool. The Y stands for "Yay!"
http://yardoc.org
MIT License
1.95k stars 398 forks source link

load project-specific configuration as well as user-specific #1469

Open ccutrer opened 2 years ago

ccutrer commented 2 years ago

so that you can configure a plugin per-project

Completed Tasks

ccutrer commented 1 year ago

Ooh yay, YARD isn't abandoned!

I'm a little surprised at the pushback to the assumption that "project dir" == .. Isn't this how everything else in YARD works, right down to a .yardopts file? Is it even possible to run YARD anywhere except for from the project root? But that's okay... given a .yardopts file, I think it's reasonable to just add an explicit option to specify an explicit config dir.

That said, this is one of my bigger PRs, and it's been a while since I've worked on it. I have several others - most of them I have not even sent as PRs, since I just started pointing my project at my own fork of YARD. If the others go well, I'll start sending more PR, and then consider putting in the time addressing the comments on this one.

lsegal commented 1 year ago

I'm a little surprised at the pushback to the assumption that "project dir" == .

The issue isn't the assumption / default behavior, it's the lack of configurability. It's fine to assume the default, but YARD supports configuration of all of the other values, up to and including where the .yardopts file lives, where the .yardoc cache lives, and where any outputs go. The main issue here is that this PR has no such escape hatch / configuration.

ccutrer commented 1 year ago

I'm a little surprised at the pushback to the assumption that "project dir" == .

The issue isn't the assumption / default behavior, it's the lack of configurability. It's fine to assume the default, but YARD supports configuration of all of the other values, up to and including where the .yardopts file lives, where the .yardoc cache lives, and where any outputs go. The main issue here is that this PR has no such escape hatch / configuration.

👍 ah okay, that makes more sense. I'll probably just re-implement as a switch to change the config dir, making sure that switch will be applied if it's in a yardopts file. That will be sufficient for my needs.