Skip to content

Commit 2219d74

Browse files
CI: Lint all Markdown files in the project (#14937)
Adds globs and ignore rules. This allows as to lint Markdown files locally by running as simple as: $ markdownlint-cli2 or automatically fix issues with $ markdownlint-cli2 --fix
1 parent 0055f2f commit 2219d74

7 files changed

Lines changed: 77 additions & 73 deletions

File tree

.github/workflows/ci-markdown.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ on:
88
branches:
99
- "main"
1010
paths:
11-
- "lib/**/*.md"
11+
- "**/*.md"
1212
pull_request:
1313
paths:
14-
- "lib/**/*.md"
14+
- "**/*.md"
1515
workflow_dispatch:
1616

1717
permissions:
@@ -34,7 +34,3 @@ jobs:
3434

3535
- name: Run markdownlint
3636
uses: DavidAnson/markdownlint-cli2-action@30a0e04f1870d58f8d717450cc6134995f993c63 # v21.0.0
37-
with:
38-
globs: |
39-
lib/elixir/pages/**/*.md
40-
README.md

.markdownlint-cli2.jsonc

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
// SPDX-FileCopyrightText: 2021 The Elixir Team
3+
{
4+
"globs": [
5+
"**/*.md"
6+
],
7+
"ignores": [
8+
".git/**"
9+
],
10+
"gitignore": true,
11+
"config": {
12+
// Consecutive header levels (h1 -> h2 -> h3).
13+
"MD001": false,
14+
// Header style. We use #s.
15+
"MD003": {
16+
"style": "atx"
17+
},
18+
// Style of unordered lists..
19+
"MD007": {
20+
"indent": 2,
21+
"start_indented": true
22+
},
23+
// Line length. Who cares.
24+
"MD013": false,
25+
// This warns if you have "console" or "shell" code blocks with a dollar sign $ that
26+
// don't show output. We use those a lot, so this is fine for us.
27+
"MD014": false,
28+
// Multiple headings with the same content. That's fine.
29+
"MD024": false,
30+
// Some headers finish with ! because it refers to a function name
31+
"MD026": false,
32+
// Allow empty line between block quotes. Used by contiguous admonition blocks.
33+
"MD028": false,
34+
// Allowed HTML inline elements.
35+
"MD033": {
36+
"allowed_elements": [
37+
"h1",
38+
"a",
39+
"br",
40+
"img",
41+
"picture",
42+
"source",
43+
"noscript",
44+
"p",
45+
"script"
46+
]
47+
},
48+
// This warns if you have spaces in code blocks. Sometimes, that's fine.
49+
"MD038": false,
50+
// Code block style. We don't care if it's fenced or indented.
51+
"MD046": false,
52+
// Our tables are too large to align.
53+
"MD060": false
54+
}
55+
}

.markdownlint.jsonc

Lines changed: 0 additions & 47 deletions
This file was deleted.

CODE_OF_CONDUCT.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# Code of Conduct
88

9-
Contact: elixir-lang-conduct@googlegroups.com
9+
Contact: <elixir-lang-conduct@googlegroups.com>
1010

1111
## Why have a Code of Conduct?
1212

@@ -51,15 +51,15 @@ If you participate in or contribute to the Elixir ecosystem in any way, you are
5151

5252
Explicit enforcement of the Code of Conduct applies to the official mediums operated by the Elixir project:
5353

54-
* The [official GitHub projects][1] and code reviews.
55-
* The official elixir-lang mailing lists.
56-
* The **[#elixir][2]** IRC channel on [Libera.Chat][3].
54+
* The [official GitHub projects][1] and code reviews.
55+
* The official elixir-lang mailing lists.
56+
* The **[#elixir][2]** IRC channel on [Libera.Chat][3].
5757

5858
Other Elixir activities (such as conferences, meetups, and unofficial forums) are encouraged to adopt this Code of Conduct. Such groups must provide their own contact information.
5959

6060
Project maintainers may block, remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct.
6161

62-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by emailing: elixir-lang-conduct@googlegroups.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. **All reports will be kept confidential**.
62+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by emailing: <elixir-lang-conduct@googlegroups.com>. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. **All reports will be kept confidential**.
6363

6464
**The goal of the Code of Conduct is to resolve conflicts in the most harmonious way possible**. We hope that in most cases issues may be resolved through polite discussion and mutual agreement. Bannings and other forceful measures are to be employed only as a last resort. **Do not** post about the issue publicly or try to rally sentiment against a particular individual or group.
6565

CONTRIBUTING.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -121,30 +121,30 @@ Please review our [Open Source Policy](OPEN_SOURCE_POLICY.md) for complete
121121
guidelines on licensing and compliance. Below is a summary of the key points
122122
affecting **all external contributors**:
123123

124-
- Accepted Licenses: Any code contributed must be licensed under the
124+
* Accepted Licenses: Any code contributed must be licensed under the
125125
`Apache-2.0` license.
126-
- SPDX License Headers: With the exception of approved test fixture files,
126+
* SPDX License Headers: With the exception of approved test fixture files,
127127
all new or modified files in a pull request must include correct SPDX
128128
headers. If you are creating a new file under the `Apache-2.0` license, for
129129
instance, please use:
130-
130+
131131
```elixir
132132
# SPDX-License-Identifier: Apache-2.0
133133
# SPDX-FileCopyrightText: 2021 The Elixir Team
134134
```
135-
136-
- No Executable Binaries: Contributions must **not** include any executable
135+
136+
* No Executable Binaries: Contributions must **not** include any executable
137137
binary files. If you require an exception (for example, certain test artifacts),
138138
please see the policy on how to request approval and document exceptions.
139-
- Preserving Copyright and License Info: If you copy code from elsewhere,
139+
* Preserving Copyright and License Info: If you copy code from elsewhere,
140140
ensure that **all original copyright and license notices remain intact**. If
141141
they are missing or incomplete, you must add them.
142-
- Failure to Comply: Pull requests that do not meet these licensing and
142+
* Failure to Comply: Pull requests that do not meet these licensing and
143143
compliance standards will be rejected or require modifications before merging.
144-
- Developer Certificate of Origin: All contributions are subject to the
144+
* Developer Certificate of Origin: All contributions are subject to the
145145
Developer Certificate of Origin.
146146

147-
```
147+
```text
148148
By making a contribution to this project, I certify that:
149149
150150
(a) The contribution was created in whole or in part by me and I
@@ -171,7 +171,7 @@ affecting **all external contributors**:
171171
involved.
172172
```
173173

174-
See http://developercertificate.org/ for a copy of the Developer Certificate
174+
See <http://developercertificate.org/> for a copy of the Developer Certificate
175175
of Origin license.
176176

177177
## Building documentation

OPEN_SOURCE_POLICY.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ensuring that Elixir remains a trusted and innovative open source project.
2020
## 2. Scope
2121

2222
This policy applies to the Elixir Programming language, located at
23-
https://github.com/elixir-lang/elixir. It covers every file, and contribution
23+
<https://github.com/elixir-lang/elixir>. It covers every file, and contribution
2424
made, including documentation and any associated assets.
2525

2626
## 3. Licensing
@@ -29,9 +29,9 @@ All code released by the Elixir team is licensed under the
2929
[Apache-2.0](./LICENSES/Apache-2.0.txt) license. Additionally, the following
3030
licenses are recognized as permissible in this project:
3131

32-
- The Unicode license, as documented at
32+
- The Unicode license, as documented at
3333
[LicenseRef-scancode-unicode](./LICENSES/LicenseRef-scancode-unicode.txt)
34-
- The Elixir Trademark Policy, as documented at
34+
- The Elixir Trademark Policy, as documented at
3535
[LicenseRef-elixir-trademark-policy](./LICENSES/LicenseRef-elixir-trademark-policy.txt)
3636

3737
These licenses are considered acceptable for any files or code that form part of
@@ -161,4 +161,4 @@ necessary, by the EEF CISO. Any significant changes will be communicated to
161161
contributors and made publicly available.
162162

163163
*Effective Date: 2025-02-20*
164-
*Last Reviewed: 2025-11-20*
164+
*Last Reviewed: 2025-11-20*

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Elixir version | Support
2121

2222
## Announcements
2323

24-
New releases are announced in the read-only [announcements mailing list](https://groups.google.com/group/elixir-lang-ann). You can subscribe by sending an email to elixir-lang-ann+subscribe@googlegroups.com and replying to the confirmation email. Security notifications [will be tagged with `[security]`](https://groups.google.com/forum/#!searchin/elixir-lang-ann/%5Bsecurity%5D%7Csort:date).
24+
New releases are announced in the read-only [announcements mailing list](https://groups.google.com/group/elixir-lang-ann). You can subscribe by sending an email to <elixir-lang-ann+subscribe@googlegroups.com> and replying to the confirmation email. Security notifications [will be tagged with `[security]`](https://groups.google.com/forum/#!searchin/elixir-lang-ann/%5Bsecurity%5D%7Csort:date).
2525

2626
You may also see [all releases](https://github.com/elixir-lang/elixir/releases) and [consult all disclosed vulnerabilities](https://github.com/elixir-lang/elixir/security) on GitHub.
2727

0 commit comments

Comments
 (0)