Skip to content

Commit

Permalink
fix(cli): improve reporter message (biomejs#3186)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sec-ant committed Jun 12, 2024
1 parent 5700ca6 commit c9261d2
Show file tree
Hide file tree
Showing 241 changed files with 255 additions and 240 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,21 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b

### CLI

#### Enhancement

- Reword the reporter message `No fixes needed` to `No fixes applied`.

The former message is misleading when there're still errors or warnings in the files that should be taken care of manually. For example:

```block
Checked 2 files in <TIME>. No fixes needed.
Found 2 errors.
```

The new message suits better in these cases.

Contributed by @Sec-ant

### Configuration

### Editors
Expand Down
2 changes: 1 addition & 1 deletion crates/biome_cli/src/reporter/terminal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl fmt::Display for SummaryDetail {
})
} else {
fmt.write_markup(markup! {
" No fixes needed."
" No fixes applied."
})
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ expression: content
# Emitted Messages

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
```
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ expression: content
# Emitted Messages

```block
Checked 2 files in <TIME>. No fixes needed.
Checked 2 files in <TIME>. No fixes applied.
```
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ expression: content
# Emitted Messages

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
```
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ internalError/fs DEPRECATED ━━━━━━━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
```
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ test.js format ━━━━━━━━━━━━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 1 error.
```
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ test.js format ━━━━━━━━━━━━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 1 error.
Found 1 warning.
```
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ test.js format ━━━━━━━━━━━━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 2 errors.
```
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ src/index.js format ━━━━━━━━━━━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 1 error.
```
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ src/index.js format ━━━━━━━━━━━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 1 error.
```
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ export default { cjs: true };
# Emitted Messages

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
```
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ src/index.js organizeImports ━━━━━━━━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 1 error.
```
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ debugger;
# Emitted Messages

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
```
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ src/file.js format ━━━━━━━━━━━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 1 error.
```
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,6 @@ src/folder_0/package-lock.json project VERBOSE ━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 1 error.
```
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ console.log(
# Emitted Messages

```block
Formatted 1 file in <TIME>. No fixes needed.
Formatted 1 file in <TIME>. No fixes applied.
```
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ const { some } = Astro.props
# Emitted Messages

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
```
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ if (foo) {
# Emitted Messages

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
```
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ file.astro format ━━━━━━━━━━━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 1 error.
```
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ file.astro format ━━━━━━━━━━━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 1 error.
```
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ expression: content
# Emitted Messages

```block
Formatted 1 file in <TIME>. No fixes needed.
Formatted 1 file in <TIME>. No fixes applied.
```
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ file.astro:2:1 lint/suspicious/noDebugger FIXABLE ━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 1 error.
```
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ file.astro organizeImports ━━━━━━━━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 1 error.
```
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ input.css format ━━━━━━━━━━━━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 1 error.
```
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ input.css:1:6 lint/nursery/noEmptyBlock ━━━━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 1 error.
```
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ internalError/io ━━━━━━━━━━━━━━━━━━━━━
# Emitted Messages

```block
Checked 0 files in <TIME>. No fixes needed.
Checked 0 files in <TIME>. No fixes applied.
```
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ internalError/io ━━━━━━━━━━━━━━━━━━━━━
# Emitted Messages

```block
Checked 0 files in <TIME>. No fixes needed.
Checked 0 files in <TIME>. No fixes applied.
```
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ file.svelte format ━━━━━━━━━━━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 1 error.
```
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ file.svelte format ━━━━━━━━━━━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 1 error.
```
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ file.svelte organizeImports ━━━━━━━━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 1 error.
```
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ expression: content
# Emitted Messages

```block
Formatted 1 file in <TIME>. No fixes needed.
Formatted 1 file in <TIME>. No fixes applied.
```
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ expression: content
# Emitted Messages

```block
Formatted 1 file in <TIME>. No fixes needed.
Formatted 1 file in <TIME>. No fixes applied.
```
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ file.vue format ━━━━━━━━━━━━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 1 error.
```
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ file.vue format ━━━━━━━━━━━━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 1 error.
```
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ file.vue format ━━━━━━━━━━━━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 1 error.
```
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ file.vue format ━━━━━━━━━━━━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 1 error.
```
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ file.vue format ━━━━━━━━━━━━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 1 error.
```
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@ file.vue:4:1 lint/style/noVar FIXABLE ━━━━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 3 errors.
```
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,6 @@ file.vue:4:1 lint/style/noVar FIXABLE ━━━━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 4 errors.
```
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ file.vue organizeImports ━━━━━━━━━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 1 error.
```
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ file.vue:16:36 lint/suspicious/noExplicitAny ━━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 1 error.
```
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ internalError/fs DEPRECATED ━━━━━━━━━━━━━━━━
```

```block
Checked 2 files in <TIME>. No fixes needed.
Checked 2 files in <TIME>. No fixes applied.
```
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ internalError/fs DEPRECATED ━━━━━━━━━━━━━━━━
```

```block
Checked 3 files in <TIME>. No fixes needed.
Checked 3 files in <TIME>. No fixes applied.
```
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ internalError/fs DEPRECATED ━━━━━━━━━━━━━━━━
```

```block
Checked 3 files in <TIME>. No fixes needed.
Checked 3 files in <TIME>. No fixes applied.
```
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ internalError/io ━━━━━━━━━━━━━━━━━━━━━
# Emitted Messages

```block
Checked 0 files in <TIME>. No fixes needed.
Checked 0 files in <TIME>. No fixes applied.
```
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ package-lock.json project VERBOSE ━━━━━━━━━━━━━━
```

```block
Checked 0 files in <TIME>. No fixes needed.
Checked 0 files in <TIME>. No fixes applied.
```
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ other.json format ━━━━━━━━━━━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 1 error.
```
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ other.json format ━━━━━━━━━━━━━━━━━━━━
```

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. No fixes applied.
Found 1 error.
```
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,6 @@ lint/suspicious/noDebugger 8 (8 error(s), 0 warning
```

```block
Checked 2 files in <TIME>. No fixes needed.
Checked 2 files in <TIME>. No fixes applied.
Found 44 errors.
```
Loading

0 comments on commit c9261d2

Please sign in to comment.