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

Add config option to override editor command #84

Merged
merged 9 commits into from
Mar 16, 2025
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update tests and workflows
thomasschafer committed Mar 16, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit e4f5e1d729dae4b479a408f81fdab2884cd2363c
1 change: 0 additions & 1 deletion .github/workflows/check-readme.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Check README
# TODO(editor): test this workflow

on:
push:
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -26,10 +26,10 @@ jobs:
uses: Swatinem/rust-cache@v2

- name: Check formatting
run: cargo fmt --check
run: cargo fmt --all --check

- name: Run clippy
run: cargo clippy -- -D warnings
- name: Run clippy on all packages
run: cargo clippy --workspace -- -D warnings

test:
name: Test (${{ matrix.os }})
@@ -49,8 +49,8 @@ jobs:
- name: Rust cache
uses: Swatinem/rust-cache@v2

- name: Build
run: cargo build --verbose
- name: Build all packages
run: cargo build --workspace --verbose

- name: Run tests
run: cargo test --verbose
- name: Run all tests
run: cargo test --workspace --verbose
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -205,8 +205,6 @@ vim.keymap.set("n", "<leader>s", "<cmd>lua _scooter_toggle()<CR>", {
})
```

This can of course be tweaked to your liking.


## Contributing

10 changes: 6 additions & 4 deletions xtask/src/readme.rs
Original file line number Diff line number Diff line change
@@ -293,13 +293,15 @@ mod tests {
let config_file = Path::new("src").join("fixtures").join("config.txt");
let readme_file = Path::new("src").join("fixtures").join("readme.txt");

let initial_content = fs::read_to_string(readme_file).unwrap();
let initial_content = fs::read_to_string(&readme_file).unwrap();

let content = generate_contents_table(&initial_content);
let content = generate_config_docs(&content, &config_file).unwrap();
let content = generate_config_docs(&content, &config_file)
.unwrap()
.replace("\r\n", "\n");

let expected = include_str!("fixtures/expected_readme.txt");
let expected = include_str!("fixtures/expected_readme.txt").replace("\r\n", "\n");

pretty_assert_eq!(&content, expected);
pretty_assert_eq!(&content, &expected);
}
}