-
-
Notifications
You must be signed in to change notification settings - Fork 792
Detect description and author fields from Cargo.toml manifest #1454
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
Merged
pombredanne
merged 11 commits into
aboutcode-org:develop
from
ritiek:parse-more-fields-in-cargo-manifest
Mar 23, 2019
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
2b1651b
Parse authors from Cargo.toml manifest
ritiek 40049cf
Parse crate description from Cargo.toml manifest
ritiek 7679320
Fix crates.io base URL formatting
ritiek b473e5d
Update tests
ritiek 92c4604
Handle when description or authors are not present
ritiek 10c9458
Add docstrings!
ritiek fb3d509
Code style consistency
ritiek 1f3aac4
Remove dead code opening Cargo.toml manifest
ritiek bc20482
Pass "parties" to constructor in RustCargoCrate class
ritiek e8b2836
Do not unnecessarily map unimplemented manifest fields to an OrderedD…
ritiek 7416220
Add tests for RegEx parsing
ritiek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,10 +6,18 @@ | |
| "qualifiers": null, | ||
| "subpath": null, | ||
| "primary_language": "Rust", | ||
| "description": null, | ||
| "description": "A simple to use, efficient, and full featured Command Line Argument Parser", | ||
| "release_date": null, | ||
| "parties": {}, | ||
| "keywords": {}, | ||
| "parties": [ | ||
| { | ||
| "type": "person", | ||
| "role": "author", | ||
| "name": "Kevin K.", | ||
| "email": "kbknapp@gmail.com", | ||
| "url": null | ||
| } | ||
| ], | ||
| "keywords": [], | ||
| "homepage_url": null, | ||
| "download_url": null, | ||
| "size": null, | ||
|
|
@@ -25,11 +33,11 @@ | |
| "declared_license": null, | ||
| "notice_text": null, | ||
| "manifest_path": null, | ||
| "dependencies": {}, | ||
| "dependencies": [], | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was important as your use of empty dicts was changing the default type for this: it is a list. |
||
| "contains_source_code": null, | ||
| "source_packages": {}, | ||
| "source_packages": [], | ||
| "purl": "pkg:cargo/clap@2.32.0", | ||
| "repository_homepage_url": "https://crates.io//crates/clap", | ||
| "repository_download_url": "https://crates.io/api/v1//crates/clap/2.32.0/download", | ||
| "api_data_url": "https://crates.io/api/v1//crates/clap" | ||
| "repository_homepage_url": "https://crates.io/crates/clap", | ||
| "repository_download_url": "https://crates.io/api/v1/crates/clap/2.32.0/download", | ||
| "api_data_url": "https://crates.io/api/v1/crates/clap" | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Do you mind adding a few unit tests that showcase how this regex and the regex below behave with real data? This helps understand things better.
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.
Yep, I'll add in some tests shortly.