Skip to content
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

Add verify-docs job #3672

Merged
merged 3 commits into from
Nov 3, 2023
Merged

Add verify-docs job #3672

merged 3 commits into from
Nov 3, 2023

Conversation

geyslan
Copy link
Member

@geyslan geyslan commented Nov 3, 2023

1. Explain what the PR does

fdee7e0 chore(ci): add verify-docs job

2. Explain how to test it

3. Other comments

@geyslan
Copy link
Member Author

geyslan commented Nov 3, 2023

It seems to work, the commit triggered the error:

image


Without changes to the related flags documentation files, nothing is done:

image

@geyslan
Copy link
Member Author

geyslan commented Nov 3, 2023

Cancelled jobs since the one related to this PR passed: https://github.com/aquasecurity/tracee/pull/3672/checks

man_files=$(echo "${{ steps.changed-files.outputs.man_files_all_changed_files }}" | xargs -n 1 basename | sed 's/\.1$//')

missing_updates=()
for base_name in $md_files; do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script assumes that for every .1.md file, there is a corresponding .1 file that needs to be updated, and vice versa. If this is not strict (like a new file added), the script may raise false positives, no ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well observed. I need to change it to any_modified in the if and to all_modified_files in the assignments. Going to, hold on.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated Makefile to ensure that any change (addition, modification, deletion) in the .md will reflect in the man pages.

Copy link
Member Author

@geyslan geyslan Nov 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

This error should be ignored, as it was a remnant caused precisely by the lack of checking (checking introduced by this PR).

To ensure that 'make man' will be 1:1 to the source .md files, clean
man path and rebuild all man pages.
Copy link
Contributor

@rafaeldtinoco rafaeldtinoco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@geyslan geyslan merged commit 3e57f9d into aquasecurity:main Nov 3, 2023
9 of 30 checks passed
@geyslan geyslan deleted the verify-docs-job branch November 28, 2023 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants