mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-27 20:39:13 +00:00
Require explicit opt-in for GitHub and Gitlab formats (#1697)
This commit is contained in:
parent
81b812d94c
commit
12d2526edb
2 changed files with 2 additions and 13 deletions
|
@ -1327,8 +1327,9 @@ jobs:
|
|||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install ruff
|
||||
# Include `--format=github` to enable automatic inline annotations.
|
||||
- name: Run Ruff
|
||||
run: ruff .
|
||||
run: ruff --format=github .
|
||||
```
|
||||
|
||||
## FAQ
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
use std::env;
|
||||
use std::hash::Hash;
|
||||
use std::ops::Deref;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
@ -164,17 +163,6 @@ pub enum SerializationFormat {
|
|||
|
||||
impl Default for SerializationFormat {
|
||||
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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue