Skip to content

Commit

Permalink
Delete length check (#1952)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Noratrieb authored Mar 30, 2024
1 parent 35e77b8 commit f109549
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 71 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ jobs:
~/book/linkcheck
key: ${{ runner.os }}-${{ hashFiles('./book/linkcheck') }}

- name: Check line lengths
if: github.event_name != 'push'
run: |
shopt -s globstar
MAX_LINE_LENGTH=100 bash ci/lengthcheck.sh src/**/*.md
- name: Install latest nightly Rust toolchain
if: steps.mdbook-cache.outputs.cache-hit != 'true'
run: |
Expand Down
19 changes: 0 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,25 +64,6 @@ We use `mdbook-linkcheck` to validate URLs included in our documentation.
We use `mdbook-toc` to auto-generate TOCs for long sections. You can invoke the preprocessor by
including the `<!-- toc -->` marker at the place where you want the TOC.

### Pre-commit script

We also test that line lengths are less than 100 columns. To test this locally,
you can run `ci/lengthcheck.sh`.

You can also set this to run automatically.

On Linux:

```bash
ln -s ../../ci/lengthcheck.sh .git/hooks/pre-commit
```

On Windows:

```powershell
New-Item -Path .git/hooks/pre-commit -ItemType HardLink -Value $(Resolve-Path ci/lengthcheck.sh)
```

## How to fix toolstate failures

> **NOTE**: Currently, we do not track the rustc-dev-guide toolstate due to
Expand Down
43 changes: 0 additions & 43 deletions ci/lengthcheck.sh

This file was deleted.

6 changes: 3 additions & 3 deletions src/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,9 @@ There are issues for beginners and advanced compiler devs alike!

Just a few things to keep in mind:

- Please limit line length to 100 characters.
This is enforced by CI,
and you can run the checks locally with `ci/lengthcheck.sh`.
- Please try to avoid overly long lines and use semantic line breaks (so break the line after a sentence).
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.
There is currently nothing stopping anyone from creating overly long lines, just do your best to avoid them.

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

0 comments on commit f109549

Please sign in to comment.