Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Shadle committed Nov 15, 2024
1 parent db78cd4 commit 3207836
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/expression/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ impl Expression {
/// The validation can fail for many reasons:
/// * The expression contains invalid characters
/// * An unknown/invalid license or exception identifier was found. Only
/// [SPDX short identifiers](https://spdx.org/ids) are allowed
/// [SPDX short identifiers](https://spdx.org/ids) are allowed
/// * The expression contained unbalanced parentheses
/// * A license or exception immediately follows another license or exception, without
/// a valid AND, OR, or WITH operator separating them
/// a valid AND, OR, or WITH operator separating them
/// * An AND, OR, or WITH doesn't have a license or `)` preceding it
///
/// ```
Expand All @@ -35,7 +35,7 @@ impl Expression {
/// 1. Lower-cased operators ('or', 'and', 'with') are upper-cased
/// 1. '+' is tranformed to `-or-later` for GNU licenses
/// 1. Invalid/imprecise license identifiers (eg. `apache2`) are replaced
/// with their valid identifiers
/// with their valid identifiers
///
/// If the provided expression is not modified then `None` is returned
///
Expand Down
14 changes: 7 additions & 7 deletions src/lexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ impl ParseMode {
/// Strict, specification compliant SPDX parsing.
///
/// 1. Only license identifiers in the SPDX license list, or
/// Document/LicenseRef, are allowed. The license identifiers are also
/// case-sensitive.
/// Document/LicenseRef, are allowed. The license identifiers are also
/// case-sensitive.
/// 1. `WITH`, `AND`, and `OR` are the only valid operators
pub const STRICT: Self = Self {
allow_lower_case_operators: false,
Expand All @@ -48,12 +48,12 @@ impl ParseMode {
/// Allow non-conforming syntax for crates-io compatibility
///
/// 1. Additional, invalid, identifiers are accepted and mapped to a correct
/// SPDX license identifier.
/// See [`IMPRECISE_NAMES`](crate::identifiers::IMPRECISE_NAMES) for the
/// list of additionally accepted identifiers and the license they
/// correspond to.
/// SPDX license identifier.
/// See [`IMPRECISE_NAMES`](crate::identifiers::IMPRECISE_NAMES) for the
/// list of additionally accepted identifiers and the license they
/// correspond to.
/// 1. `/` can by used as a synonym for `OR`, and doesn't need to be
/// separated by whitespace from the terms it combines
/// separated by whitespace from the terms it combines
pub const LAX: Self = Self {
allow_lower_case_operators: true,
allow_slash_as_or_operator: true,
Expand Down

0 comments on commit 3207836

Please sign in to comment.