Require explicit opt-in for GitHub and Gitlab formats (#1697)

This commit is contained in:
Charlie Marsh 2023-01-06 15:57:56 -05:00 committed by GitHub
parent 81b812d94c
commit 12d2526edb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 13 deletions

View file

@ -1327,8 +1327,9 @@ jobs:
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install ruff pip install ruff
# Include `--format=github` to enable automatic inline annotations.
- name: Run Ruff - name: Run Ruff
run: ruff . run: ruff --format=github .
``` ```
## FAQ ## FAQ

View file

@ -1,4 +1,3 @@
use std::env;
use std::hash::Hash; use std::hash::Hash;
use std::ops::Deref; use std::ops::Deref;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
@ -164,17 +163,6 @@ pub enum SerializationFormat {
impl Default for SerializationFormat { impl Default for SerializationFormat {
fn default() -> Self { fn default() -> Self {
if let Ok(github_actions) = env::var("GITHUB_ACTIONS") {
if github_actions == "true" {
return Self::Github;
}
}
if let Ok(gitlab_ci) = env::var("GITLAB_CI") {
if gitlab_ci == "true" {
return Self::Gitlab;
}
}
Self::Text Self::Text
} }
} }