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
8 changes: 6 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Install Rust
run: |
rustup set profile minimal
rustup toolchain install nightly -c rust-docs
rustup toolchain install nightly -c rust-docs,rustfmt
rustup default nightly
- name: Install mdbook
run: |
Expand All @@ -44,7 +44,11 @@ jobs:
- name: Run tests
run: mdbook test
- name: Style checks
run: (cd style-check && cargo run -- ../src)
working-directory: style-check
run: cargo run -- ../src
- name: Style fmt
working-directory: style-check
run: cargo fmt --check
- name: Check for broken links
run: |
curl -sSLo linkcheck.sh \
Expand Down
6 changes: 5 additions & 1 deletion style-check/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ fn check_directory(dir: &Path, bad: &mut bool) -> Result<(), Box<dyn Error>> {
style_error!(bad, path, "em-dash not allowed, use three dashes like ---");
}
if contents.contains('\u{a0}') {
style_error!(bad, path, "don't use 0xa0 no-break-space, use &nbsp; instead");
style_error!(
bad,
path,
"don't use 0xa0 no-break-space, use &nbsp; instead"
);
}
for line in contents.lines() {
if line.ends_with(' ') {
Expand Down