mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 21:05:08 +00:00
Allow © in copyright notices (#10065)
Closes https://github.com/astral-sh/ruff/issues/10061.
This commit is contained in:
parent
7d9ce5049a
commit
6fe15e7289
6 changed files with 23 additions and 5 deletions
|
@ -1123,14 +1123,14 @@ pub struct Flake8CopyrightOptions {
|
|||
/// The regular expression used to match the copyright notice, compiled
|
||||
/// with the [`regex`](https://docs.rs/regex/latest/regex/) crate.
|
||||
///
|
||||
/// Defaults to `(?i)Copyright\s+(\(C\)\s+)?\d{4}(-\d{4})*`, which matches
|
||||
/// Defaults to `(?i)Copyright\s+((?:\(C\)|©)\s+)?\d{4}(-\d{4})*`, which matches
|
||||
/// the following:
|
||||
/// - `Copyright 2023`
|
||||
/// - `Copyright (C) 2023`
|
||||
/// - `Copyright 2021-2023`
|
||||
/// - `Copyright (C) 2021-2023`
|
||||
#[option(
|
||||
default = r#"(?i)Copyright\s+(\(C\)\s+)?\d{4}([-,]\d{4})*"#,
|
||||
default = r#"(?i)Copyright\s+((?:\(C\)|©)\s+)?\d{4}([-,]\d{4})*"#,
|
||||
value_type = "str",
|
||||
example = r#"notice-rgx = "(?i)Copyright \\(C\\) \\d{4}""#
|
||||
)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue