Skip to content

Commit 2e3081f

Browse files
committed
add metadata to rules
add group metadata to rules
1 parent 8d213e2 commit 2e3081f

File tree

689 files changed

+947
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

689 files changed

+947
-0
lines changed

crates/ruff_linter/src/rules/airflow/rules/dag_schedule_argument.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ use crate::checkers::ast::Checker;
4141
/// dag = DAG(dag_id="my_dag", schedule=timedelta(days=1))
4242
/// ```
4343
#[derive(ViolationMetadata)]
44+
#[violation_metadata(version = "0.11.3", group = RuleGroup::Stable)]
4445
pub(crate) struct AirflowDagNoScheduleArgument;
4546

4647
impl Violation for AirflowDagNoScheduleArgument {

crates/ruff_linter/src/rules/airflow/rules/moved_to_provider_in_3.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ use crate::{FixAvailability, Violation};
3535
/// fab_auth_manager_app = FabAuthManager().get_fastapi_app()
3636
/// ```
3737
#[derive(ViolationMetadata)]
38+
#[violation_metadata(version = "0.8.2", group = RuleGroup::Stable)]
3839
pub(crate) struct Airflow3MovedToProvider<'a> {
3940
deprecated: QualifiedName<'a>,
4041
replacement: ProviderReplacement,

crates/ruff_linter/src/rules/airflow/rules/removal_in_3.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ use ruff_text_size::TextRange;
4141
/// yesterday = today - timedelta(days=1)
4242
/// ```
4343
#[derive(ViolationMetadata)]
44+
#[violation_metadata(version = "0.8.1", group = RuleGroup::Stable)]
4445
pub(crate) struct Airflow3Removal {
4546
deprecated: String,
4647
replacement: Replacement,

crates/ruff_linter/src/rules/airflow/rules/suggested_to_move_to_provider_in_3.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ use ruff_text_size::TextRange;
5151
/// )
5252
/// ```
5353
#[derive(ViolationMetadata)]
54+
#[violation_metadata(version = "0.11.5", group = RuleGroup::Stable)]
5455
pub(crate) struct Airflow3SuggestedToMoveToProvider<'a> {
5556
deprecated: QualifiedName<'a>,
5657
replacement: ProviderReplacement,

crates/ruff_linter/src/rules/airflow/rules/suggested_to_update_3_0.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ use ruff_text_size::TextRange;
3737
/// Asset(uri="test://test/")
3838
/// ```
3939
#[derive(ViolationMetadata)]
40+
#[violation_metadata(version = "0.11.6", group = RuleGroup::Stable)]
4041
pub(crate) struct Airflow3SuggestedUpdate {
4142
deprecated: String,
4243
replacement: Replacement,

crates/ruff_linter/src/rules/airflow/rules/task_variable_name.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ use crate::checkers::ast::Checker;
3232
/// my_task = PythonOperator(task_id="my_task")
3333
/// ```
3434
#[derive(ViolationMetadata)]
35+
#[violation_metadata(version = "v0.0.271", group = RuleGroup::Stable)]
3536
pub(crate) struct AirflowVariableNameTaskIdMismatch {
3637
task_id: String,
3738
}

crates/ruff_linter/src/rules/eradicate/rules/commented_out_code.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ use crate::rules::eradicate::detection::comment_contains_code;
3030
///
3131
/// [#4845]: https://github.com/astral-sh/ruff/issues/4845
3232
#[derive(ViolationMetadata)]
33+
#[violation_metadata(version = "v0.0.145", group = RuleGroup::Stable)]
3334
pub(crate) struct CommentedOutCode;
3435

3536
impl Violation for CommentedOutCode {

crates/ruff_linter/src/rules/fastapi/rules/fastapi_non_annotated_dependency.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ use ruff_python_ast::PythonVersion;
7979
/// [typing-annotated]: https://docs.python.org/3/library/typing.html#typing.Annotated
8080
/// [typing-extensions]: https://typing-extensions.readthedocs.io/en/stable/
8181
#[derive(ViolationMetadata)]
82+
#[violation_metadata(version = "0.5.5", group = RuleGroup::Stable)]
8283
pub(crate) struct FastApiNonAnnotatedDependency {
8384
py_version: PythonVersion,
8485
}

crates/ruff_linter/src/rules/fastapi/rules/fastapi_redundant_response_model.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ use crate::{AlwaysFixableViolation, Fix};
5959
/// return item
6060
/// ```
6161
#[derive(ViolationMetadata)]
62+
#[violation_metadata(version = "0.5.5", group = RuleGroup::Stable)]
6263
pub(crate) struct FastApiRedundantResponseModel;
6364

6465
impl AlwaysFixableViolation for FastApiRedundantResponseModel {

crates/ruff_linter/src/rules/fastapi/rules/fastapi_unused_path_parameter.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ use crate::{FixAvailability, Violation};
6464
/// This rule's fix is marked as unsafe, as modifying a function signature can
6565
/// change the behavior of the code.
6666
#[derive(ViolationMetadata)]
67+
#[violation_metadata(version = "0.6.1", group = RuleGroup::Stable)]
6768
pub(crate) struct FastApiUnusedPathParameter {
6869
arg_name: String,
6970
function_name: String,

0 commit comments

Comments
 (0)