You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, we are only handling license IDs from the choosealicense repository, yet we could use the spdx crate for that. Additionally, the approach used right now isn't robust and fails validation even though license expressions provided by the user are valid SPDX expressions.
For example, executing the following command fails:
licensa apply --type "MIT or Apache-2.0"
We should allow the user to provide 'imprecise' license ids, since the spdx crate provides a nice function to infer valid SPDX ids from them.
In cases where the user supplies an imprecise license ID for which one or more valid SPDX ids can be inferred, we should prompt the user to select and confirm the valid license id.
This could look like this:
licensa apply --type "BSD"
...
# Select and confirm license id
Which kind of BSD license would you like to use?:
- BSD-1-Clause
- BSD-2-Clause
- BSD-3-Clause
...etc
Tasks
Add function that takes as input a string and returns a result containing the list of inferred license ids. An error indicates that the provided id is invalid
Add prompt functionality using the inquirer crate
The text was updated successfully, but these errors were encountered:
Description
Right now, we are only handling license IDs from the choosealicense repository, yet we could use the spdx crate for that. Additionally, the approach used right now isn't robust and fails validation even though license expressions provided by the user are valid SPDX expressions.
For example, executing the following command fails:
licensa apply --type "MIT or Apache-2.0"
We should allow the user to provide 'imprecise' license ids, since the
spdx
crate provides a nice function to infer valid SPDX ids from them.In cases where the user supplies an imprecise license ID for which one or more valid SPDX ids can be inferred, we should prompt the user to select and confirm the valid license id.
This could look like this:
Tasks
The text was updated successfully, but these errors were encountered: