Workflows: Lint docs for upstream API link
Description
Added a new CI job and make target make lint-custom
to run a shell script that performs miscellaneous additional linter automation that can't fit into an existing lint framework.
Added one custom linter that greps the generated documentation and outputs an error for any pages that are missing a link to upstream GitLab documentation.
The linter script uses the ::error command in order to annotate the PR files with the error message.
Here's what the errors look like in a PR:
PR Checklist Acknowledgement
-
I acknowledge that all of the following items are true, where applicable: - Resource attributes match 1:1 the names and structure of the API resource in the GitLab API documentation.
-
Examples are updated with:
- A *.tf file for the resource/s with at least one usage example
- A *.sh file for the resource/s with an import example (if applicable)
- New resources have at minimum a basic test with three steps:
- Create the resource
- Update the attributes
- Import the resource
- No new
//lintignore
comments were copied from existing code. (Linter rules are meant to be enforced on new code.)