Repository: EmbarkStudios/cargo-about (language: rust)

Issue:
Support ignoring private crates outside of the workspace
**Is your feature request related to a problem? Please describe.**
Setting `private = { ignore = true }` will ignore any crates in the current workspace that are set `publish = false`, but I also have some private crate dependencies that I include from other [git repositories](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories).  When using these dependencies cargo-about will warn about the licenses for these crates.

**Describe the solution you'd like**
Add an option to extend ignoring private crates outside of the workspace.  Perhaps the toml choices could be:
```
private = { ignore = true }
private = { ignore = "all" }
private = { ignore = "workspace" }
```

**Describe alternatives you've considered**
I think it might be possible to do with clarifications, if I added a clarification for each external dependency.  It also might be possible to use a `LicenseRef-xyz` in these dependencies, but I really just rather not bother with all of this.



Discussion / hints:

Fix patch:
diff --git a/src/licenses.rs b/src/licenses.rs
index d764c7c..6e2e948 100644
--- a/src/licenses.rs
+++ b/src/licenses.rs
@@ -158,19 +158,19 @@ impl Gatherer {
 
         let git_cache = fetch::GitCache::default();
 
-        // If we're ignoring workspace crates that are private, just add them
+        // If we're ignoring crates that are private, just add them
         // to the list so all of the following gathers ignore them
         if cfg.private.ignore {
-            for wm in krates.workspace_members() {
-                if let Some(publish) = &wm.krate.publish {
+            for krate in krates.krates() {
+                if let Some(publish) = &krate.krate.publish {
                     if publish.is_empty()
                         || publish
                             .iter()
                             .all(|reg| cfg.private.registries.contains(reg))
                     {
-                        log::debug!("ignoring private workspace crate '{}'", wm.krate);
+                        log::debug!("ignoring private crate '{}'", krate.krate);
                         licensed_krates.push(KrateLicense {
-                            krate: &wm.krate,
+                            krate: &krate.krate,
                             lic_info: LicenseInfo::Ignore,
                             license_files: Vec::new(),
                         });


Test patch: