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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
run: cargo fmt -- --check
- name: Clippy
if: matrix.os == 'ubuntu-latest'
run: cargo clippy --all-features --target ${{ matrix.rust-target }}
run: cargo clippy --all-features --target ${{ matrix.rust-target }} -- -D clippy::disallowed_methods

- name: Build test binary
run: cargo test --no-run --target ${{ matrix.rust-target }}
Expand Down
28 changes: 14 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ authors = [
edition = "2024"
license = "MIT OR Apache-2.0"
rust-version = "1.96.0"
version = "0.41.0"
version = "0.41.1"

[workspace.dependencies]
exercise-services-api = { git = "https://github.com/rage/secret-project-331.git", rev = "2c144ae4c4b0424479c8db049f1eb86391de85ae" }
Expand Down
13 changes: 13 additions & 0 deletions clippy.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
# The crates deny `clippy::unwrap_used`; unwrapping in a test is a fine way to fail it.
allow-unwrap-in-tests = true

# Entry names built from a `Path` get `\` separators on Windows, which other tools cannot read.
disallowed-methods = [
{ path = "zip::write::ZipWriter::start_file", reason = "use ArchiveBuilder, or tmc_langs_framework::entry_name for the name" },
{ path = "zip::write::ZipWriter::add_directory", reason = "use ArchiveBuilder, or tmc_langs_framework::entry_name for the name" },
{ path = "zip::write::ZipWriter::start_file_from_path", reason = "use ArchiveBuilder" },
{ path = "zip::write::ZipWriter::add_directory_from_path", reason = "use ArchiveBuilder" },
{ path = "tar::builder::Builder::append_dir", reason = "use ArchiveBuilder" },
{ path = "tar::builder::Builder::append_path_with_name", reason = "use ArchiveBuilder" },
{ path = "tar::builder::Builder::append_data", reason = "use ArchiveBuilder" },
{ path = "tar::builder::Builder::append_file", reason = "use ArchiveBuilder" },
{ path = "tar::builder::Builder::append_dir_all", reason = "use ArchiveBuilder" },
]
9 changes: 3 additions & 6 deletions crates/plugins/csharp/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,12 +425,9 @@ mod test {
.sort_by(|a, b| a.path().cmp(b.path()))
{
let entry = entry.unwrap();
let rela = entry
.path()
.strip_prefix(&source_dir)
.unwrap()
.to_str()
.unwrap();
let rela =
&tmc_langs_framework::entry_name(entry.path().strip_prefix(&source_dir).unwrap())
.unwrap();
if entry.path().is_dir() {
zip.add_directory(rela, SimpleFileOptions::default())
.unwrap();
Expand Down
9 changes: 3 additions & 6 deletions crates/plugins/java/src/ant_plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,12 +402,9 @@ mod test {
.sort_by(|a, b| a.path().cmp(b.path()))
{
let entry = entry.unwrap();
let rela = entry
.path()
.strip_prefix(&source_dir)
.unwrap()
.to_str()
.unwrap();
let rela =
&tmc_langs_framework::entry_name(entry.path().strip_prefix(&source_dir).unwrap())
.unwrap();
if entry.path().is_dir() {
zip.add_directory(rela, SimpleFileOptions::default())
.unwrap();
Expand Down
9 changes: 3 additions & 6 deletions crates/plugins/java/src/maven_plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -437,12 +437,9 @@ mod test {
.sort_by(|a, b| a.path().cmp(b.path()))
{
let entry = entry.unwrap();
let rela = entry
.path()
.strip_prefix(&source_dir)
.unwrap()
.to_str()
.unwrap();
let rela =
&tmc_langs_framework::entry_name(entry.path().strip_prefix(&source_dir).unwrap())
.unwrap();
if entry.path().is_dir() {
zip.add_directory(rela, SimpleFileOptions::default())
.unwrap();
Expand Down
9 changes: 3 additions & 6 deletions crates/plugins/make/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -468,12 +468,9 @@ mod test {
.sort_by(|a, b| a.path().cmp(b.path()))
{
let entry = entry.unwrap();
let rela = entry
.path()
.strip_prefix(&source_dir)
.unwrap()
.to_str()
.unwrap();
let rela =
&tmc_langs_framework::entry_name(entry.path().strip_prefix(&source_dir).unwrap())
.unwrap();
if entry.path().is_dir() {
zip.add_directory(rela, SimpleFileOptions::default())
.unwrap();
Expand Down
9 changes: 3 additions & 6 deletions crates/plugins/python3/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -552,12 +552,9 @@ mod test {
.sort_by(|a, b| a.path().cmp(b.path()))
{
let entry = entry.unwrap();
let rela = entry
.path()
.strip_prefix(&source_dir)
.unwrap()
.to_str()
.unwrap();
let rela =
&tmc_langs_framework::entry_name(entry.path().strip_prefix(&source_dir).unwrap())
.unwrap();
if entry.path().is_dir() {
zip.add_directory(rela, SimpleFileOptions::default())
.unwrap();
Expand Down
9 changes: 3 additions & 6 deletions crates/plugins/r/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,9 @@ mod test {
.sort_by(|a, b| a.path().cmp(b.path()))
{
let entry = entry.unwrap();
let rela = entry
.path()
.strip_prefix(&source_dir)
.unwrap()
.to_str()
.unwrap();
let rela =
&tmc_langs_framework::entry_name(entry.path().strip_prefix(&source_dir).unwrap())
.unwrap();
if entry.path().is_dir() {
zip.add_directory(rela, SimpleFileOptions::default())
.unwrap();
Expand Down
3 changes: 0 additions & 3 deletions crates/tmc-langs-cli/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ fn clean() {
}

#[test]
#[cfg(not(target_os = "windows"))] // hash differs on windows
fn compress_project_tar() {
test(|exercise| {
let target = NamedTempFile::new().unwrap();
Expand All @@ -197,7 +196,6 @@ fn compress_project_tar() {
}

#[test]
#[cfg(not(target_os = "windows"))] // hash differs on windows
fn compress_project_zip() {
test(|exercise| {
let target = NamedTempFile::new().unwrap();
Expand Down Expand Up @@ -225,7 +223,6 @@ fn compress_project_zip() {
}

#[test]
#[cfg(not(target_os = "windows"))] // hash differs on windows
fn compress_project_zstd() {
test(|exercise| {
let target = NamedTempFile::new().unwrap();
Expand Down
Loading
Loading