Skip to content

Commit f109549

Browse files
authored
Delete length check (#1952)
It's super annoying to be forced to use this bad convention, and apparently everyone agrees. The only reason no improvements have been done is because those were blocked on writing a better checker. I strongly believe that no checker is better than a bad checker, so let's just delete it in the meantime. I kindly asked anyone who sees this to complain about overly long sentences in review in the future, I think we can make this turn out fine.
1 parent 35e77b8 commit f109549

File tree

4 files changed

+3
-71
lines changed

4 files changed

+3
-71
lines changed

.github/workflows/ci.yml

-6
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,6 @@ jobs:
4242
~/book/linkcheck
4343
key: ${{ runner.os }}-${{ hashFiles('./book/linkcheck') }}
4444

45-
- name: Check line lengths
46-
if: github.event_name != 'push'
47-
run: |
48-
shopt -s globstar
49-
MAX_LINE_LENGTH=100 bash ci/lengthcheck.sh src/**/*.md
50-
5145
- name: Install latest nightly Rust toolchain
5246
if: steps.mdbook-cache.outputs.cache-hit != 'true'
5347
run: |

README.md

-19
Original file line numberDiff line numberDiff line change
@@ -64,25 +64,6 @@ We use `mdbook-linkcheck` to validate URLs included in our documentation.
6464
We use `mdbook-toc` to auto-generate TOCs for long sections. You can invoke the preprocessor by
6565
including the `<!-- toc -->` marker at the place where you want the TOC.
6666

67-
### Pre-commit script
68-
69-
We also test that line lengths are less than 100 columns. To test this locally,
70-
you can run `ci/lengthcheck.sh`.
71-
72-
You can also set this to run automatically.
73-
74-
On Linux:
75-
76-
```bash
77-
ln -s ../../ci/lengthcheck.sh .git/hooks/pre-commit
78-
```
79-
80-
On Windows:
81-
82-
```powershell
83-
New-Item -Path .git/hooks/pre-commit -ItemType HardLink -Value $(Resolve-Path ci/lengthcheck.sh)
84-
```
85-
8667
## How to fix toolstate failures
8768

8869
> **NOTE**: Currently, we do not track the rustc-dev-guide toolstate due to

ci/lengthcheck.sh

-43
This file was deleted.

src/contributing.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,9 @@ There are issues for beginners and advanced compiler devs alike!
316316

317317
Just a few things to keep in mind:
318318

319-
- Please limit line length to 100 characters.
320-
This is enforced by CI,
321-
and you can run the checks locally with `ci/lengthcheck.sh`.
319+
- Please try to avoid overly long lines and use semantic line breaks (so break the line after a sentence).
320+
There is no strict limit on line lengths, let the sentence or part of the sentence flow to its proper end on the same line.
321+
There is currently nothing stopping anyone from creating overly long lines, just do your best to avoid them.
322322

323323
- When contributing text to the guide, please contextualize the information with some time period
324324
and/or a reason so that the reader knows how much to trust or mistrust the information.

0 commit comments

Comments
 (0)