Luke Francl
9c452db16f
fix link
2021-11-01 16:10:22 -07:00
Luke Francl
fa3f723873
Improve PR body with release notes and compare view
2021-11-01 16:06:41 -07:00
Luke Francl
03b31eb4ce
Update internal/code-generator/main.go
...
Co-authored-by: Lauris BH <lauris@nix.lv>
2021-10-13 10:30:19 -07:00
Luke Francl
57c5940dbe
Update common.go
...
Thanks @lafriks for catching this!
Co-authored-by: Lauris BH <lauris@nix.lv>
2021-10-12 16:20:14 -07:00
Luke Francl
02878b9c9f
Rename CodemirrorMode to CodeMirrorMode
...
It is a bit of a Rubyism to translate "CodeMirror Mode" into "codemirror_mode".
This is more in line with Go practices.
2021-10-12 16:18:33 -07:00
Luke Francl
b6b72c6c08
Add documentation to LanguageInfo struct fields
...
These are adapted from https://github.com/github/linguist/blob/master/lib/linguist/languages.yml
2021-10-12 16:13:59 -07:00
Luke Francl
6212f1fcb4
Remove name -> LanguageInfo mapping per code review
...
The GetLanguageInfo method is now implemented in terms of GetLanguageInfoByID.
This is possible because you can use GetLanguageID to get the ID for a language.
2021-10-12 13:29:39 -07:00
Luke Francl
6279d53f66
clean up whitespace in template
2021-10-11 14:20:25 -07:00
Luke Francl
4bde6c61a1
remove obsolete TODO
2021-10-11 14:06:29 -07:00
Luke Francl
b248b21349
Expose LanguageInfo with all Linguist data
...
As discussed in https://github.com/go-enry/go-enry/issues/54 , this provides an
API for accessing a LanguageInfo struct which is populated with all the data
from the Linguist YAML source file. Functions are provided to access the
LanguageInfo by name or ID.
The other top-level functions like GetLanguageExtensions, GetLanguageGroup, etc.
could in principle be implemented using this structure, which would simplify the
code generation. But that would be a big change so I didn't do any of that.
Perhaps in the next major version something like that would make sense.
2021-10-11 13:32:29 -07:00
Luke Francl
bd95ff290b
Update linguist commit
2021-10-08 15:59:21 -07:00
Luke Francl
da43eff66d
Add PR title
2021-10-08 15:18:02 -07:00
Luke Francl
12d12a6568
Run once a day
2021-10-08 15:14:36 -07:00
Luke Francl
e5a59053d9
newline
2021-10-08 15:05:56 -07:00
Luke Francl
dc30500505
set source branch for PR
2021-10-08 15:00:53 -07:00
Luke Francl
18ba08ce22
need outputs
2021-10-08 14:53:47 -07:00
Luke Francl
91df2121b1
try true rather than 'true'
2021-10-08 14:50:08 -07:00
Luke Francl
73a29fd324
add a tag override for testing
2021-10-08 14:39:00 -07:00
Luke Francl
202ca6a675
tweak commit step for debugging
2021-10-08 14:27:46 -07:00
Luke Francl
8b3fc58258
sigh use -z
2021-10-08 14:14:32 -07:00
Luke Francl
c6f7913c28
remove extra whitespace, check $latest
2021-10-08 14:10:59 -07:00
Luke Francl
7def8c82ce
this shouldn't be required to stop the workflow
2021-10-08 12:20:28 -07:00
Luke Francl
f0b2a73b5b
fix branch_name
2021-10-08 11:56:56 -07:00
Luke Francl
3fae59fb31
improve error handling, save branch name for push
2021-10-08 11:55:06 -07:00
Luke Francl
e86c6b862f
correct variable assignment
2021-10-08 11:46:12 -07:00
Luke Francl
0d5322628e
remove comment from shell pipeline
2021-10-08 11:42:59 -07:00
Luke Francl
7d8cb546b7
First pass at Linguist automation
2021-10-08 11:33:52 -07:00
Alex
adb553dc50
Merge pull request #60 from lafriks-fork/feat/linguist_v7.16.1
...
Update to Linguist v7.16.1
2021-09-26 11:20:01 +02:00
Lauris BH
0affa3ccca
Update to Linguist v7.16.1
2021-09-25 23:57:50 +03:00
Alex
0ae768336f
Merge pull request #58 from lafriks-fork/feat/improve_shebang
...
Improve env shebang parsing to detect correct interpreter
2021-09-25 22:55:28 +02:00
Alex
effee97b6a
Merge pull request #59 from lafriks-fork/feat/golang_v1.17
...
ci: update go versions
2021-09-25 22:53:30 +02:00
Lauris BH
2d3e1ea236
ci: update go versions
2021-09-25 19:28:10 +03:00
Lauris BH
4686615d9e
Improve shebang parsing to detect correct interpreter
2021-09-25 19:24:44 +03:00
Alex
7c24e3d5d2
Merge pull request #56 from rykov/fix-shebang-env
...
Fixed GetLanguagesByShebang for paths with “env”
2021-06-25 17:46:15 +02:00
Michael Rykov
58f8dccbcf
Fixed GetLanguagesByShebang for paths with “env”
2021-06-19 00:49:05 +08:00
Alex
335b4a64d8
Merge pull request #53 from go-enry/mcuadros-patch-1
...
ci: update go version
2021-06-18 16:45:29 +02:00
Alex
be3b43a42e
Merge pull request #52 from look/look/update-linguist-again
...
Update generated code for Linguist 7.14.0
2021-06-18 16:45:05 +02:00
Máximo Cuadros
6511190bd8
ci: update go version
2021-05-18 04:00:27 +02:00
Luke Francl
a81924ae12
Update README
2021-04-26 15:41:10 -07:00
Luke Francl
dfb8041dcc
Update generated code for Linguist 7.14.0
2021-04-26 09:36:25 -07:00
Alex
a724bce4a1
Merge pull request #49 from go-enry/bzz-doc-facelift
...
Docs: mention Rust bindings and IsGenerated
2021-04-24 09:01:10 +02:00
Alex
2ddd4985bc
doc: mention Rust bindings and IsGenerated
2021-04-24 08:56:06 +02:00
Alex
7168084e5e
Merge pull request #44 from zeripath/speed-up-is-vendor
...
Make IsVendor quicker
2021-04-24 08:35:22 +02:00
Alex
0a9864e6ec
Merge pull request #46 from look/look/add-language-id
...
Add GetLanguageID function
2021-04-24 08:32:32 +02:00
Andrew Thornton
20726a1de3
Make IsVendor quicker
...
Although iterating across the regexps is quicker than naively concatenating them,
it is still quite slow.
This PR proposes a slightly cleverer solution.
First instead of just concatenating with groups this PR uses non-capturing groups.
This speeds up the regexp processing.
Secondly we group the regexps in to 3 groups - those that have to be at the start,
those that are segments or at the start and the rest. This makes a considerable speed
improvement.
Thirdly the regexps are sorted within those groups - which also speeds things up.
All in all for a non-vendored file this makes IsVendor around twice as fast.
Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-04-23 10:18:28 +01:00
Luke Francl
cabfdaffc0
Update GetLanguageID to return a found boolean per code review
2021-04-22 16:55:42 -07:00
6543
d2d4c32d4d
Extend & simplify the test for IsVendor ( #45 )
2021-04-22 22:24:27 +02:00
Alex
b60e5c6f5a
Merge pull request #47 from look/look/mimic-linguist-detect
...
Rewrite GetLanguages to work like Linguist.detect
2021-04-22 21:38:22 +02:00
Máximo Cuadros
11cbde8956
Merge pull request #48 from look/look/rm-travis
...
Remove .travis.yml
2021-04-17 01:10:19 +02:00
Luke Francl
ed7a1e67b4
Remove .travis.yml
...
This file doesn't appear to be used any more, since the builds are run using
GitHub Actions.
This file is affected by the recent Codecov Bash Uploader exploit[1], but since it
hasn't been running, I don't think the project is affected.
[1] https://about.codecov.io/security-update/
2021-04-15 15:11:39 -07:00