Merge branch 'master' into spelling

This commit is contained in:
Alex
2022-12-03 10:48:23 +01:00
committed by GitHub
44 changed files with 18303 additions and 10643 deletions

View File

@ -61,7 +61,7 @@ To make a guess only based on the content of the file or a text snippet, use
### By file
The most accurate guess would be one when both, the file name and the content are available:
The most accurate guess would be when both, a file name and it's content are available:
- `GetLanguagesByContent` only uses file extension and a set of regexp-based content heuristics.
- `GetLanguages` uses the full set of matching strategies and is expected to be most accurate.
@ -156,7 +156,7 @@ Generated Rust bindings using a C static library are available at https://github
## Divergences from Linguist
The `enry` library is based on the data from `github/linguist` version **v7.20.0**.
The `enry` library is based on the data from `github/linguist` version **v7.21.0**.
Parsing [linguist/samples](https://github.com/github/linguist/tree/master/samples) the following `enry` results are different from the Linguist:
@ -212,8 +212,8 @@ To run the tests use:
go test ./...
Setting `ENRY_TEST_REPO` to the path to existing checkout of Linguist will avoid cloning it and sepeed tests up.
Setting `ENRY_DEBUG=1` will provide insight in the Bayesian classifier building done by `make code-generate`.
Setting `ENRY_TEST_REPO` to a path to the existing checkout of the Linguist will avoid cloning it and speeds tests up.
Setting `ENRY_DEBUG=1` will provide insight into the Bayesian classifier built during `make code-generate`.
### Sync with github/linguist upstream
@ -237,12 +237,12 @@ To stay in sync, enry needs to be updated when a new release of the linguist inc
- [vendor.yml](https://github.com/github/linguist/blob/master/lib/linguist/vendor.yml)
- [documentation.yml](https://github.com/github/linguist/blob/master/lib/linguist/documentation.yml)
There is no automation for detecting the changes in the linguist project, so this process above has to be done manually from time to time.
There now is automation for detecting the changes in the upstream Linguist project: every day Github CI runs [a job](.github/workflows/sync-linguist.yml) that will create a PR to this repo for each new Linguist release. It will include all the steps from the above.
When submitting a pull request syncing up to a new release, please make sure it only contains the changes in
When submitting a pull request syncing up to a new release manually, please make sure it only contains the changes in
the generated files (in [data](https://github.com/go-enry/go-enry/blob/master/data) subdirectory).
Separating all the necessary "manual" code changes to a different PR that includes some background description and an update to the documentation on ["divergences from linguist"](#divergences-from-linguist) is very much appreciated as it simplifies the maintenance (review/release notes/etc).
Separating all the necessary "manual" code changes to a different PR that includes some background description and an update to the documentation on ["divergences from linguist"](#divergences-from-linguist) is encouraged and very much appreciated, as it simplifies the maintenance (review/release notes/etc).
## Misc