linter: Add check for comma after "e.g." in md files.

Adds a linter rule for markdown files so that new cases of "e.g."
without a comma wont be introduced to user-facing documentation.

Fixes the remaining cases of "e.g." in markdown files that are not
followed by a comma.
This commit is contained in:
Lauryn Menard
2024-07-04 14:17:19 +02:00
committed by Tim Abbott
parent 6dfe063c91
commit 3410584094
5 changed files with 9 additions and 5 deletions

View File

@@ -66,7 +66,7 @@ organizers may take any action they deem appropriate, up to and including a
temporary ban or permanent expulsion from the community without warning (and
without refund in the case of a paid event).
If someone outside the development community (e.g. a user of the Zulip
If someone outside the development community (e.g., a user of the Zulip
software) engages in unacceptable behavior that affects someone in the
community, we still want to know. Even if we don't have direct control over
the violator, the community organizers can still support the people

View File

@@ -11,7 +11,7 @@ docs,pip
Of the files, only dev and prod have been used in the install
scripts directly. The rest are implicit dependencies.
Steps to update a lock file, e.g. to update ipython from 5.3.0 to latest version:
Steps to update a lock file, e.g., to update ipython from 5.3.0 to latest version:
0. Remove entry for `ipython==5.3.0` in dev.txt.
1. Run `./tools/update-locked-requirements`, which will generate new entries, pinned to the latest version.

View File

@@ -2,7 +2,7 @@ Generally, we prefer to use SVG assets when possible.
However, many websites where you might want to use a Zulip logo do not
support SVG files. If you need a Zulip logo asset in a different
format (E.g. a 512px height PNG), you can generate that from one of
format (e.g., a 512px height PNG), you can generate that from one of
the `.svg` files in this directory.
On Linux, you can generate a PNG of a given height using the following:

View File

@@ -66,7 +66,7 @@ listing all the droplets created during GCI.
[Tags](https://www.digitalocean.com/community/tutorials/how-to-tag-digitalocean-droplets)
may contain letters, numbers, colons, dashes, and underscores.
You'll need to run this from the Zulip development environment (e.g. in
You'll need to run this from the Zulip development environment (e.g., in
Vagrant).
The script will also stop if a droplet has already been created for the
@@ -130,7 +130,7 @@ so they are notified.
- Check "Monitoring", "IPv6", and "User data"
- Paste the contents of `tools/droplets/new-droplet-image` into the
text box which says `Enter user data here...`
- Name it e.g. `base-ubuntu-22-04.zulipdev.org`
- Name it e.g., `base-ubuntu-22-04.zulipdev.org`
1. Wait for the host to boot.
1. Wait for the host to complete provisioning and shut down; this will take
about 15 minutes.

View File

@@ -879,6 +879,10 @@ markdown_rules = RuleList(
"include_only": {"docs/"},
"description": "Don't link directly to line numbers",
},
{
"pattern": r"[eE]\.g\.[^,]",
"description": "Likely missing comma after 'e.g.'",
},
],
)