With go1.11 `go test` in GOPATH mode somehow
seems to depend on GCC. See https://github.com/golang/go/issues/28065
This change only enables cgo for CI profiles that
need it. Those are the ones that seem to fail
on TravisCI now, presumably due to some compiler
version missmatch.
That is a workaround and does not happen in GO11MODULE mode.
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
This includes next main changes:
- default: print only Programming and Markup types
as Linguist does
- `-prog` option replaced with `-all`, to allow for
previous behavior
- always use GetLanguage as main source of truth
that fixes#204 and perf will be restored under #212
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
Reason is that gofmt can change between versions e.g
see https://go-review.googlesource.com/c/go/+/122295/
and this would avoid breaking tests and edit wars
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
Sync \w Github Linguist v7.2.0
Includes new way of handling `heuristics.yml` and
all `./data/*` re-generated using Github Linguist [v7.2.0](https://github.com/github/linguist/releases/tag/v7.2.0)
release tag.
- many new languages
- better vendoring detection
- update doc on update&known issues.
Refactoring, consisting of
- remove unused method `isAuxiliaryLanguage` and `FileCountList`
in order to reduce public API surfaces (go/java)
- add GoDoc to public APIs
- ci: java profile use latest go src
It also now mimics https://docs.travis-ci.com/user/languages/go/#go-import-path
for non-go build image, as code relies on internal imports.
TEST PLAN:
- make test
Although this package is internal, it still exports an API and deserves some
comments. Serves in partial satisfaction of #195.
Signed-off-by: M. J. Fromberger <michael.j.fromberger@gmail.com>
Addresses #196. Several of the tokenizer's processing steps wind up editing the
source, and we don't want those changes to be observed by the caller, which may
use the source for other purposes afterward.
Signed-off-by: M. J. Fromberger <michael.j.fromberger@gmail.com>
At present this test fails, since the tokenizer replaces text in shared slices
of the input. A subsequent commit will fix that.
Signed-off-by: M. J. Fromberger <michael.j.fromberger@gmail.com>
The writeStringLn function repeats what fmt.Fprintln already does. Since this
package already imports fmt, removing it reduces mass.
Signed-off-by: M. J. Fromberger <michael.j.fromberger@gmail.com>
* exclude build artifacts from git
* build: simplify building by using src-d/ci
* bench: simplify&fix shell runners
* build: simplify benchmarks* targets
* test: remove dependency on single test suite
* doc: rel image link + linguist cli difference highlight
* suggestions from code review
* bench: add fail fast to all shell runners
Signed-off-by: Alexander Bezzubov <bzz@apache.org>