Skip to content

Commit

Permalink
fix(check): correct diagnostic count (#61)
Browse files Browse the repository at this point in the history
* fix(check): correct diagnostic count

* docs: CHANGELOG was out of date. Added entries

* Revert "fix(check): correct diagnostic count"

This reverts commit f3ef411.

* perf: don't collect/clone diagnostics

* Update CHANGELOG.md
  • Loading branch information
a-frantz authored Jan 23, 2025
1 parent 5cde395 commit fe94d12
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 14 deletions.
44 changes: 32 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Changed

* By deafult, when checking a local file, suppress diagnostics from remote files. Added a `--show-remote-diagnostics`
flag to recreate the older behavior ([#59](https://github.com/stjude-rust-labs/sprocket/pull/59)).
* Always emit any diagnostics with a `Severity::Error` regardless of other CL options that might suppress the diagnostic
([#59](https://github.com/stjude-rust-labs/sprocket/pull/59)).

### Fixed

* Bug introduced in [#59](https://github.com/stjude-rust-labs/sprocket/pull/59) which sometimes caused the exit message
to have an incorrect count of Notes and Warnings ([#61](https://github.com/stjude-rust-labs/sprocket/pull/61)).

## 0.10.1 - 01-23-2025

### Fixed

* URLs can be checked/linted ([#58](https://github.com/stjude-rust-labs/sprocket/pull/58)).

### Added

* Added a `Dockerfile` and automation to release Docker images with each Sprocket version ([#56](https://github.com/stjude-rust-labs/sprocket/pull/56)).

## 0.10.0 - 01-17-2025
Expand Down Expand Up @@ -59,52 +79,52 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Added `analyzer` subcommand to sprocket ([#9](https://github.com/stjude-rust-labs/sprocket/pull/9)).
- Updated dependencies to latest ([#9](https://github.com/stjude-rust-labs/sprocket/pull/9)).
* Added `analyzer` subcommand to sprocket ([#9](https://github.com/stjude-rust-labs/sprocket/pull/9)).
* Updated dependencies to latest ([#9](https://github.com/stjude-rust-labs/sprocket/pull/9)).

### Changed

- Update to version 0.7.0 of `wdl` crate. This pulls in many new lint rules.
* Update to version 0.7.0 of `wdl` crate. This pulls in many new lint rules.

## 0.5.0 - 07-17-2024

### Changed

- Update to version 0.6.0 of `wdl` crate.
* Update to version 0.6.0 of `wdl` crate.

## 0.4.0 - 07-01-2024

### Added

- `--except` arg to `check --lint` and `lint` subcommands.
* `--except` arg to `check --lint` and `lint` subcommands.

### Changed

- Update to version 0.5.0 of `wdl` crate. This enables lint directive comments (AKA `#@` comments) among other new features.
* Update to version 0.5.0 of `wdl` crate. This enables lint directive comments (AKA `#@` comments) among other new features.

## 0.3.0 - 06-18-2024

### Added

- `check` subcommand with `--lint` parameter
* `check` subcommand with `--lint` parameter

### Changed

- Update to version 0.4.0 of `wdl` crate. This features a new parser implementation
* Update to version 0.4.0 of `wdl` crate. This features a new parser implementation

## 0.2.1 - 06-05-2024

### Fixed

- exit code `2` if there are no parse errors or validation failures, but there are lint warnings.
- exit code `1` if there are parse errors or validation failures; exit code `0` means there were no concerns found at all.
* exit code `2` if there are no parse errors or validation failures, but there are lint warnings.
* exit code `1` if there are parse errors or validation failures; exit code `0` means there were no concerns found at all.

## 0.2.0 - 06-03-2024

### Added

- `explain` command
* `explain` command

### Changed

- Update to version 0.3.0 of `wdl` crate. This pulls in new lint rules.
* Update to version 0.3.0 of `wdl` crate. This pulls in new lint rules.
5 changes: 3 additions & 2 deletions src/commands/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,9 @@ pub async fn check(args: CheckArgs) -> anyhow::Result<()> {
for diagnostic in diagnostics.iter() {
match diagnostic.severity() {
Severity::Error => error_count += 1,
Severity::Warning => warning_count += 1,
Severity::Note => note_count += 1,
Severity::Warning if !suppress => warning_count += 1,
Severity::Note if !suppress => note_count += 1,
_ => {}
}
}
}
Expand Down

0 comments on commit fe94d12

Please sign in to comment.