Skip to content

Commit

Permalink
willbe : warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Barsik-sus committed Jul 3, 2024
1 parent 0a0a55f commit 83b4028
Show file tree
Hide file tree
Showing 15 changed files with 41 additions and 42 deletions.
9 changes: 1 addition & 8 deletions module/move/willbe/src/action/main_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,13 @@ mod private
};
use std::path::PathBuf;
use regex::Regex;
use { CrateDir, query, url, Workspace };
use entity::{ PathError, WorkspaceInitError };
use error::
{
err,
// Result,
untyped::
{
Error,
Context,
},
untyped::Error,
};
use workspace_md_extension::WorkspaceMdExtension;
// use error::ErrWith;

static TAGS_TEMPLATE : std::sync::OnceLock< Regex > = std::sync::OnceLock::new();

Expand Down
2 changes: 2 additions & 0 deletions module/move/willbe/src/action/readme_health_table_renew.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,10 @@ mod private
{
Some
(
// qqq : use new-type. for example `CrateDir`
stability_get
(
// qqq : the folder name may not match the package name
&workspace.workspace_root().join( &table_parameters.base_path ).join( &package_name )
)?
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "_willbe_variadic_tag_configurations_c"
name = "_willbe_variadic_tag_configurations_full_config_c"
version = "0.1.0"
edition = "2021"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "test_module"
name = "single_module_with_example_test_module"
version = "0.1.0"
edition = "2021"
repository = "https://github.com/Wandalen/wTools/tree/master/module/move/test_module"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "test_module"
name = "single_module_without_master_branch_and_discord_test_module"
version = "0.1.0"
edition = "2021"

Expand Down
4 changes: 2 additions & 2 deletions module/move/willbe/tests/asset/three_packages/b/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "_chain_of_packages_b"
name = "_three_packages_b"
version = "0.1.0"
edition = "2021"
repository = "https://github.com/Username/test/b"
Expand All @@ -9,4 +9,4 @@ stability = "stable"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
_chain_of_packages_c = { path = "../c" }
_three_packages_c = { path = "../c" }
2 changes: 1 addition & 1 deletion module/move/willbe/tests/asset/three_packages/c/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "_chain_of_packages_c"
name = "_three_packages_c"
version = "0.1.0"
edition = "2021"
repository = "https://github.com/Username/test/c"
Expand Down
2 changes: 1 addition & 1 deletion module/move/willbe/tests/asset/three_packages/d/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "_chain_of_packages_d"
name = "_three_packages_d"
version = "0.1.0"
edition = "2021"
repository = "https://github.com/Username/test/c"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "_chain_of_packages_b"
name = "_three_packages_with_features_b"
version = "0.1.0"
edition = "2021"
repository = "https://github.com/Username/test/b"
Expand All @@ -9,9 +9,9 @@ stability = "stable"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
_chain_of_packages_c = { path = "../c", optional = true }
_three_packages_with_features_c = { path = "../c", optional = true }

[features]
enabled = []
default = ["boo"]
boo = ["_chain_of_packages_c"]
boo = ["_three_packages_with_features_c"]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "_chain_of_packages_c"
name = "_three_packages_with_features_c"
version = "0.1.0"
edition = "2021"
repository = "https://github.com/Username/test/c"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "_chain_of_packages_d"
name = "_three_packages_with_features_d"
version = "0.1.0"
edition = "2021"
repository = "https://github.com/Username/test/c"
Expand Down
36 changes: 18 additions & 18 deletions module/move/willbe/tests/inc/action_tests/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fn package_no_features()
// Assert
assert!( report.contains(
"\
Package _chain_of_packages_b:\
Package _three_packages_b:\
" ) );
}

Expand All @@ -48,8 +48,8 @@ fn package_features()
// Assert
assert!( report.contains(
"\
Package _chain_of_packages_b:
\t_chain_of_packages_c
Package _three_packages_with_features_b:
\t_three_packages_with_features_c
\tboo
\tdefault
\tenabled\
Expand All @@ -71,9 +71,9 @@ fn package_features_with_features_deps()
// Assert
assert!( report.contains(
"\
Package _chain_of_packages_b:
\t_chain_of_packages_c: [dep:_chain_of_packages_c]
\tboo: [_chain_of_packages_c]
Package _three_packages_with_features_b:
\t_three_packages_with_features_c: [dep:_three_packages_with_features_c]
\tboo: [_three_packages_with_features_c]
\tdefault: [boo]
\tenabled: []\
" ) );
Expand All @@ -94,17 +94,17 @@ fn workspace_no_features()
// Assert
assert!( report.contains(
"\
Package _chain_of_packages_b:\
Package _three_packages_b:\
" ) );

assert!( report.contains(
"\
Package _chain_of_packages_c:\
Package _three_packages_c:\
" ) );

assert!( report.contains(
"\
Package _chain_of_packages_d:\
Package _three_packages_d:\
" ) );
}

Expand All @@ -123,24 +123,24 @@ fn workspace_features()
// Assert
assert!( report.contains(
"\
Package _chain_of_packages_b:
\t_chain_of_packages_c
Package _three_packages_with_features_b:
\t_three_packages_with_features_c
\tboo
\tdefault
\tenabled\
" ) );

assert!( report.contains(
"\
Package _chain_of_packages_c:
Package _three_packages_with_features_c:
\tdefault
\tenabled
\tfoo\
" ) );

assert!( report.contains(
"\
Package _chain_of_packages_d:
Package _three_packages_with_features_d:
\tenabled\
" ) );
}
Expand All @@ -161,24 +161,24 @@ fn workspace_features_with_features_deps()
// Assert
assert!( report.contains(
"\
Package _chain_of_packages_b:
\t_chain_of_packages_c: [dep:_chain_of_packages_c]
\tboo: [_chain_of_packages_c]
Package _three_packages_with_features_b:
\t_three_packages_with_features_c: [dep:_three_packages_with_features_c]
\tboo: [_three_packages_with_features_c]
\tdefault: [boo]
\tenabled: []\
" ) );

assert!( report.contains(
"\
Package _chain_of_packages_c:
Package _three_packages_with_features_c:
\tdefault: [foo]
\tenabled: []
\tfoo: []\
" ) );

assert!( report.contains(
"\
Package _chain_of_packages_d:
Package _three_packages_with_features_d:
\tenabled: []\
" ) );
}
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ fn module_cell()
let mut actual = String::new();
_ = file.read_to_string( &mut actual ).unwrap();

assert!( actual.contains( "[_willbe_variadic_tag_configurations_c](./_willbe_variadic_tag_configurations_c)" ) );
// qqq : do not do like that. If it will fail how will I know what went wrong? What is the name of the package here?
assert!( actual.contains( "[_willbe_variadic_tag_configurations_full_config_c](./_willbe_variadic_tag_configurations_full_config_c)" ) );
}

#[ test ]
Expand Down Expand Up @@ -163,7 +164,8 @@ fn branches_cell()
let mut actual = String::new();
_ = file.read_to_string( &mut actual ).unwrap();

assert!( actual.contains( "[![rust-status](https://img.shields.io/github/actions/workflow/status/SomeCrate/C/module_willbe_variadic_tag_configurations_c_push.yml?label=&branch=test_branch1)](https://github.com/SomeName/SomeCrate/C/actions/workflows/module_willbe_variadic_tag_configurations_c_push.yml?query=branch%3Atest_branch1) | [![rust-status](https://img.shields.io/github/actions/workflow/status/SomeCrate/C/module_willbe_variadic_tag_configurations_c_push.yml?label=&branch=test_branch2)](https://github.com/SomeName/SomeCrate/C/actions/workflows/module_willbe_variadic_tag_configurations_c_push.yml?query=branch%3Atest_branch2)" ) );
// qqq : do not do like that. If it will fail how will I know what went wrong? What is the name of the package here?
assert!( actual.contains( "[![rust-status](https://img.shields.io/github/actions/workflow/status/SomeCrate/C/module_willbe_variadic_tag_configurations_full_config_c_push.yml?label=&branch=test_branch1)](https://github.com/SomeName/SomeCrate/C/actions/workflows/module_willbe_variadic_tag_configurations_full_config_c_push.yml?query=branch%3Atest_branch1) | [![rust-status](https://img.shields.io/github/actions/workflow/status/SomeCrate/C/module_willbe_variadic_tag_configurations_full_config_c_push.yml?label=&branch=test_branch2)](https://github.com/SomeName/SomeCrate/C/actions/workflows/module_willbe_variadic_tag_configurations_full_config_c_push.yml?query=branch%3Atest_branch2)" ) );
}

#[ test ]
Expand All @@ -180,7 +182,8 @@ fn docs_cell()
let mut actual = String::new();
_ = file.read_to_string( &mut actual ).unwrap();

assert!( actual.contains( "[![docs.rs](https://raster.shields.io/static/v1?label=&message=docs&color=eee)](https://docs.rs/_willbe_variadic_tag_configurations_c)" ) );
// qqq : do not do like that. If it will fail how will I know what went wrong? What is the name of the package here?
assert!( actual.contains( "[![docs.rs](https://raster.shields.io/static/v1?label=&message=docs&color=eee)](https://docs.rs/_willbe_variadic_tag_configurations_full_config_c)" ) );
}

#[ test ]
Expand All @@ -197,5 +200,6 @@ fn sample_cell()
let mut actual = String::new();
_ = file.read_to_string( &mut actual ).unwrap();

assert!( actual.contains( " [![Open in Gitpod](https://raster.shields.io/static/v1?label=&message=try&color=eee)](https://gitpod.io/#RUN_PATH=.,SAMPLE_FILE=.%2F_willbe_variadic_tag_configurations_c%2Fexamples%2F_willbe_variadic_tag_configurations_c_trivial.rs,RUN_POSTFIX=--example%20_willbe_variadic_tag_configurations_c_trivial/https://github.com/SomeName/SomeCrate/C)" ) );
// qqq : do not do like that. If it will fail how will I know what went wrong? What is the name of the package here?
assert!( actual.contains( " [![Open in Gitpod](https://raster.shields.io/static/v1?label=&message=try&color=eee)](https://gitpod.io/#RUN_PATH=.,SAMPLE_FILE=.%2F_willbe_variadic_tag_configurations_full_config_c%2Fexamples%2F_willbe_variadic_tag_configurations_c_trivial.rs,RUN_POSTFIX=--example%20_willbe_variadic_tag_configurations_c_trivial/https://github.com/SomeName/SomeCrate/C)" ) );
}

0 comments on commit 83b4028

Please sign in to comment.