Skip to content

Commit

Permalink
release: 1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Sep 7, 2023
1 parent 717232e commit cda0b55
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 55 deletions.
18 changes: 12 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ Read our [guidelines for writing a good changelog entry](https://github.com/biom
### Editors
### Formatter
### JavaScript APIs
### Linter
### Parser
### VSCode

## 1.1.2 (2023-09-07)

### Editors

#### Bug fixes

- Fixed a case where an empty JSON file would cause the LSP server to crash.

### Linter

#### Enhancements
Expand All @@ -34,12 +46,6 @@ Read our [guidelines for writing a good changelog entry](https://github.com/biom
export * as MY_NAMESPACE from "./lib.js";
```

#### Bug fixes


### Parser
### VSCode

## 1.1.1 (2023-09-07)

### Analyzer
Expand Down
82 changes: 41 additions & 41 deletions crates/rome_service/src/file_handlers/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,54 +247,54 @@ fn lint(params: LintParams) -> LintResults {
let has_lint = params.filter.categories.contains(RuleCategories::LINT);
let analyzer_options =
compute_analyzer_options(&params.settings, PathBuf::from(params.path.as_path()));
let Ok(value) = &root.value() else {
return LintResults {
diagnostics,
errors,
skipped_diagnostics,
};
};
let (_, analyze_diagnostics) = analyze(value, params.filter, &analyzer_options, |signal| {
if let Some(mut diagnostic) = signal.diagnostic() {
// Do not report unused suppression comment diagnostics if this is a syntax-only analyzer pass
if !has_lint && diagnostic.category() == Some(category!("suppressions/unused")) {
return ControlFlow::<Never>::Continue(());
}

let (_, analyze_diagnostics) = analyze(
&root.value().unwrap(),
params.filter,
&analyzer_options,
|signal| {
if let Some(mut diagnostic) = signal.diagnostic() {
// Do not report unused suppression comment diagnostics if this is a syntax-only analyzer pass
if !has_lint && diagnostic.category() == Some(category!("suppressions/unused"))
{
return ControlFlow::<Never>::Continue(());
}

diagnostic_count += 1;

// We do now check if the severity of the diagnostics should be changed.
// The configuration allows to change the severity of the diagnostics emitted by rules.
let severity = diagnostic
.category()
.filter(|category| category.name().starts_with("lint/"))
.map(|category| {
params
.rules
.and_then(|rules| rules.get_severity_from_code(category))
.unwrap_or(Severity::Warning)
})
.unwrap_or_else(|| diagnostic.severity());

if severity <= Severity::Error {
errors += 1;
}
diagnostic_count += 1;

// We do now check if the severity of the diagnostics should be changed.
// The configuration allows to change the severity of the diagnostics emitted by rules.
let severity = diagnostic
.category()
.filter(|category| category.name().starts_with("lint/"))
.map(|category| {
params
.rules
.and_then(|rules| rules.get_severity_from_code(category))
.unwrap_or(Severity::Warning)
})
.unwrap_or_else(|| diagnostic.severity());

if severity <= Severity::Error {
errors += 1;
}

if diagnostic_count <= params.max_diagnostics {
for action in signal.actions() {
if !action.is_suppression() {
diagnostic = diagnostic.add_code_suggestion(action.into());
}
if diagnostic_count <= params.max_diagnostics {
for action in signal.actions() {
if !action.is_suppression() {
diagnostic = diagnostic.add_code_suggestion(action.into());
}
}

let error = diagnostic.with_severity(severity);
let error = diagnostic.with_severity(severity);

diagnostics.push(rome_diagnostics::serde::Diagnostic::new(error));
}
diagnostics.push(rome_diagnostics::serde::Diagnostic::new(error));
}
}

ControlFlow::<Never>::Continue(())
},
);
ControlFlow::<Never>::Continue(())
});

diagnostics.extend(
analyze_diagnostics
Expand Down
2 changes: 1 addition & 1 deletion editors/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publisher": "biomejs",
"displayName": "Biome",
"description": "Biome LSP VS Code Extension",
"version": "1.2.1",
"version": "1.2.2",
"icon": "icon.png",
"activationEvents": [
"onLanguage:javascript",
Expand Down
2 changes: 1 addition & 1 deletion packages/@biomejs/biome/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@biomejs/biome",
"version": "1.1.1",
"version": "1.1.2",
"bin": "bin/biome",
"scripts": {
"postinstall": "node scripts/postinstall.js"
Expand Down
18 changes: 12 additions & 6 deletions website/src/content/docs/internals/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ Read our [guidelines for writing a good changelog entry](https://github.com/biom
### Editors
### Formatter
### JavaScript APIs
### Linter
### Parser
### VSCode

## 1.1.2 (2023-09-07)

### Editors

#### Bug fixes

- Fixed a case where an empty JSON file would cause the LSP server to crash.

### Linter

#### Enhancements
Expand All @@ -40,12 +52,6 @@ Read our [guidelines for writing a good changelog entry](https://github.com/biom
export * as MY_NAMESPACE from "./lib.js";
```

#### Bug fixes


### Parser
### VSCode

## 1.1.1 (2023-09-07)

### Analyzer
Expand Down

0 comments on commit cda0b55

Please sign in to comment.