This commit is contained in:
Jeroen Engels 2024-06-14 17:51:30 +02:00
parent 46c08ed757
commit 1f4a4f60bb
4 changed files with 17 additions and 6 deletions

View File

@ -2,6 +2,16 @@
## [Unreleased]
## [2.14.0] - 2024-06-14
Support new visitors that visit "extra files".
- Added `Review.Rule.withExtraFilesModuleVisitor` and `Review.Rule.withExtraFilesProjectVisitor` to request access to arbitrary files that the project doesn't analyze by default.
- Added new functions to report an error for an extra file and `Review.Rule.errorForExtraFile` and `Review.Rule.errorForExtraFileWithFix`.
- Added new functions to test errors reported for extra files: `Review.Test.expectErrorsForExtraFile` and `Review.Test.extraFileErrors`.
- Added new module `Review.FilePattern` to specify the files to analyze.
- Added new functions in `Review.Project` to add/update/remove/get (extra) files
- Moved the logic of the diffing of `Review.Project.Project` from the CLI to the package.
## [2.13.2] - 2024-04-09
Fixed an issue where the result of a module name lookup for let variables was sometimes incorrect. [#171](https://github.com/jfmengels/elm-review/pull/171)
@ -169,7 +179,8 @@ Help would be appreciated to fill the blanks!
[`Review.Rule.errorFixFailure`]: https://package.elm-lang.org/packages/jfmengels/elm-review/latest/Review-Rule#errorFixFailure
[`Review.Test.ignoredFilesImpactResults`]: https://package.elm-lang.org/packages/jfmengels/elm-review/latest/Review-Rule-Test#ignoredFilesImpactResults
[Unreleased]: https://github.com/jfmengels/elm-review/compare/v2.13.2...HEAD
[Unreleased]: https://github.com/jfmengels/elm-review/compare/v2.14.0...HEAD
[2.14.0]: https://github.com/jfmengels/elm-review/releases/tag/2.14.0
[2.13.2]: https://github.com/jfmengels/elm-review/releases/tag/2.13.2
[2.13.1]: https://github.com/jfmengels/elm-review/releases/tag/2.13.1
[2.13.0]: https://github.com/jfmengels/elm-review/releases/tag/2.13.0

View File

@ -116,7 +116,7 @@ Before you start adding rules or an unfamiliar existing configuration, I suggest
## Write your own rule
You can write your own rule using this package's API and [`elm-syntax`](https://package.elm-lang.org/packages/stil4m/elm-syntax/7.2.1/).
Check out the [`Review.Rule`](https://package.elm-lang.org/packages/jfmengels/elm-review/2.13.2/Review-Rule/) documentation for how to get started.
Check out the [`Review.Rule`](https://package.elm-lang.org/packages/jfmengels/elm-review/2.14.0/Review-Rule/) documentation for how to get started.
**NOTE**: If you want to **create a package** containing `elm-review` rules, I highly recommend using the
[CLI's](https://github.com/jfmengels/node-elm-review/) `elm-review new-package` subcommand. This will create a new package that will help you use the best practices and give you helpful tools like easy auto-publishing. More information is available in the maintenance file generated along with it.
@ -236,7 +236,7 @@ It does provide 2 systems that I think are better alternatives for the health of
### Configuring exceptions
You can [configure exceptions](https://package.elm-lang.org/packages/jfmengels/elm-review/2.13.2/Review-Rule/#configuring-exceptions),
You can [configure exceptions](https://package.elm-lang.org/packages/jfmengels/elm-review/2.14.0/Review-Rule/#configuring-exceptions),
which consists of marking specific directories or files as not relevant to a rule or set of rules, preventing errors to be reported for those.
It is a good fit if you wish for `elm-review` to not report errors in vendored or generated code,
@ -282,7 +282,7 @@ the codebase. You can use this to gain insight into your codebase, or provide in
powerful integrations.
To make use of this feature, run `elm-review --extract --report=json` with a configuration containing a rule that uses
[`Rule.withDataExtractor`](https://package.elm-lang.org/packages/jfmengels/elm-review/2.13.2/Review-Rule/#withDataExtractor).
[`Rule.withDataExtractor`](https://package.elm-lang.org/packages/jfmengels/elm-review/2.14.0/Review-Rule/#withDataExtractor).
The result for a rule will be stored under `<json>.extracts.<YourRuleName>`. To access it, you can then pipe the result
into either a `Node.js` script, a tool that expects JSON, or [`jq`](https://stedolan.github.io/jq/) as in the example below.

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@
"name": "jfmengels/elm-review",
"summary": "Analyzes Elm projects, to help find mistakes before your users find them.",
"license": "BSD-3-Clause",
"version": "2.13.2",
"version": "2.14.0",
"exposed-modules": [
"Review.Rule",
"Review.ModuleNameLookupTable",