Skip to content

Commit

Permalink
apply changes and fix changed check
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Mar 6, 2024
1 parent 4a3c7f6 commit 2573386
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 25 deletions.
12 changes: 9 additions & 3 deletions crates/biome_cli/src/execute/process_file/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ pub(crate) fn check_file<'ctx>(
let lint_result = lint_with_guard(ctx, &mut workspace_file);
match lint_result {
Ok(status) => {
changed = status.is_changed();
if status.is_changed() {
changed = true
}
if let FileStatus::Message(msg) = status {
if msg.is_error() {
has_errors = true
Expand All @@ -38,7 +40,9 @@ pub(crate) fn check_file<'ctx>(
let organize_imports_result = organize_imports_with_guard(ctx, &mut workspace_file);
match organize_imports_result {
Ok(status) => {
changed = status.is_changed();
if status.is_changed() {
changed = true
}
if let FileStatus::Message(msg) = status {
if msg.is_error() {
has_errors = true
Expand All @@ -57,7 +61,9 @@ pub(crate) fn check_file<'ctx>(
let format_result = format_with_guard(ctx, &mut workspace_file);
match format_result {
Ok(status) => {
changed = status.is_changed();
if status.is_changed() {
changed = true
}
if let FileStatus::Message(msg) = status {
if msg.is_error() {
has_errors = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import * as something from "../something";
# Emitted Messages

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. Fixed 1 file.
```


Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ console.log(a);
# Emitted Messages

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. Fixed 1 file.
```


Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ The configuration that is contained inside the file `biome.json`
languages) files.
--json-formatter-line-width=NUMBER What's the max width of a line applied to JSON (and its super
languages) files. Defaults to 80.
--json-formatter-trailing-commas=<omit|allow> Print trailing commas wherever possible in multi-line
comma-separated syntactic structures. Defaults to "omit".
--json-formatter-trailing-commas=<none|all> Print trailing commas wherever possible in multi-line
comma-separated syntactic structures. Defaults to "none".
Global options applied to all commands
--colors=<off|force> Set the formatting mode for markup: "off" prints everything as plain text,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ rome.json internalError/fs ━━━━━━━━━━━━━━━━━
```

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


Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import * as something from "../something";
# Emitted Messages

```block
Checked 1 file in <TIME>. No fixes needed.
Checked 1 file in <TIME>. Fixed 1 file.
```


Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ The configuration that is contained inside the file `biome.json`
languages) files.
--json-formatter-line-width=NUMBER What's the max width of a line applied to JSON (and its super
languages) files. Defaults to 80.
--json-formatter-trailing-commas=<omit|allow> Print trailing commas wherever possible in multi-line
comma-separated syntactic structures. Defaults to "omit".
--json-formatter-trailing-commas=<none|all> Print trailing commas wherever possible in multi-line
comma-separated syntactic structures. Defaults to "none".
Global options applied to all commands
--colors=<off|force> Set the formatting mode for markup: "off" prints everything as plain text,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ Available options:
languages) files.
--json-formatter-line-width=NUMBER What's the max width of a line applied to JSON (and its super
languages) files. Defaults to 80.
--json-formatter-trailing-commas=<omit|allow> Print trailing commas wherever possible in multi-line
comma-separated syntactic structures. Defaults to "omit".
--json-formatter-trailing-commas=<none|all> Print trailing commas wherever possible in multi-line
comma-separated syntactic structures. Defaults to "none".
--stdin-file-path=PATH Use this option when you want to format code piped from `stdin`, and
print the output to `stdout`.
The file doesn't need to exist on disk, what matters is the extension of
Expand Down
4 changes: 2 additions & 2 deletions website/src/pages/schemas/0.1.0/schema.json.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Run `BIOME_VERSION=<version number> cargo codegen-website
// to generate a new schema
import { readFileSync } from "fs";
import { join, resolve } from "path";
import { readFileSync } from "node:fs";
import { join, resolve } from "node:path";

export function get() {
const schemaPath = resolve(
Expand Down
4 changes: 2 additions & 2 deletions website/src/pages/schemas/1.0.0/schema.json.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Run `BIOME_VERSION=<version number> cargo codegen-website
// to generate a new schema
import { readFileSync } from "fs";
import { join, resolve } from "path";
import { readFileSync } from "node:fs";
import { join, resolve } from "node:path";

export function get() {
const schemaPath = resolve(
Expand Down
4 changes: 2 additions & 2 deletions website/src/pages/schemas/1.1.0/schema.json.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Run `BIOME_VERSION=<version number> cargo codegen-website
// to generate a new schema
import { readFileSync } from "fs";
import { join, resolve } from "path";
import { readFileSync } from "node:fs";
import { join, resolve } from "node:path";

export function get() {
const schemaPath = resolve(
Expand Down
4 changes: 2 additions & 2 deletions website/src/pages/schemas/1.1.2/schema.json.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Run `BIOME_VERSION=<version number> cargo codegen-website
// to generate a new schema
import { readFileSync } from "fs";
import { join, resolve } from "path";
import { readFileSync } from "node:fs";
import { join, resolve } from "node:path";

export function get() {
const schemaPath = resolve(
Expand Down
4 changes: 2 additions & 2 deletions website/src/pages/schemas/1.2.0/schema.json.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Run `BIOME_VERSION=<version number> cargo codegen-website
// to generate a new schema
import { readFileSync } from "fs";
import { join, resolve } from "path";
import { readFileSync } from "node:fs";
import { join, resolve } from "node:path";

export function get() {
const schemaPath = resolve(
Expand Down
4 changes: 2 additions & 2 deletions website/src/pages/schemas/1.2.1/schema.json.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Run `BIOME_VERSION=<version number> cargo codegen-website
// to generate a new schema
import { readFileSync } from "fs";
import { join, resolve } from "path";
import { readFileSync } from "node:fs";
import { join, resolve } from "node:path";

export function get() {
const schemaPath = resolve(
Expand Down

0 comments on commit 2573386

Please sign in to comment.