-
Notifications
You must be signed in to change notification settings - Fork 65
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
ISSUE-16 - Further unit testing #129
ISSUE-16 - Further unit testing #129
Conversation
3518995
to
a058a85
Compare
Thanks for chipping away at the test suite 👍 Are the formatting changes done by |
Hi, I was also wondering, would you mind if I raise a PR in https://github.com/rust-unofficial/awesome-rust mentioning Thanks, |
I love code formatting tools in general and
Sounds good to me 👍 |
@anderejd if you'd like I can add a CI check for rustfmt |
That would be perfect! |
fn create_package_id_vec(count: i32) -> Vec<PackageId> { | ||
let config = Config::default().unwrap(); | ||
|
||
let current_working_dir = | ||
env::current_dir().unwrap().join("Cargo.toml"); | ||
|
||
let manifest_path_option = Some(current_working_dir); | ||
|
||
let workspace = get_workspace(&config, manifest_path_option).unwrap(); | ||
|
||
let package = workspace.current().unwrap(); | ||
|
||
let source_id = package.dependencies().first().unwrap().source_id(); | ||
|
||
let mut package_id_vec: Vec<PackageId> = vec![]; | ||
|
||
for i in 0..count { | ||
package_id_vec.push( | ||
PackageId::new( | ||
format!("test_name_{}", i), | ||
format!("1.2.{}", i).as_str(), | ||
source_id, | ||
) | ||
.unwrap(), | ||
) | ||
} | ||
|
||
package_id_vec | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor, formatting: This function would be easier to read imho without any extra empty lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good shout! Have pushed an update.
For the use of cargo format
would it also be worth drafting a contributing guideline as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, a short contributing section in the readme file could be useful.
ISSUE-16 - Adding in further unit tests: * Pulling up unit test coverage to just under 70% * Splitting out traversal module into submodules * Making cargo clippy suggestions * Running cargo fmt Signed-off-by: joshmc <josh-mcc@tiscali.co.uk>
* Remove extra line spacing Signed-off-by: joshmc <josh-mcc@tiscali.co.uk>
a058a85
to
13eec08
Compare
Sorry for the conflict, I just pushed a |
No worries! Have merged |
No description provided.