Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename flake8-bandit rules from plugins to checks #1637

Merged
merged 1 commit into from Jan 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/checkers/ast.rs
Expand Up @@ -470,7 +470,7 @@ where

if self.settings.enabled.contains(&CheckCode::S107) {
self.add_checks(
flake8_bandit::plugins::hardcoded_password_default(args).into_iter(),
flake8_bandit::checks::hardcoded_password_default(args).into_iter(),
);
}

Expand Down Expand Up @@ -1186,7 +1186,7 @@ where
);
}
if self.settings.enabled.contains(&CheckCode::S101) {
self.add_check(flake8_bandit::plugins::assert_used(stmt));
self.add_check(flake8_bandit::checks::assert_used(stmt));
}
if self.settings.enabled.contains(&CheckCode::PT015) {
if let Some(check) = flake8_pytest_style::plugins::assert_falsy(stmt, test) {
Expand Down Expand Up @@ -1296,7 +1296,7 @@ where

if self.settings.enabled.contains(&CheckCode::S105) {
if let Some(check) =
flake8_bandit::plugins::assign_hardcoded_password_string(value, targets)
flake8_bandit::checks::assign_hardcoded_password_string(value, targets)
{
self.add_check(check);
}
Expand Down Expand Up @@ -1864,12 +1864,12 @@ where

// flake8-bandit
if self.settings.enabled.contains(&CheckCode::S102) {
if let Some(check) = flake8_bandit::plugins::exec_used(expr, func) {
if let Some(check) = flake8_bandit::checks::exec_used(expr, func) {
self.add_check(check);
}
}
if self.settings.enabled.contains(&CheckCode::S103) {
if let Some(check) = flake8_bandit::plugins::bad_file_permissions(
if let Some(check) = flake8_bandit::checks::bad_file_permissions(
func,
args,
keywords,
Expand All @@ -1881,7 +1881,7 @@ where
}
if self.settings.enabled.contains(&CheckCode::S106) {
self.add_checks(
flake8_bandit::plugins::hardcoded_password_func_arg(keywords).into_iter(),
flake8_bandit::checks::hardcoded_password_func_arg(keywords).into_iter(),
);
}

Expand Down Expand Up @@ -2476,7 +2476,7 @@ where

if self.settings.enabled.contains(&CheckCode::S105) {
self.add_checks(
flake8_bandit::plugins::compare_to_hardcoded_password_string(
flake8_bandit::checks::compare_to_hardcoded_password_string(
left,
comparators,
)
Expand Down Expand Up @@ -2521,7 +2521,7 @@ where
));
}
if self.settings.enabled.contains(&CheckCode::S104) {
if let Some(check) = flake8_bandit::plugins::hardcoded_bind_all_interfaces(
if let Some(check) = flake8_bandit::checks::hardcoded_bind_all_interfaces(
value,
&Range::from_located(expr),
) {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/flake8_bandit/mod.rs
@@ -1,5 +1,5 @@
pub mod checks;
mod helpers;
pub mod plugins;

#[cfg(test)]
mod tests {
Expand Down