Commit Graph

95 Commits

Author SHA1 Message Date
Alex Bezzubov
bd3630419c test: add new corner cases for linguist v7.26
test plan
 - go test -run '^Test_EnryOnLinguistCorpus$' github.com/go-enry/go-enry/v2
2023-09-22 14:46:01 +02:00
github-actions
84c996dfcf Updated Linguist to v7.26.0 2023-09-14 00:06:22 +02:00
Alex Bezzubov
d0f92a650a doc: remove Codeconv badge (requires access to all GH repos) 2023-03-04 19:39:29 +01:00
Alex Bezzubov
11a8080935 doc: fix CI badge 2023-03-04 18:54:14 +01:00
Alex Bezzubov
9ce235f39e test: add new corner cases for linguist v7.23
test plan
 - go test -run '^Test_EnryOnLinguistCorpus$' github.com/go-enry/go-enry/v2
2023-03-03 23:38:02 +01:00
github-actions
afe3bdf45a Updated Linguist to v7.23.0 2023-03-03 14:07:28 +01:00
Alex Bezzubov
3aeb9879da heuristics regexp engine configurable #2, skip rules at runtime 2023-01-19 19:50:22 +01:00
Alex
2059129b5e
Merge branch 'master' into spelling 2022-12-03 10:48:23 +01:00
Alex Bezzubov
86cae02425 test: cover GetLanguageByContent confusing edge cases
And clarify documentation wording, based on discussion
at https://github.com/go-enry/go-enry/issues/145

test plan:
 * go test -run '^Test_EnryTestSuite$' -testify.m '^(TestGetLanguageByContent)$' ./...
2022-12-01 22:10:01 +01:00
Alex Bezzubov
e4cc955976 doc: improve wording in dev section w.r.t env vars 2022-10-23 10:47:17 +02:00
Alex Bezzubov
b33717cc4f doc: mention linguist sync automation 2022-10-23 10:42:10 +02:00
Josh Soref
95c80c474b spelling: github
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-08-08 23:31:59 -04:00
github-actions
60edc790b3 Updated Linguist to v7.21.0 2022-06-09 20:09:50 +00:00
github-actions
9f73cdf211 Updated Linguist to v7.20.0 2022-04-05 20:12:53 +00:00
Lauris BH
ae2b0576a7
Add check for non-backtracking subexpressions 2022-03-21 13:54:11 +02:00
github-actions
8eac4cab85 Updated Linguist to v7.19.0 2022-03-03 20:08:49 +00:00
github-actions
2febea0489 Updated Linguist to v7.18.0 2021-12-15 20:08:13 +00:00
Alex Bezzubov
9dbb8ccbaf doc: bump linguist version 2021-11-16 09:36:42 +01:00
Lauris BH
0affa3ccca Update to Linguist v7.16.1 2021-09-25 23:57:50 +03:00
Luke Francl
a81924ae12 Update README 2021-04-26 15:41:10 -07:00
Alex
2ddd4985bc
doc: mention Rust bindings and IsGenerated 2021-04-24 08:56:06 +02:00
Lauris BH
c40b34c351 Sync with Liguist v7.13.0 2021-03-07 18:02:04 +02:00
Lauris BH
497e2f85d3 Sync with github/linguist version v7.12.2 2021-01-17 14:10:38 +02:00
Alexander
3faf9450da
Merge pull request #40 from lafriks-fork/feat/strategy_xml
Add XML strategy
2020-12-02 00:10:52 +01:00
Lauris BH
8ac98f4b77 Update readme 2020-11-15 15:48:03 +02:00
Lauris BH
289ac3d9f0 Sync with linguist 7.12.1 2020-11-15 14:32:56 +02:00
Lauris BH
bc76dd38b0 sync to the latest github/linguist v7.11.1 2020-10-12 12:32:48 +03:00
Lauris BH
7c562a6c34 sync to the latest github/linguist v7.11.0 2020-09-17 10:34:41 +03:00
Miguel Molina
8ff885a3a8
implement IsGenerated helper to filter out generated files
Closes #17

Implements the IsGenerated helper function to filter out generated
files using the rules and matchers in:
- https://github.com/github/linguist/blob/master/lib/linguist/generated.rb

Since the vast majority of matchers have very different logic, it cannot
be autogenerated directly from linguist like other logics in enry, so it's
translated by hand.

There are three different types of matchers in this implementation:
- By extension, which mark as generated based only in the extension. These
  are the fastest matchers, so they're done first.
- By file name, which matches patterns against the filename. These
  are performed in second place. Unlike linguist, we try to use string
  functions instead of regexps as much as possible.
- Finally, the rest of the matchers, which go into the content and try
  to identify if they're generated or not based on the content. Unlike
  linguist, we try to only read the content we need and not split it
  all unless it's necessary and use byte functions instead of regexps
  as much as possible.

Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
2020-05-28 08:55:13 +02:00
Máximo Cuadros
b851ee83ad
IsTest function for top 10 languages 2020-04-06 16:23:48 +02:00
Alexander Bezzubov
4fb0b4cc5e
doc: add coloring to the ToC
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
2020-03-31 11:20:06 +02:00
Lauris BH
97a26011a9 Return group color if language has none 2020-03-31 09:30:27 +03:00
Alexander Bezzubov
6a09a2a684
doc: update badges
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
2020-03-30 19:42:03 +02:00
Alexander Bezzubov
64d02e5441
doc: re-structure README by use case, update links
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
2020-03-30 19:31:53 +02:00
Lauris BH
9030d3671b sync to the latest github/linguist v7.9.0 2020-03-30 01:25:57 +03:00
Máximo Cuadros
84efad7693
*: module rename to go-enry/go-enry/v4 2020-03-19 17:31:29 +01:00
Alexander Bezzubov
bc5e031cee Drop src-d org ref except for issues
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
2020-03-19 14:04:36 +01:00
Alexander Bezzubov
c7272bd4f1
address review feedback
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
2019-10-29 18:11:35 +01:00
Alexander Bezzubov
324cb1d7c9
doc: cleanup and simplify
Make it shorter and more structured, update ToC
remove ref from links, etc

Signed-off-by: Alexander Bezzubov <bzz@apache.org>
2019-10-29 15:49:16 +01:00
M. J. Fromberger
bf29b9a924 Use conditional composition instead of sequential.
Signed-off-by: M. J. Fromberger <michael.j.fromberger@gmail.com>
2019-10-07 09:39:07 -07:00
M. J. Fromberger
7763fcde19 docs: Update CLI installation instructions.
Fixes #243. The default behaviour for `go get` has changed slightly and we now
need to either provide a module context or disable modules for installation to
work correctly.

Also remove a now-obsolete reference to the source{d} engine CLI.

Signed-off-by: M. J. Fromberger <michael.j.fromberger@gmail.com>
2019-10-07 08:34:50 -07:00
M. J. Fromberger
e9af1d7187 Improve download and usage examples in README.md.
Addresses #239. The `go get` command fetches the command-line tool, and does
not match the import path for the library. To make things more clear:

1. Mention explicitly that `go get` fetches the CLI. Also, to avoid potential
   issues with pre-modules Go versions, do the fetch in /tmp.

2. Include an import path explicitly in the source examples.

3. Mention explicitly how to import enry into a modules build.

Signed-off-by: M. J. Fromberger <michael.j.fromberger@gmail.com>
2019-08-07 12:04:41 -07:00
Alexander Bezzubov
9bd22dae54
doc: fix typo in MD link
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
2019-08-06 17:22:11 +02:00
Lauris Bukšis-Haberkorns
4e3e15e80d
Sync to linguist v7.5.1
Signed-off-by: Lauris BH <lauris@nix.lv>
2019-08-06 17:18:01 +03:00
Alexander Bezzubov
e1fbfaea60
doc: code review feedback
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
2019-08-06 11:57:34 +02:00
Alexander Bezzubov
85641846f8
doc: add documentation some ❤️
- add ToC
 - hide less relevant section under th #misc
 - update examples
 - clarify linguist sync practice

Signed-off-by: Alexander Bezzubov <bzz@apache.org>
2019-08-05 12:42:16 +02:00
Alexander Bezzubov
20c6d2845a
build: gopkg.in -> github.com imports
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
2019-04-12 11:49:16 +02:00
Alexander
7a6e8ca783
Merge pull request #214 from bzz/fix-cli-accuracy
CLI: sync report logic \w Linguist
2019-04-09 16:32:52 +02:00
M. J. Fromberger
bad147cb72
Update README.md
Co-Authored-By: bzz <bzz@users.noreply.github.com>
2019-04-08 18:00:43 +02:00
Alexander Bezzubov
416afb45fc
doc: better wording in 'divergences from linguist' section
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
2019-04-08 15:58:46 +02:00