You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Contributors will sometimes misplace topics. For example, they'll place a resourcePageType topic in the api folder, rather than the resources folder. This breaks links, and API Doctor reports the broken links but omits the root cause, which is the misplaced file.
Describe the solution you'd like
I would like API Doctor to produce a named error for this condition. (All apiPageType topics belong in the /api/ folders, resourcePageType topics belong in /resources/, and so on.) We would want a MisplacedFileError to be reported. This would probably be based on a mapping file, something like:
Describe alternatives you've considered
The alternative is to squint at the file like a sun-stroked pirate, never trust any error message, and eventually turn to drink.
Additional context
This presumes there are predictable locations for these things. Overviews tend to pop up everywhere, so maybe the list of locations could contain a "*" value. We would probably have to report an "UnknownPageType" with a file, line number, and column, for "creative" doc_type attribute values, too. (That is, if we don't already do the equivalent.)
It might also be good to report duplicates when one of the files is misplaced. This exact thing happened in the PR that spawned this feature request. The resource topic was added both in the correct location and in the /api/ folder.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Contributors will sometimes misplace topics. For example, they'll place a resourcePageType topic in the
api
folder, rather than theresources
folder. This breaks links, and API Doctor reports the broken links but omits the root cause, which is the misplaced file.Describe the solution you'd like
I would like API Doctor to produce a named error for this condition. (All
apiPageType
topics belong in the/api/
folders,resourcePageType
topics belong in/resources/
, and so on.) We would want aMisplacedFileError
to be reported. This would probably be based on a mapping file, something like:Describe alternatives you've considered
The alternative is to squint at the file like a sun-stroked pirate, never trust any error message, and eventually turn to drink.
Additional context
This presumes there are predictable locations for these things. Overviews tend to pop up everywhere, so maybe the list of locations could contain a
"*"
value. We would probably have to report an "UnknownPageType" with a file, line number, and column, for "creative"doc_type
attribute values, too. (That is, if we don't already do the equivalent.)It might also be good to report duplicates when one of the files is misplaced. This exact thing happened in the PR that spawned this feature request. The resource topic was added both in the correct location and in the
/api/
folder.The text was updated successfully, but these errors were encountered: