-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPN-1495] Require new custom team-name tag in public API documentation #128
[SPN-1495] Require new custom team-name tag in public API documentation #128
Conversation
Isn't this BambooHR specific? |
$hasDescription = $hasDescription ?: $this->hasDescription($arg); | ||
$hasTeamName = $hasTeamName ?: $this->hasTeamName($arg); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one approach would be to make the check prepared for a configuration. Basically, how would you write this code if you had to accept:
[
'required-attributes' => ['prefix' => 'x', 'name' => 'team-name']
]
And then that's hard coded in this check for now, but is possible to put in sa.json in the future?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That type of configurability is exactly what I have in mind. My specific issue is that I really don't like have hard coded "team-name" stuff in the open source application. It's not a standard attribute. But if I could specify custom attributes that I wanted to see in the config file, then I'd be fine with a check that could report when a required attribute was missing.
The one additional thing I"d say, is I'd kind of like the configurability to have a some kind of isolation between configs for various checks. One scenario I've considered , but I don't think I've ever folded in, is an "options" subkey under the "emit" object. The added value there is you could allow the other "emit" configs to make it so that a particular option is only passed for certain files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm approving with the caveat:
- this rule currently is specific to BambooHR
- the contract (the error being emitted) is not specific to BambooHR
- the path in the future to handle this won't change the error that is emitted, but will change how the rule is implemented.
- This could be built as a plugin, but the path forward there requires a lot of duplication.
No description provided.