ansible-community / github-docs-build

GitHub actions and workflows for building Ansible collection documentation.
GNU General Public License v3.0
10 stars 6 forks source link

Add linting to the build action #46

Open briantist opened 2 years ago

briantist commented 2 years ago

My original prototypes before this repository used the antsibull-docs lint-collection-docs command.

I think it got lost when I converted everything to actions/workflows, and for the most part, it was fine because if the docs didn't build, that would be your signal there was a problem :)

However, today I ran into an issue where the entire RST file I added was being ignored. So there was nothing in the output to indicate why, just errors from other pages that tried to reference the new ones.

Finally I ran lint and figured out the issue, and this is a great reminder why that command is still needed!

Failing workflow: https://github.com/ansible-collections/community.hashi_vault/runs/6249903735?check_suite_focus=true

This page did work in a previous workflow, so clearly something I added to the page made it fail, but I could not figure it out from build output alone.

Lint showed me the issue: I added some labels without the right prefix:

../../docs/docsite/rst/migration_hashi_vault_lookup.rst:216:0: Label "kv_response" does not start with expected prefix "ansible_collections.community.hashi_vault.docsite."
../../docs/docsite/rst/migration_hashi_vault_lookup.rst:287:0: Label "kv_replacements" does not start with expected prefix "ansible_collections.community.hashi_vault.docsite."