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

libcurl option manpages consistency cleanup #7656

Closed
wants to merge 4 commits into from

Conversation

bagder
Copy link
Member

@bagder bagder commented Sep 1, 2021

All man pages for libcurl options now need to:

  1. feature an example
  2. feature eight mandatory sections (extra sections are fine)
  3. feature those mandatory sections in the correct order

Failure to comply makes test 1173 error.

docs/libcurl/opts/CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 Outdated Show resolved Hide resolved
docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.3 Show resolved Hide resolved
docs/libcurl/opts/CURLOPT_PROGRESSDATA.3 Outdated Show resolved Hide resolved
docs/libcurl/opts/CURLOPT_PROXY_SSL_OPTIONS.3 Show resolved Hide resolved
docs/libcurl/opts/CURLOPT_XFERINFODATA.3 Outdated Show resolved Hide resolved
docs/libcurl/opts/CURLOPT_XFERINFOFUNCTION.3 Outdated Show resolved Hide resolved
@ghost
Copy link

ghost commented Sep 1, 2021

Congratulations 🎉. DeepCode analyzed your code in 0.658 seconds and we found no issues. Enjoy a moment of no bugs ☀️.

👉 View analysis in DeepCode’s Dashboard | Configure the bot

👉 The DeepCode service and API will be deprecated in August, 2021. Here is the information how to migrate. Thank you for using DeepCode 🙏 ❤️ !

If you are using our plugins, you might be interested in their successors: Snyk's JetBrains plugin and Snyk's VS Code plugin.

@danielgustafsson
Copy link
Member

danielgustafsson commented Sep 1, 2021 via email

Copy link
Member

@danielgustafsson danielgustafsson left a comment

Choose a reason for hiding this comment

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

Whats in here looks good to me now, unless there are plans to expand it I think this is ready.

tests/manpage-syntax.pl Outdated Show resolved Hide resolved
@bagder
Copy link
Member Author

bagder commented Sep 1, 2021

This is enough for this PR, no expansion planned. I'll just need to make sure all builds work properly with this.

@bagder

This comment has been minimized.

@bagder
Copy link
Member Author

bagder commented Sep 2, 2021

Right, that’s exactly what I was thinking of, including the relevant CURL_AT_LEAST_VERSION(); snippet ready to be copy/pasted into code. That being said, it might be a tad repetitive and not really worth it since it’s so simple to use.

It is also the problem of build-time vs run-time. Using CURL_AT_LEAST_VERSION() will certainly make your program build with older libcurls but for cases where you build your program with a new libcurl and run it with an old, you need other checks so the CURL_AT_LEAST_VERSION() won't be enough so it would be very important to not mislead the user into believing so. I'm not sure how to best do that!

@danielgustafsson
Copy link
Member

danielgustafsson commented Sep 2, 2021 via email

Extended manpage-syntax.pl (run by test 1173) to check that every man
page for a libcurl option has an EXAMPLE section that is more than two
lines. Then fixed all errors it found and added examples.
In every libcurl option man page there are now 8 mandatory sections that
must use the right name in the correct order and test 1173 verifies
this. Only 14 man pages needed adjustments.

The sections and the order is as follows:

 - NAME
 - SYNOPSIS
 - DESCRIPTION
 - PROTOCOLS
 - EXAMPLE
 - AVAILABILITY
 - RETURN VALUE
 - SEE ALSO
... that they refer to actual existing libcurl options.
@bagder bagder closed this in 1731a77 Sep 4, 2021
bagder added a commit that referenced this pull request Sep 4, 2021
In every libcurl option man page there are now 8 mandatory sections that
must use the right name in the correct order and test 1173 verifies
this. Only 14 man pages needed adjustments.

The sections and the order is as follows:

 - NAME
 - SYNOPSIS
 - DESCRIPTION
 - PROTOCOLS
 - EXAMPLE
 - AVAILABILITY
 - RETURN VALUE
 - SEE ALSO

Reviewed-by: Daniel Gustafsson
Closes #7656
bagder added a commit that referenced this pull request Sep 4, 2021
... that they refer to actual existing libcurl options.

Reviewed-by: Daniel Gustafsson
Closes #7656
@bagder bagder deleted the bagder/opt-manpage-examples branch September 4, 2021 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants