[MULTIPLE_DEFAULT_TAGS] Investigate rule to determine intent and align implementation
- Dominant language
- TypeScript
- Stars
- 23
- Forks
- 22
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 13
Description
I believe the current implementation of `getAllDefaultTags()` is incorrect:
https://github.com/Azure/avocado/blob/8ced07235393d8b3c55b21e820d9b7b115e060de/src/index.ts#L175-L186
1. find all code blocks
2. filter to those under **markdown heading** "Basic Information"
3. load code block as YAML, **without** checking if `lang=="yaml"`
4. if parsed YAML contains `tag`, add to list of default tags
Steps 2 and 3 are bugs. Correct:
1. find all code blocks
2. filter to those where `lang.trim().toLowerCase() === "yaml"`
- excludes code blocks with non-default conditions like `yaml $(tag) == 'foo'` or `yaml $(foo)`
3. load code block as YAML
4. if parsed YAML contains `tag`, add to list of default tags
## Impacted PRs
- https://github.com/Azure/azure-rest-api-specs/pull/32822
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.