Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete length check #1952

Merged
merged 1 commit into from
Mar 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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