Skip to content

Document current expectations for curl commands

Amy Qualls requested to merge aqualls-document-curl-examples into master

What does this MR do?

As part of researching long options vs short options for Git in Verbose git command line arguments in empty rep... (!122213 - merged), I realized:

  • We have already stated similar preferences for curl commands.
  • We run an error-level test for it in scripts/lint-doc.sh in lines 13-23.
  • Until Document non-Vale/markdownlint tests in lint-do... (!122359 - merged) landed, the existence of those tests in scripts/lint-doc.sh were not acknowledged anywhere in our docs
  • We've now documented the existence of the tests but have nothing in our style guide about our preference for long flags in curl commands.

In addition to acknowledging the existence of the long-flag rule we already enforce, I'm adding one more line that I think is common sense: an explanation of how to wrap long lines for legibility. Code blocks with long lines (looking at you, API curl commands) get left-right scrollbars, and the first part of most of the commands is the same. The parts that change are typically hidden behind the scrollbar. As I've been gradually cleaning up the ancient API pages for Source Code and Code Review, I've been adding in these line breaks.

Compare:

Routing over to Suzanne because this is a style guide thing, but nodding in @eread and @marcel.amirault's direction. They both did significant review of !122359 (merged) and will be unsurprised to see this merge request as a follow-up.

Related issues

Author's checklist

If you are a GitLab team member and only adding documentation, do not add any of the following labels:

  • ~"frontend"
  • ~"backend"
  • ~"type::bug"
  • ~"database"

These labels cause the MR to be added to code verification QA issues.

Reviewer's checklist

Documentation-related MRs should be reviewed by a Technical Writer for a non-blocking review, based on Documentation Guidelines and the Style Guide.

If you aren't sure which tech writer to ask, use roulette or ask in the #docs Slack channel.

  • If the content requires it, ensure the information is reviewed by a subject matter expert.
  • Technical writer review items:
    • Ensure docs metadata is present and up-to-date.
    • Ensure the appropriate labels are added to this MR.
    • Ensure a release milestone is set.
    • If relevant to this MR, ensure content topic type principles are in use, including:
      • The headings should be something you'd do a Google search for. Instead of Default behavior, say something like Default behavior when you close an issue.
      • The headings (other than the page title) should be active. Instead of Configuring GDK, say something like Configure GDK.
      • Any task steps should be written as a numbered list.
      • If the content still needs to be edited for topic types, you can create a follow-up issue with the docs-technical-debt label.
  • Review by assigned maintainer, who can always request/require the reviews above. Maintainer's review can occur before or after a technical writer review.

Merge request reports

Loading