Drop src-d org ref except for issues

Signed-off-by: Alexander Bezzubov <bzz@apache.org>
This commit is contained in:
Alexander Bezzubov 2020-03-19 11:10:03 +01:00 committed by Alexander
parent 697929e149
commit bc5e031cee
46 changed files with 60 additions and 58 deletions

3
.gitignore vendored
View File

@ -1,4 +1,4 @@
.linguist
.linguist*
benchmarks/output
.ci
Makefile.main
@ -9,3 +9,4 @@ build/
vendor/
java/lib/
.vscode/
.venv

View File

@ -98,7 +98,7 @@ jobs:
- sudo apt-get install -y --no-install-recommends clang g++ gcc gcc-multilib libc6-dev libc6-dev-i386 mingw-w64 patch xz-utils
- cd ${HOME}
- curl -sfSL ${OSXCROSS_URL} | tar -C ${HOME} -xzf -
- cd $GOPATH/src/github.com/src-d/enry
- cd $GOPATH/src/github.com/bzz/enry
script: make darwin-shared
deploy:
provider: releases

View File

@ -1,4 +1,4 @@
# enry [![GoDoc](https://godoc.org/github.com/src-d/enry?status.svg)](https://godoc.org/github.com/src-d/enry) [![Build Status](https://travis-ci.com/src-d/enry.svg?branch=master)](https://travis-ci.com/src-d/enry) [![codecov](https://codecov.io/gh/src-d/enry/branch/master/graph/badge.svg)](https://codecov.io/gh/src-d/enry)
# enry [![GoDoc](https://godoc.org/github.com/bzz/enry?status.svg)](https://godoc.org/github.com/bzz/enry) [![Build Status](https://travis-ci.org/bzz/enry.svg?branch=master)](https://travis-ci.org/bzz/enry) [![codecov](https://codecov.io/gh/bzz/enry/branch/master/graph/badge.svg)](https://codecov.io/gh/bzz/enry)
Programming language detector and toolbox to ignore binary or vendored files. *enry*, started as a port to _Go_ of the original [linguist](https://github.com/github/linguist) _Ruby_ library, that has an improved *2x performance*.
@ -18,10 +18,10 @@ Programming language detector and toolbox to ignore binary or vendored files. *e
# CLI
The recommended way to install the `enry` command-line tool is to either
[download a release](https://github.com/src-d/enry/releases) or run:
[download a release](https://github.com/bzz/enry/releases) or run:
```
(cd "$(mktemp -d)" && go mod init enry && go get github.com/src-d/enry/v2/cmd/enry)
(cd "$(mktemp -d)" && go mod init enry && go get github.com/bzz/enry/v2/cmd/enry)
```
*enry* CLI accepts similar flags (`--breakdown/--json`) and produce an output, similar to *linguist*:
@ -50,7 +50,7 @@ In a [Go module](https://github.com/golang/go/wiki/Modules),
import `enry` to the module by running:
```go
go get github.com/src-d/enry/v2
go get github.com/bzz/enry/v2
```
The rest of the examples will assume you have either done this or fetched the
@ -58,7 +58,7 @@ library into your `GOPATH`.
```go
// The examples here and below assume you have imported the library.
import "github.com/src-d/enry/v2"
import "github.com/bzz/enry/v2"
lang, safe := enry.GetLanguageByExtension("foo.go")
fmt.Println(lang, safe)
@ -94,7 +94,7 @@ langs := enry.GetLanguagesByFilename("Gemfile", []byte("<content>"), []string{})
## Java bindings
Generated Java bindings using a C shared library and JNI are available under [`java`](https://github.com/src-d/enry/blob/master/java).
Generated Java bindings using a C shared library and JNI are available under [`java`](https://github.com/bzz/enry/blob/master/java).
A library is published on Maven as [tech.sourced:enry-java](https://mvnrepository.com/artifact/tech.sourced/enry-java) for macOS and linux platforms. Windows support is planned under [src-d/enry#150](https://github.com/src-d/enry/issues/150).
@ -182,7 +182,7 @@ $ git clone https://github.com/github/linguist.git .linguist
$ cd .linguist; git checkout <release-tag>; cd ..
# put the new release's commit sha in the generator_test.go (to re-generate .gold test fixtures)
# https://github.com/src-d/enry/blob/13d3d66d37a87f23a013246a1b0678c9ee3d524b/internal/code-generator/generator/generator_test.go#L18
# https://github.com/bzz/enry/blob/13d3d66d37a87f23a013246a1b0678c9ee3d524b/internal/code-generator/generator/generator_test.go#L18
$ make code-generate
```
@ -197,7 +197,7 @@ To stay in sync, enry needs to be updated when a new release of the linguist inc
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.
When submitting a pull request syncing up to a new release, please make sure it only contains the changes in
the generated files (in [data](https://github.com/src-d/enry/blob/master/data) subdirectory).
the generated files (in [data](https://github.com/bzz/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).
@ -210,7 +210,7 @@ Separating all the necessary "manual" code changes to a different PR that includ
### Benchmark
All benchmark scripts are in [*benchmarks*](https://github.com/src-d/enry/blob/master/benchmarks) directory.
All benchmark scripts are in [*benchmarks*](https://github.com/bzz/enry/blob/master/benchmarks) directory.
#### Dependencies

View File

@ -10,7 +10,7 @@ import (
"path/filepath"
"testing"
"github.com/src-d/enry/v2/data"
"github.com/bzz/enry/v2/data"
)
type sample struct {

View File

@ -4,7 +4,7 @@ import (
"math"
"sort"
"github.com/src-d/enry/v2/internal/tokenizer"
"github.com/bzz/enry/v2/internal/tokenizer"
)
// classifier is the interface in charge to detect the possible languages of the given content based on a set of

View File

@ -14,8 +14,8 @@ import (
"sort"
"strings"
"github.com/src-d/enry/v2"
"github.com/src-d/enry/v2/data"
"github.com/bzz/enry/v2"
"github.com/bzz/enry/v2/data"
)
var (

View File

@ -6,8 +6,8 @@ import (
"path/filepath"
"strings"
"github.com/src-d/enry/v2/data"
"github.com/src-d/enry/v2/regex"
"github.com/bzz/enry/v2/data"
"github.com/bzz/enry/v2/regex"
)
// OtherLanguage is used as a zero value when a function can not return a specific language.

View File

@ -8,7 +8,7 @@ import (
"path/filepath"
"testing"
"github.com/src-d/enry/v2/data"
"github.com/bzz/enry/v2/data"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Code generated by github.com/bzz/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Code generated by github.com/bzz/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Code generated by github.com/bzz/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Code generated by github.com/bzz/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d
package data
@ -6,7 +6,7 @@ package data
import (
"regexp"
"github.com/src-d/enry/v2/data/rule"
"github.com/bzz/enry/v2/data/rule"
)
var ContentHeuristics = map[string]*Heuristics{

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Code generated by github.com/bzz/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Code generated by github.com/bzz/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Code generated by github.com/bzz/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Code generated by github.com/bzz/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d
package data

View File

@ -1,6 +1,6 @@
package data
import "github.com/src-d/enry/v2/data/rule"
import "github.com/bzz/enry/v2/data/rule"
// Heuristics implements a rule-based content matching engine.

View File

@ -4,7 +4,7 @@ import (
"regexp"
"testing"
"github.com/src-d/enry/v2/data/rule"
"github.com/bzz/enry/v2/data/rule"
"github.com/stretchr/testify/assert"
)

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Code generated by github.com/bzz/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Code generated by github.com/bzz/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Code generated by github.com/bzz/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Code generated by github.com/bzz/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d
package data

View File

@ -11,6 +11,6 @@
Upstream Linguist YAML files are used to generate datastructures for data
package.
*/
package enry // import "github.com/src-d/enry/v2"
package enry // import "github.com/bzz/enry/v2"
//go:generate make code-generate

2
go.mod
View File

@ -1,4 +1,4 @@
module github.com/src-d/enry/v2
module github.com/bzz/enry/v2
go 1.12

1
go.sum
View File

@ -4,6 +4,7 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/src-d/go-oniguruma v1.1.0 h1:EG+Nm5n2JqWUaCjtM0NtutPxU7ZN5Tp50GWrrV8bTww=
github.com/src-d/go-oniguruma v1.1.0/go.mod h1:chVbff8kcVtmrhxtZ3yBVLLquXbzCS6DrxQaAK/CeqM=
github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=

View File

@ -3,7 +3,7 @@ package data
import (
"regexp"
"github.com/src-d/enry/v2/data/rule"
"github.com/bzz/enry/v2/data/rule"
)
var ContentHeuristics = map[string]*Heuristics{

View File

@ -1,3 +1,3 @@
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Code generated by github.com/bzz/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: {{ getCommit }}

View File

@ -12,7 +12,7 @@ import (
"strconv"
"text/template"
"github.com/src-d/enry/v2/internal/tokenizer"
"github.com/bzz/enry/v2/internal/tokenizer"
)
type samplesFrequencies struct {

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Code generated by github.com/bzz/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Code generated by github.com/bzz/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Code generated by github.com/bzz/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Code generated by github.com/bzz/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d
package data
@ -6,7 +6,7 @@ package data
import (
"regexp"
"github.com/src-d/enry/v2/data/rule"
"github.com/bzz/enry/v2/data/rule"
)
var ContentHeuristics = map[string]*Heuristics{

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Code generated by github.com/bzz/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Code generated by github.com/bzz/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Code generated by github.com/bzz/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Code generated by github.com/bzz/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Code generated by github.com/bzz/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Code generated by github.com/bzz/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Code generated by github.com/bzz/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d
package data

View File

@ -1,4 +1,4 @@
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
// Code generated by github.com/bzz/enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d
package data

View File

@ -4,7 +4,7 @@ import (
"io/ioutil"
"log"
"github.com/src-d/enry/v2/internal/code-generator/generator"
"github.com/bzz/enry/v2/internal/code-generator/generator"
)
const (

View File

@ -5,7 +5,7 @@ package tokenizer
import (
"bytes"
"github.com/src-d/enry/v2/regex"
"github.com/bzz/enry/v2/regex"
)
// Tokenize returns lexical tokens from content. The tokens returned match what

View File

@ -2,7 +2,7 @@
package tokenizer
import "github.com/src-d/enry/v2/internal/tokenizer/flex"
import "github.com/bzz/enry/v2/internal/tokenizer/flex"
// Tokenize returns lexical tokens from content. The tokens returned match what
// the Linguist library returns. At most the first ByteLimit bytes of content are tokenized.

View File

@ -7,8 +7,8 @@ enablePlugins(GitVersioning)
sonatypeProfileName := "tech.sourced"
// pom settings for sonatype
homepage := Some(url("https://github.com/src-d/enry"))
scmInfo := Some(ScmInfo(url("https://github.com/src-d/enry"),
homepage := Some(url("https://github.com/bzz/enry"))
scmInfo := Some(ScmInfo(url("https://github.com/bzz/enry"),
"git@github.com:src-d/enry.git"))
developers += Developer("abeaumont",
"Alfredo Beaumont",

View File

@ -4,7 +4,7 @@
package main
import "C"
import "github.com/src-d/enry/v2"
import "github.com/bzz/enry/v2"
//export GetLanguage
func GetLanguage(filename string, content []byte) string {

View File

@ -5,7 +5,7 @@ import (
"path/filepath"
"strings"
"github.com/src-d/enry/v2/data"
"github.com/bzz/enry/v2/data"
)
const binSniffLen = 8000