mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 22:01:47 +00:00
linter: Enable test-rules for test build (#11201)
This commit is contained in:
parent
c391c8b6cb
commit
5561d445d7
5 changed files with 20 additions and 20 deletions
|
@ -33,7 +33,7 @@ use crate::message::Message;
|
|||
use crate::noqa::add_noqa;
|
||||
use crate::registry::{AsRule, Rule, RuleSet};
|
||||
use crate::rules::pycodestyle;
|
||||
#[cfg(feature = "test-rules")]
|
||||
#[cfg(any(feature = "test-rules", test))]
|
||||
use crate::rules::ruff::rules::test_rules::{self, TestRule, TEST_RULES};
|
||||
use crate::settings::types::UnsafeFixes;
|
||||
use crate::settings::{flags, LinterSettings};
|
||||
|
@ -218,7 +218,7 @@ pub fn check_path(
|
|||
}
|
||||
|
||||
// Raise violations for internal test rules
|
||||
#[cfg(feature = "test-rules")]
|
||||
#[cfg(any(feature = "test-rules", test))]
|
||||
{
|
||||
for test_rule in TEST_RULES {
|
||||
if !settings.rules.enabled(*test_rule) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue