Skip to content
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: 4 additions & 2 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ on:
- .github/workflows/pages.yml
workflow_dispatch:

# Builds run code from pull requests, so only the deploy job gets Pages write access.
permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages-${{ github.ref }}
Expand All @@ -55,6 +54,9 @@ jobs:
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
2 changes: 1 addition & 1 deletion website/src/content/docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ No. It is an unofficial community project, not affiliated with or endorsed by Go

## How do I remove it?

Delete `rustfmt.toml`, `clippy.toml`, `deny.toml`, `rust-toolchain.toml` and `AGENTS.md` (and a `CLAUDE.md` link if you made one), then remove the lint tables from `Cargo.toml`. The [quick start](/Google-Rust-Style-Guide/quick-start/#remove-the-kit) shows the exact commands.
Revert the commit that added it, or run the removal script in the [quick start](/Google-Rust-Style-Guide/quick-start/#remove-the-kit). The script deletes only config files that are still identical to the kit's versions, so your own files are never touched. Then remove the lint tables from `Cargo.toml`.

## How is the kit kept correct?

Expand Down
15 changes: 12 additions & 3 deletions website/src/content/docs/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,22 @@ jobs:

## Remove the kit

Changed your mind? Delete the five files and the lint tables:
Changed your mind? If you added the kit in its own commit, reverting that commit is the cleanest way out. Otherwise, run this from your project root. It only deletes files that are still identical to the kit's versions, so your own config files and any you edited are kept:

```sh title="Terminal"
rm rustfmt.toml clippy.toml deny.toml rust-toolchain.toml AGENTS.md CLAUDE.md
base=https://daniakash.github.io/Google-Rust-Style-Guide/files
for f in rustfmt.toml clippy.toml deny.toml rust-toolchain.toml AGENTS.md; do
if [ -f "$f" ] && curl -fsSL "$base/$f" | cmp -s - "$f"; then rm "$f"; echo "removed $f"
elif [ -e "$f" ]; then echo "kept $f (not the kit's version)"; fi
done
if [ -L CLAUDE.md ] && [ "$(readlink CLAUDE.md)" = AGENTS.md ] && [ ! -e AGENTS.md ]; then rm CLAUDE.md; fi
```

Then remove everything from the `# Google Rust Style Guide lints` comment to the end of your `Cargo.toml`, and the `[lints] workspace = true` lines from member crates.
Then finish by hand:

- In `Cargo.toml`, delete everything from the `# Google Rust Style Guide lints` comment to the end of the file, and remove `[lints] workspace = true` from member crates if you added it.
- If you pasted the kit's rules into an existing `AGENTS.md` instead of downloading it, delete that section.
- Files reported as "kept" are either yours or edited since you downloaded them. Remove them only if you are sure.

## Next steps

Expand Down
Loading