├── .gitignore ├── vendor └── gopkg.in │ └── src-d │ └── enry.v1 │ ├── java │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ ├── key.asc.enc │ ├── .gitignore │ ├── Makefile │ ├── src │ │ ├── main │ │ │ └── java │ │ │ │ └── tech │ │ │ │ └── sourced │ │ │ │ └── enry │ │ │ │ ├── Guess.java │ │ │ │ └── GoUtils.java │ │ └── test │ │ │ └── java │ │ │ └── tech │ │ │ └── sourced │ │ │ └── enry │ │ │ └── EnryTest.java │ ├── README.md │ └── build.sbt │ ├── MAINTAINERS │ ├── enry.go │ ├── .gitignore │ ├── benchmarks │ ├── histogram │ │ └── distribution.png │ ├── run.sh │ ├── parse.sh │ ├── csv │ │ ├── enry-distribution.csv │ │ ├── linguist-distribution.csv │ │ ├── enry-total.csv │ │ └── linguist-total.csv │ ├── run-benchmarks.sh │ ├── soft-hard-info.txt │ ├── plot-histogram.gp │ ├── linguist-total.rb │ └── linguist-samples.rb │ ├── internal │ ├── code-generator │ │ ├── assets │ │ │ ├── commit.go.tmpl │ │ │ ├── header.go.tmpl │ │ │ ├── type.go.tmpl │ │ │ ├── mimeType.go.tmpl │ │ │ ├── filename.go.tmpl │ │ │ ├── vendor.go.tmpl │ │ │ ├── interpreter.go.tmpl │ │ │ ├── documentation.go.tmpl │ │ │ ├── alias.go.tmpl │ │ │ ├── extension.go.tmpl │ │ │ ├── frequencies.go.tmpl │ │ │ └── content.go.tmpl │ │ ├── generator │ │ │ ├── test_files │ │ │ │ ├── commit.gold │ │ │ │ ├── documentation.gold │ │ │ │ ├── interpreter.gold │ │ │ │ ├── filename.gold │ │ │ │ └── vendor.gold │ │ │ ├── linguist-commit.go │ │ │ ├── langinfo.go │ │ │ ├── vendor.go │ │ │ ├── documentation.go │ │ │ ├── mimeType.go │ │ │ ├── types.go │ │ │ ├── generator.go │ │ │ ├── aliases.go │ │ │ ├── interpreters.go │ │ │ ├── filenames.go │ │ │ ├── extensions.go │ │ │ ├── samplesfreq.go │ │ │ └── generator_test.go │ │ └── main.go │ └── tokenizer │ │ ├── tokenize_test.go │ │ └── tokenize.go │ ├── data │ ├── commit.go │ ├── documentation.go │ ├── interpreter.go │ ├── filename.go │ └── vendor.go │ ├── DCO │ ├── classifier.go │ ├── Makefile │ ├── utils.go │ ├── utils_test.go │ ├── shared │ └── enry.go │ ├── .travis.yml │ ├── cli │ └── enry │ │ └── main.go │ └── benchmark_test.go ├── issues ├── eclipse.txt ├── tdf.txt ├── dell.txt ├── gentoo.txt └── yandex.txt ├── testdata └── README.md ├── issues2019 ├── booking.txt ├── netflix.txt ├── minio.txt ├── mailru.txt ├── 2gis.txt ├── VKCOM.txt ├── jupyter.txt ├── amazon.txt ├── ansible.txt ├── spotify.txt ├── yandex.txt ├── wikimedia.txt ├── adobe.txt ├── cloudflare.txt ├── redhat.txt ├── twitter.txt ├── oracle.txt └── vmware.txt ├── LICENSE ├── utils.go └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | token 2 | output/ 3 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/java/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version = 0.13.16 -------------------------------------------------------------------------------- /issues/eclipse.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quasilyte/repolint/HEAD/issues/eclipse.txt -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Denys Smirnov (@dennwc) 2 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/enry.go: -------------------------------------------------------------------------------- 1 | package enry // import "gopkg.in/src-d/enry.v1" 2 | 3 | //go:generate make code-generate 4 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/.gitignore: -------------------------------------------------------------------------------- 1 | .linguist 2 | benchmarks/output 3 | .ci 4 | Makefile.main 5 | .shared 6 | .idea 7 | .docsrv-resources -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/java/key.asc.enc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quasilyte/repolint/HEAD/vendor/gopkg.in/src-d/enry.v1/java/key.asc.enc -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/benchmarks/histogram/distribution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quasilyte/repolint/HEAD/vendor/gopkg.in/src-d/enry.v1/benchmarks/histogram/distribution.png -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/benchmarks/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | benchmarks/run-benchmarks.sh && make benchmarks-slow && \ 4 | benchmarks/parse.sh && benchmarks/plot-histogram.gp 5 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/benchmarks/parse.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd benchmarks/output && go run ../parser/main.go -outdir ../csv && \ 4 | cd ../csv && go run ../parser/main.go -distribution 5 | 6 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/assets/commit.go.tmpl: -------------------------------------------------------------------------------- 1 | package data 2 | 3 | // linguist's commit from which files were generated. 4 | var LinguistCommit = "{{- getCommit -}}" 5 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/benchmarks/csv/enry-distribution.csv: -------------------------------------------------------------------------------- 1 | timeInterval,enry,numberOfFiles 2 | 1us-10us,enry,96 3 | 10us-100us,enry,1244 4 | 100us-1ms,enry,321 5 | 1ms-10ms,enry,135 6 | 10ms-100ms,enry,43 7 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/assets/header.go.tmpl: -------------------------------------------------------------------------------- 1 | // Code generated by gopkg.in/src-d/enry.v1/internal/code-generator DO NOT EDIT. 2 | // Extracted from github/linguist commit: {{ getCommit }} 3 | 4 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/java/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.5") 2 | addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1") 3 | addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0") -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/assets/type.go.tmpl: -------------------------------------------------------------------------------- 1 | package data 2 | 3 | var LanguagesType = map[string]int{ 4 | {{range $language, $type := . -}} 5 | "{{ $language }}": {{ $type -}}, 6 | {{end -}} 7 | } 8 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/benchmarks/csv/linguist-distribution.csv: -------------------------------------------------------------------------------- 1 | timeInterval,linguist,numberOfFiles 2 | 1us-10us,linguist,0 3 | 10us-100us,linguist,74 4 | 100us-1ms,linguist,920 5 | 1ms-10ms,linguist,788 6 | 10ms-100ms,linguist,57 7 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/assets/mimeType.go.tmpl: -------------------------------------------------------------------------------- 1 | package data 2 | 3 | var LanguagesMime = map[string]string{ 4 | {{range $language, $mime := . -}} 5 | "{{$language}}": "{{$mime -}}", 6 | {{end -}} 7 | } 8 | -------------------------------------------------------------------------------- /testdata/README.md: -------------------------------------------------------------------------------- 1 | This line contains several misspellings: torphies, upgarded 2 | 3 | This line contains a broken http://non-existing.link.ever/ok 4 | List of broken links: 5 | * https://link.foo-and-bar.bar 6 | * [link name](http://this-url.doesnotexist.ru/) 7 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/assets/filename.go.tmpl: -------------------------------------------------------------------------------- 1 | package data 2 | 3 | var LanguagesByFilename = map[string][]string{ 4 | {{range $filename, $languages := . -}} 5 | "{{ $filename }}": { {{- formatStringSlice $languages -}} }, 6 | {{end -}} 7 | } 8 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/benchmarks/run-benchmarks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | mkdir -p benchmarks/output && go test -run NONE -bench=. -benchtime=120s -timeout=100h >benchmarks/output/enry_total.bench && \ 4 | benchmarks/linguist-total.rb 5 >benchmarks/output/linguist_total.bench 5 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/assets/vendor.go.tmpl: -------------------------------------------------------------------------------- 1 | package data 2 | 3 | import "gopkg.in/toqueteos/substring.v1" 4 | 5 | var VendorMatchers = substring.Or( 6 | {{range $regexp := . -}} 7 | substring.Regexp(`{{ $regexp }}`), 8 | {{end -}} 9 | ) 10 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/assets/interpreter.go.tmpl: -------------------------------------------------------------------------------- 1 | package data 2 | 3 | var LanguagesByInterpreter = map[string][]string{ 4 | {{range $interpreter, $languages := . -}} 5 | "{{ $interpreter }}": { {{- $languages | formatStringSlice -}} }, 6 | {{end -}} 7 | } 8 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/assets/documentation.go.tmpl: -------------------------------------------------------------------------------- 1 | package data 2 | 3 | import "gopkg.in/toqueteos/substring.v1" 4 | 5 | var DocumentationMatchers = substring.Or( 6 | {{range $regexp := . -}} 7 | substring.Regexp(`{{ $regexp }}`), 8 | {{end -}} 9 | ) 10 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/data/commit.go: -------------------------------------------------------------------------------- 1 | // Code generated by gopkg.in/src-d/enry.v1/internal/code-generator DO NOT EDIT. 2 | // Extracted from github/linguist commit: 4cd558c37482e8d2c535d8107f2d11b49afbc5b5 3 | 4 | package data 5 | 6 | // linguist's commit from which files were generated. 7 | var LinguistCommit = "4cd558c37482e8d2c535d8107f2d11b49afbc5b5" 8 | -------------------------------------------------------------------------------- /issues2019/booking.txt: -------------------------------------------------------------------------------- 1 | github.com/bookingcom/carbonapi: misspell: tests/perf_test/README.md:28:61: "paramter" is a misspelling of "parameter" 2 | github.com/bookingcom/carbonapi: misspell: tests/perf_test/README.md:29:61: "paramter" is a misspelling of "parameter" 3 | github.com/bookingcom/powercalculator: misspell: README.md:8:3: "Instalation" is a misspelling of "Installation" 4 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/benchmarks/soft-hard-info.txt: -------------------------------------------------------------------------------- 1 | # Hardware and software used to run benchmarks 2 | 3 | Dell XPS 9360 4 | Linux 4.11.6-3-ARCH #1 SMP PREEMPT Thu Jun 22 12:21:46 CEST 2017 x86_64 5 | go version go1.8.3 linux/amd64 6 | ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux] 7 | 8 | github/linguist/samples commit: d5c8db3fb91963c4b2762ca2ea2ff7cfac109f68 9 | 10 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/benchmarks/csv/enry-total.csv: -------------------------------------------------------------------------------- 1 | function,tool,iterations,ns/op 2 | GetLanguage(),enry,100,1915861259 3 | Classify(),enry,5,39977943775 4 | GetLanguagesByModeline(),enry,1000,196571071 5 | GetLanguagesByFilename(),enry,2000000,89774 6 | GetLanguagesByShebang(),enry,100000,1892569 7 | GetLanguagesByExtension(),enry,200000,921160 8 | GetLanguagesByContent(),enry,1000,286159159 9 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/generator/test_files/commit.gold: -------------------------------------------------------------------------------- 1 | // Code generated by gopkg.in/src-d/enry.v1/internal/code-generator DO NOT EDIT. 2 | // Extracted from github/linguist commit: d5c8db3fb91963c4b2762ca2ea2ff7cfac109f68 3 | 4 | package data 5 | 6 | // linguist's commit from which files were generated. 7 | var LinguistCommit = "d5c8db3fb91963c4b2762ca2ea2ff7cfac109f68" 8 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/benchmarks/csv/linguist-total.csv: -------------------------------------------------------------------------------- 1 | function,tool,iterations,ns/op 2 | GetLanguage(),linguist,5,3979096800 3 | Classify(),linguist,5,178253431800 4 | GetLanguagesByModeline(),linguist,5,2582204000 5 | GetLanguagesByFilename(),linguist,5,2688800 6 | GetLanguagesByShebang(),linguist,5,77155200 7 | GetLanguagesByExtension(),linguist,5,6688800 8 | GetLanguagesByContent(),linguist,5,161719000 9 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/assets/alias.go.tmpl: -------------------------------------------------------------------------------- 1 | package data 2 | 3 | // LanguagesByAlias keeps alias for different languages and use the name of the languages as an alias too. 4 | // All the keys (alias or not) are written in lower case and the whitespaces has been replaced by underscores. 5 | var LanguagesByAlias = map[string]string{ 6 | {{range $alias, $language := . -}} 7 | "{{ $alias }}": {{ printf "%q" $language -}}, 8 | {{end -}} 9 | } 10 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/assets/extension.go.tmpl: -------------------------------------------------------------------------------- 1 | package data 2 | 3 | var LanguagesByExtension = map[string][]string{ 4 | {{range $extension, $languages := .LanguagesByExtension -}} 5 | "{{ $extension }}": { {{- $languages | formatStringSlice -}} }, 6 | {{end -}} 7 | } 8 | 9 | var ExtensionsByLanguage = map[string][]string{ 10 | {{range $language, $extensions := .ExtensionsByLanguage -}} 11 | "{{ $language }}": { {{- $extensions | formatStringSlice -}} }, 12 | {{end -}} 13 | } 14 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/java/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.jar 15 | *.war 16 | *.ear 17 | *.zip 18 | *.tar.gz 19 | *.rar 20 | 21 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 22 | hs_err_pid* 23 | target 24 | .idea 25 | .jnaerator 26 | shared 27 | *.jar 28 | *.gpg 29 | key.asc 30 | project/.gnupg 31 | 32 | -------------------------------------------------------------------------------- /issues2019/netflix.txt: -------------------------------------------------------------------------------- 1 | github.com/netflix/aegisthus: misspell: scripts/README.md:5:45: "futher" is a misspelling of "further" 2 | github.com/netflix/Hystrix: misspell: README.md:152:0: "Futher" is a misspelling of "Further" 3 | github.com/netflix/pollyjs: misspell: examples/dummy-app/README.md:1537:47: "overriden" is a misspelling of "overridden" 4 | github.com/netflix/rend-lmdb: misspell: README.md:13:29: "libary" is a misspelling of "library" 5 | github.com/netflix/yetch: misspell: README.md:61:57: "neccesary" is a misspelling of "necessary" 6 | -------------------------------------------------------------------------------- /issues2019/minio.txt: -------------------------------------------------------------------------------- 1 | github.com/minio/c2goasm: misspell: README.md:14:220: "intented" is a misspelling of "intended" 2 | github.com/minio/c2goasm: code snippet: block #6: add "go" language marker 3 | github.com/minio/minio-hs: misspell: README.md:80:36: "libary" is a misspelling of "library" 4 | github.com/minio/minio-service: misspell: linux-systemd/distributed/README.md:48:43: "appropirate" is a misspelling of "appropriate" 5 | github.com/minio/minio-service: misspell: linux-systemd/README.md:54:43: "appropirate" is a misspelling of "appropriate" 6 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/generator/linguist-commit.go: -------------------------------------------------------------------------------- 1 | package generator 2 | 3 | import ( 4 | "bytes" 5 | ) 6 | 7 | // Commit takes a commit and builds the source file from tmplPath. It complies with type File signature. 8 | func Commit(fileToParse, samplesDir, outPath, tmplPath, tmplName, commit string) error { 9 | buf := &bytes.Buffer{} 10 | if err := executeTemplate(buf, tmplName, tmplPath, commit, nil, nil); err != nil { 11 | return err 12 | } 13 | return formatedWrite(outPath, buf.Bytes()) 14 | } 15 | -------------------------------------------------------------------------------- /issues2019/mailru.txt: -------------------------------------------------------------------------------- 1 | github.com/mailru/FileAPI: misspell: README.md:1486:45: "settigns" is a misspelling of "settings" 2 | github.com/mailru/graphite-nginx-module: misspell: README.md:13:18: "Grahpite" is a misspelling of "Graphite" 3 | github.com/mailru/graphite-nginx-module: misspell: README.md:40:105: "perfomance" is a misspelling of "performance" 4 | github.com/mailru/graphite-nginx-module: misspell: README.md:193:42: "devided" is a misspelling of "divided" 5 | github.com/mailru/surgemq: code snippet: block #1: add "go" language marker 6 | github.com/mailru/surgemq: code snippet: block #2: add "go" language marker 7 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/benchmarks/plot-histogram.gp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env gnuplot 2 | 3 | set terminal png large font "arial,26" size 1920,1080 4 | set output 'benchmarks/histogram/distribution.png' 5 | 6 | set datafile separator comma 7 | set key under 8 | 9 | set style data histogram 10 | set style histogram clustered gap 1 title offset 1,1 11 | set style fill solid noborder 12 | set boxwidth 0.95 13 | set grid y 14 | set bmargin 12 15 | set autoscale 16 | set title "Number of files per processing time" 17 | 18 | plot newhistogram, 'benchmarks/csv/enry-distribution.csv' using 3:xtic(1) title "enry", 'benchmarks/csv/linguist-distribution.csv' using 3 title "linguist" 19 | 20 | unset output 21 | 22 | -------------------------------------------------------------------------------- /issues2019/2gis.txt: -------------------------------------------------------------------------------- 1 | github.com/2gis/MapGL-Android: misspell: README.md:44:185: "postion" is a misspelling of "position" 2 | github.com/2gis/nuclear-river: misspell: docs/README.md:10:15: "appication" is a misspelling of "application" 3 | github.com/2gis/nuclear-river: misspell: docs/README.md:26:116: "independenly" is a misspelling of "independently" 4 | github.com/2gis/nuclear-river: misspell: docs/design-overview/README.md:5:89: "throught" is a misspelling of "thought" 5 | github.com/2gis/nuclear-river: misspell: docs/design-overview/README.md:136:88: "behaivour" is a misspelling of "behaviour" 6 | github.com/2gis/qtandroidextensions: misspell: Samples/AndroidWebView_Qt4_Grym/README.txt:12:16: "currenlty" is a misspelling of "currently" 7 | -------------------------------------------------------------------------------- /issues2019/VKCOM.txt: -------------------------------------------------------------------------------- 1 | github.com/VKCOM/node-vk-call: misspell: README.md:66:40: "successfull" is a misspelling of "successful" 2 | github.com/VKCOM/node-vk-call: misspell: README.md:80:0: "Exmaple" is a misspelling of "Example" 3 | github.com/VKCOM/node-vk-call: misspell: README.md:113:43: "wich" is a misspelling of "which" 4 | github.com/VKCOM/noverify: misspell: README.md:137:100: "uncommited" is a misspelling of "uncommitted" 5 | github.com/VKCOM/noverify: misspell: README.md:217:16: "intergration" is a misspelling of "integration" 6 | github.com/VKCOM/vk-android-sdk: misspell: README.md:42:26: "Andriod" is a misspelling of "Android" 7 | github.com/VKCOM/vk-ios-sdk: misspell: README.md:157:22: "happend" is a misspelling of "happened" 8 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/assets/frequencies.go.tmpl: -------------------------------------------------------------------------------- 1 | package data 2 | 3 | var LanguagesLogProbabilities = map[string]float64{ 4 | {{ $freqs := . -}} 5 | {{range $index, $language := orderKeys .Languages -}} 6 | "{{ $language }}": {{ languageLogProbability $language -}}, 7 | {{end -}} 8 | } 9 | 10 | var TokensLogProbabilities = map[string]map[string]float64{ 11 | {{range $index, $language := orderMapMapKeys .Tokens -}} 12 | "{{ $language }}": map[string]float64{ 13 | {{range $i, $token := index $freqs.Tokens $language | orderKeys -}} 14 | {{ quote $token }}: {{ tokenLogProbability $language $token }}, 15 | {{end -}} 16 | }, 17 | {{end -}} 18 | } 19 | 20 | var TokensTotal = {{ toFloat64 .TokensTotal -}} 21 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/generator/langinfo.go: -------------------------------------------------------------------------------- 1 | package generator 2 | 3 | import "sort" 4 | 5 | type languageInfo struct { 6 | Type string `yaml:"type,omitempty"` 7 | Aliases []string `yaml:"aliases,omitempty"` 8 | Extensions []string `yaml:"extensions,omitempty,flow"` 9 | Interpreters []string `yaml:"interpreters,omitempty,flow"` 10 | Filenames []string `yaml:"filenames,omitempty,flow"` 11 | MimeType string `yaml:"codemirror_mime_type,omitempty,flow"` 12 | } 13 | 14 | func getAlphabeticalOrderedKeys(languages map[string]*languageInfo) []string { 15 | keyList := make([]string, 0) 16 | for lang := range languages { 17 | keyList = append(keyList, lang) 18 | } 19 | 20 | sort.Strings(keyList) 21 | return keyList 22 | } 23 | -------------------------------------------------------------------------------- /issues2019/jupyter.txt: -------------------------------------------------------------------------------- 1 | github.com/jupyter/accessibility: misspell: README.md:23:11: "accessibilty" is a misspelling of "accessibility" 2 | github.com/jupyter/docker-stacks: misspell: examples/make-deploy/README.md:49:125: "wtih" is a misspelling of "with" 3 | github.com/jupyter/enhancement-proposals: misspell: 29-jep-process/README.md:49:82: "faciliate" is a misspelling of "facilitate" 4 | github.com/jupyter/enterprise_gateway: misspell: etc/docker/nb2kg/README.md:17:99: "mulitple" is a misspelling of "multiple" 5 | github.com/jupyter/nbgrader: misspell: nbgrader/server_extensions/formgrader/static/components/backbone/README.md:17:66: "specifiy" is a misspelling of "specify" 6 | github.com/jupyter/surveys: misspell: surveys/2015-12-notebook-ux/README.md:49:114: "unconfortable" is a misspelling of "uncomfortable" 7 | -------------------------------------------------------------------------------- /issues2019/amazon.txt: -------------------------------------------------------------------------------- 1 | github.com/amzn/amazon-payments-magento-plugin: misspell: README.md:306:86: "thrid" is a misspelling of "third" 2 | github.com/amzn/ion-schema-kotlin: misspell: data/test/README.md:23:95: "preceeding" is a misspelling of "preceding" 3 | github.com/amzn/ion-schema-kotlin: misspell: data/test/README.md:96:22: "mutliple" is a misspelling of "multiple" 4 | github.com/amzn/sample-fire-tv-app-video-skill: misspell: ComponentTestFramework/README.md:120:36: "Andriod" is a misspelling of "Android" 5 | github.com/amzn/smoke-dynamodb: misspell: README.md:354:224: "captialize" is a misspelling of "capitalize" 6 | github.com/amzn/smoke-framework-application-generate: misspell: README.md:84:92: "fullfill" is a misspelling of "fulfill" 7 | github.com/amzn/zeek-plugin-enip: misspell: README.md:3:404: "addtional" is a misspelling of "additional" 8 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/data/documentation.go: -------------------------------------------------------------------------------- 1 | // Code generated by gopkg.in/src-d/enry.v1/internal/code-generator DO NOT EDIT. 2 | // Extracted from github/linguist commit: 4cd558c37482e8d2c535d8107f2d11b49afbc5b5 3 | 4 | package data 5 | 6 | import "gopkg.in/toqueteos/substring.v1" 7 | 8 | var DocumentationMatchers = substring.Or( 9 | substring.Regexp(`^[Dd]ocs?/`), 10 | substring.Regexp(`(^|/)[Dd]ocumentation/`), 11 | substring.Regexp(`(^|/)[Jj]avadoc/`), 12 | substring.Regexp(`^[Mm]an/`), 13 | substring.Regexp(`^[Ee]xamples/`), 14 | substring.Regexp(`^[Dd]emos?/`), 15 | substring.Regexp(`(^|/)CHANGE(S|LOG)?(\.|$)`), 16 | substring.Regexp(`(^|/)CONTRIBUTING(\.|$)`), 17 | substring.Regexp(`(^|/)COPYING(\.|$)`), 18 | substring.Regexp(`(^|/)INSTALL(\.|$)`), 19 | substring.Regexp(`(^|/)LICEN[CS]E(\.|$)`), 20 | substring.Regexp(`(^|/)[Ll]icen[cs]e(\.|$)`), 21 | substring.Regexp(`(^|/)README(\.|$)`), 22 | substring.Regexp(`(^|/)[Rr]eadme(\.|$)`), 23 | substring.Regexp(`^[Ss]amples?/`), 24 | ) 25 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/generator/vendor.go: -------------------------------------------------------------------------------- 1 | package generator 2 | 3 | import ( 4 | "bytes" 5 | "gopkg.in/yaml.v2" 6 | "io" 7 | "io/ioutil" 8 | ) 9 | 10 | // Vendor reads from fileToParse and builds source file from tmplPath. It complies with type File signature. 11 | func Vendor(fileToParse, samplesDir, outPath, tmplPath, tmplName, commit string) error { 12 | data, err := ioutil.ReadFile(fileToParse) 13 | if err != nil { 14 | return err 15 | } 16 | 17 | var regexpList []string 18 | if err := yaml.Unmarshal(data, ®expList); err != nil { 19 | return nil 20 | } 21 | 22 | buf := &bytes.Buffer{} 23 | if err := executeVendorTemplate(buf, regexpList, tmplPath, tmplName, commit); err != nil { 24 | return nil 25 | } 26 | 27 | return formatedWrite(outPath, buf.Bytes()) 28 | } 29 | 30 | func executeVendorTemplate(out io.Writer, regexpList []string, tmplPath, tmplName, commit string) error { 31 | return executeTemplate(out, tmplName, tmplPath, commit, nil, regexpList) 32 | } 33 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/generator/test_files/documentation.gold: -------------------------------------------------------------------------------- 1 | // Code generated by gopkg.in/src-d/enry.v1/internal/code-generator DO NOT EDIT. 2 | // Extracted from github/linguist commit: d5c8db3fb91963c4b2762ca2ea2ff7cfac109f68 3 | 4 | package data 5 | 6 | import "gopkg.in/toqueteos/substring.v1" 7 | 8 | var DocumentationMatchers = substring.Or( 9 | substring.Regexp(`^[Dd]ocs?/`), 10 | substring.Regexp(`(^|/)[Dd]ocumentation/`), 11 | substring.Regexp(`(^|/)[Jj]avadoc/`), 12 | substring.Regexp(`^[Mm]an/`), 13 | substring.Regexp(`^[Ee]xamples/`), 14 | substring.Regexp(`^[Dd]emos?/`), 15 | substring.Regexp(`(^|/)CHANGE(S|LOG)?(\.|$)`), 16 | substring.Regexp(`(^|/)CONTRIBUTING(\.|$)`), 17 | substring.Regexp(`(^|/)COPYING(\.|$)`), 18 | substring.Regexp(`(^|/)INSTALL(\.|$)`), 19 | substring.Regexp(`(^|/)LICEN[CS]E(\.|$)`), 20 | substring.Regexp(`(^|/)[Ll]icen[cs]e(\.|$)`), 21 | substring.Regexp(`(^|/)README(\.|$)`), 22 | substring.Regexp(`(^|/)[Rr]eadme(\.|$)`), 23 | substring.Regexp(`^[Ss]amples?/`), 24 | ) 25 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/generator/documentation.go: -------------------------------------------------------------------------------- 1 | package generator 2 | 3 | import ( 4 | "bytes" 5 | "gopkg.in/yaml.v2" 6 | "io" 7 | "io/ioutil" 8 | ) 9 | 10 | // Documentation reads from fileToParse and builds source file from tmplPath. It complies with type File signature. 11 | func Documentation(fileToParse, samplesDir, outPath, tmplPath, tmplName, commit string) error { 12 | data, err := ioutil.ReadFile(fileToParse) 13 | if err != nil { 14 | return err 15 | } 16 | 17 | var regexpList []string 18 | if err := yaml.Unmarshal(data, ®expList); err != nil { 19 | return err 20 | } 21 | 22 | buf := &bytes.Buffer{} 23 | if err := executeDocumentationTemplate(buf, regexpList, tmplPath, tmplName, commit); err != nil { 24 | return err 25 | } 26 | 27 | return formatedWrite(outPath, buf.Bytes()) 28 | } 29 | 30 | func executeDocumentationTemplate(out io.Writer, regexpList []string, tmplPath, tmplName, commit string) error { 31 | return executeTemplate(out, tmplName, tmplPath, commit, nil, regexpList) 32 | } 33 | -------------------------------------------------------------------------------- /issues/tdf.txt: -------------------------------------------------------------------------------- 1 | checking tdf/extensions.libreoffice.org (1/5, made 1 requests so far) ... 2 | extensions.libreoffice.org: broken link: src/tdf.exttempsitepolicy/README.rst: http://vm141.documentfoundation.org:9103: Dial tcp4 89.238.68.141:9103: connect: connection refused 3 | extensions.libreoffice.org: broken link: src/tdf.extensioncentertheme/README.rst: http://vm141.documentfoundation.org:9103/loexttem5/en: Dial tcp4 89.238.68.141:9103: connect: connection refused 4 | extensions.libreoffice.org: misspell: src/tdf.extensioncentertheme/README.rst:9:123: "Barceloneta" is a misspelling of "Barcelona" 5 | checking tdf/libcmis (2/5, made 7 requests so far) ... 6 | checking tdf/odfauthors.org (3/5, made 9 requests so far) ... 7 | odfauthors.org: misspell: src/odfauthors.theme/README.rst:9:92: "Barceloneta" is a misspelling of "Barcelona" 8 | checking tdf/tdf.extensionuploadcenter (4/5, made 13 requests so far) ... 9 | checking tdf/tdf.templateuploadcenter (5/5, made 19 requests so far) ... 10 | tdf.templateuploadcenter: broken link: README.rst: http://vm141.documentfoundation.org:9103: Dial tcp4 89.238.68.141:9103: connect: connection refused 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Iskander (Alex) Sharipov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/assets/content.go.tmpl: -------------------------------------------------------------------------------- 1 | package data 2 | 3 | import "gopkg.in/toqueteos/substring.v1" 4 | 5 | type languageMatcher func ([]byte) []string 6 | 7 | var ContentMatchers = map[string]languageMatcher{ 8 | {{ range $index, $disambiguator := . -}} 9 | {{ printf "%q" $disambiguator.Extension }}: func(i []byte) []string { 10 | {{ range $i, $language := $disambiguator.Languages -}} 11 | 12 | {{- if not (avoidLanguage $language) }} 13 | {{- if gt (len $language.Heuristics) 0 }} 14 | {{- if gt $i 0 }} else {{ end -}} 15 | if {{- range $j, $heuristic := $language.Heuristics }} {{ $heuristic.Name }}.Match(string(i)) 16 | {{- if lt $j (len $language.LogicRelations) }} {{index $language.LogicRelations $j}} {{- end -}} {{ end }} { 17 | return []string{ {{- printf "%q" $language.Language -}} } 18 | } 19 | 20 | {{- end -}} 21 | {{- end -}} 22 | {{- end}} 23 | 24 | return {{ returnLanguages $disambiguator.Languages | returnStringSlice }} 25 | }, 26 | {{ end -}} 27 | } 28 | 29 | var ( 30 | {{ range $index, $heuristic := getAllHeuristics . -}} 31 | {{ $heuristic.Name }} = substring.Regexp(`{{ $heuristic.Regexp }}`) 32 | {{ end -}} 33 | ) 34 | -------------------------------------------------------------------------------- /issues2019/ansible.txt: -------------------------------------------------------------------------------- 1 | github.com/ansible/ansible-runner-service: misspell: samples/ceph/README.md:5:112: "enviroment" is a misspelling of "environment" 2 | github.com/ansible/ansible_collections_netapp: misspell: ansible_collections/netapp/ontap/roles/na_ontap_cluster_config/README.md:32:37: "determins" is a misspelling of "determines" 3 | github.com/ansible/ansible_collections_netapp: misspell: ansible_collections/netapp/ontap/roles/na_ontap_cluster_config/README.md:56:115: "overriden" is a misspelling of "overridden" 4 | github.com/ansible/ansible_collections_netapp: misspell: ansible_collections/netapp/ontap/roles/na_ontap_vserver_create/README.md:22:37: "determins" is a misspelling of "determines" 5 | github.com/ansible/ansibullbot: misspell: README.md:40:33: "continuos" is a misspelling of "continuous" 6 | github.com/ansible/collection_migration: misspell: README.md:58:16: "somehting" is a misspelling of "something" 7 | github.com/ansible/galaxy: misspell: CONTRIBUTING.rst:464:59: "commited" is a misspelling of "committed" 8 | github.com/ansible/galaxy: misspell: CONTRIBUTING.rst:502:0: "Commiting" is a misspelling of "Committing" 9 | github.com/ansible/pytest-ansible: misspell: README.md:113:26: "demonstates" is a misspelling of "demonstrates" 10 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/DCO: -------------------------------------------------------------------------------- 1 | Developer's Certificate of Origin 1.1 2 | 3 | By making a contribution to this project, I certify that: 4 | 5 | (a) The contribution was created in whole or in part by me and I 6 | have the right to submit it under the open source license 7 | indicated in the file; or 8 | 9 | (b) The contribution is based upon previous work that, to the best 10 | of my knowledge, is covered under an appropriate open source 11 | license and I have the right under that license to submit that 12 | work with modifications, whether created in whole or in part 13 | by me, under the same open source license (unless I am 14 | permitted to submit under a different license), as indicated 15 | in the file; or 16 | 17 | (c) The contribution was provided directly to me by some other 18 | person who certified (a), (b) or (c) and I have not modified 19 | it. 20 | 21 | (d) I understand and agree that this project and the contribution 22 | are public and that a record of the contribution (including all 23 | personal information I submit with it, including my sign-off) is 24 | maintained indefinitely and may be redistributed consistent with 25 | this project or the open source license(s) involved. 26 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/generator/mimeType.go: -------------------------------------------------------------------------------- 1 | package generator 2 | 3 | import ( 4 | "bytes" 5 | "gopkg.in/yaml.v2" 6 | "io" 7 | "io/ioutil" 8 | ) 9 | 10 | func MimeType(fileToParse, samplesDir, outPath, tmplPath, tmplName, commit string) error { 11 | data, err := ioutil.ReadFile(fileToParse) 12 | if err != nil { 13 | return err 14 | } 15 | 16 | languages := make(map[string]*languageInfo) 17 | if err := yaml.Unmarshal(data, &languages); err != nil { 18 | return err 19 | } 20 | 21 | langMimeMap := buildLanguageMimeMap(languages) 22 | 23 | buf := &bytes.Buffer{} 24 | if err := executeMimeTemplate(buf, langMimeMap, tmplPath, tmplName, commit); err != nil { 25 | return err 26 | } 27 | 28 | return formatedWrite(outPath, buf.Bytes()) 29 | } 30 | 31 | func buildLanguageMimeMap(languages map[string]*languageInfo) map[string]string { 32 | langMimeMap := make(map[string]string) 33 | for lang, info := range languages { 34 | if len(info.MimeType) != 0 { 35 | langMimeMap[lang] = info.MimeType 36 | } 37 | } 38 | 39 | return langMimeMap 40 | } 41 | 42 | func executeMimeTemplate(out io.Writer, langMimeMap map[string]string, tmplPath, tmplName, commit string) error { 43 | return executeTemplate(out, tmplName, tmplPath, commit, nil, langMimeMap) 44 | } 45 | -------------------------------------------------------------------------------- /issues2019/spotify.txt: -------------------------------------------------------------------------------- 1 | github.com/spotify/android-sdk: misspell: auth-lib/README.md:20:69: "libary" is a misspelling of "library" 2 | github.com/spotify/chartify: misspell: README.rst:43:8: "directorys" is a misspelling of "directors" 3 | github.com/spotify/docker-kafka: misspell: README.md:83:6: "particularily" is a misspelling of "particularly" 4 | github.com/spotify/java-hamcrest: misspell: README.md:259:3: "Prerequisities" is a misspelling of "Prerequisite" 5 | github.com/spotify/Mobius.swift: misspell: CONTRIBUTING.md:11:27: "recieve" is a misspelling of "receive" 6 | github.com/spotify/NFDecoder: misspell: README.md:27:62: "retrived" is a misspelling of "retrieved" 7 | github.com/spotify/NFDecoder: misspell: ci/README.md:2:536: "overriden" is a misspelling of "overridden" 8 | github.com/spotify/NFGrapher: misspell: java/README.md:9:105: "verison" is a misspelling of "version" 9 | github.com/spotify/NFLogger: misspell: ci/README.md:2:533: "overriden" is a misspelling of "overridden" 10 | github.com/spotify/spydra: misspell: integration_test_k8s/README.md:3:62: "applicaiton" is a misspelling of "application" 11 | github.com/spotify/spydra: misspell: README.md:76:58: "withing" is a misspelling of "within" 12 | github.com/spotify/spydra: misspell: README.md:97:84: "credentails" is a misspelling of "credentials" 13 | -------------------------------------------------------------------------------- /issues2019/yandex.txt: -------------------------------------------------------------------------------- 1 | github.com/yandex/fastops: misspell: README.md:8:150: "preformance" is a misspelling of "performance" 2 | github.com/yandex/fastops: misspell: README.md:64:85: "significatly" is a misspelling of "significantly" 3 | github.com/yandex/fastops: misspell: README.md:67:293: "jsut" is a misspelling of "just" 4 | github.com/yandex/fastops: misspell: README.md:70:62: "significatly" is a misspelling of "significantly" 5 | github.com/yandex/fastops: misspell: README.md:87:152: "significatly" is a misspelling of "significantly" 6 | github.com/yandex/fastops: misspell: README.md:92:157: "significatly" is a misspelling of "significantly" 7 | github.com/yandex/fastops: misspell: README.md:129:184: "fucntion" is a misspelling of "function" 8 | github.com/yandex/gixy: misspell: CONTRIBUTING.md:19:267: "futher" is a misspelling of "further" 9 | github.com/yandex/mapsapi-polylabeler: misspell: README.md:148:42: "occured" is a misspelling of "occurred" 10 | github.com/yandex/ozo: misspell: README.md:8:27: "asyncronous" is a misspelling of "asynchronous" 11 | github.com/yandex/ozo: misspell: README.md:49:50: "folowing" is a misspelling of "following" 12 | github.com/yandex/tartifacts: misspell: README.md:99:0: "Searchs" is a misspelling of "Searches" 13 | github.com/yandex/tartifacts: misspell: README.md:186:7: "specifed" is a misspelling of "specified" 14 | -------------------------------------------------------------------------------- /issues2019/wikimedia.txt: -------------------------------------------------------------------------------- 1 | github.com/wikimedia/AhoCorasick: misspell: README.md:31:40: "occurences" is a misspelling of "occurrences" 2 | github.com/wikimedia/analytics-dashiki: misspell: README.md:56:183: "compatiblity" is a misspelling of "compatibility" 3 | github.com/wikimedia/analytics-refinery: misspell: oozie/cassandra/README.md:16:27: "fianlly" is a misspelling of "finally" 4 | github.com/wikimedia/analytics-refinery: misspell: oozie/mediawiki/history/dumps/README.md:60:46: "overriden" is a misspelling of "overridden" 5 | github.com/wikimedia/analytics-wmde-WD-WD_identifierLandscape: misspell: README.txt:7:85: "occurence" is a misspelling of "occurrence" 6 | github.com/wikimedia/eslint-plugin-no-jquery: misspell: README.md:36:178: "targetting" is a misspelling of "targeting" 7 | github.com/wikimedia/labs-tools-heritage: unwanted file: remove Windows sys file file: common/skins/monobook/Thumbs.db 8 | github.com/wikimedia/labs-tools-stewardbots: misspell: SULWatcher/README:20:40: "occurences" is a misspelling of "occurrences" 9 | github.com/wikimedia/labs-tools-stewardbots: misspell: SULWatcher/README:25:38: "occurences" is a misspelling of "occurrences" 10 | github.com/wikimedia/mediawiki: misspell: includes/libs/Message/README.md:185:28: "paramter" is a misspelling of "parameter" 11 | github.com/wikimedia/mediawiki-api-demos: misspell: mediawikijs/README.md:5:24: "usefull" is a misspelling of "useful" 12 | -------------------------------------------------------------------------------- /issues/dell.txt: -------------------------------------------------------------------------------- 1 | checking dell/biosdevname (1/13, made 1 requests so far) ... 2 | checking dell/biosdisk (2/13, made 4 requests so far) ... 3 | biosdisk: misspell: README.md:17:0: "Optinally" is a misspelling of "Optimally" 4 | checking dell/Dell-EMC-Ansible-Modules-for-iDRAC (3/13, made 7 requests so far) ... 5 | checking dell/dell-recovery (4/13, made 9 requests so far) ... 6 | checking dell/dkms (5/13, made 11 requests so far) ... 7 | checking dell/GW300x_Sensor_Demo (6/13, made 16 requests so far) ... 8 | checking dell/iDRAC-Redfish-Scripting (7/13, made 19 requests so far) ... 9 | checking dell/libsmbios (8/13, made 22 requests so far) ... 10 | libsmbios: broken link: doc/getopt/README: http://www.dragon-ware.com/~steve/projects/getopts: Lookup www.dragon-ware.com on 127.0.1.1:53: no such host 11 | libsmbios: misspell: doc/getopt/README:82:42: "arguements" is a misspelling of "arguments" 12 | checking dell/omsdk (9/13, made 27 requests so far) ... 13 | omsdk: misspell: CONTRIBUTING.md:42:61: "Liason" is a misspelling of "Liaison" 14 | checking dell/openshift-container-architecture (10/13, made 33 requests so far) ... 15 | openshift-container-architecture: broken link: README.md: https://tbd.pdf: Lookup tbd.pdf on 127.0.1.1:53: no such host 16 | checking dell/redfish-ansible-module (11/13, made 36 requests so far) ... 17 | checking dell/sassist (12/13, made 39 requests so far) ... 18 | checking dell/thunderbolt-nvm-linux (13/13, made 41 requests so far) ... 19 | -------------------------------------------------------------------------------- /utils.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "io" 5 | "io/ioutil" 6 | "net/http" 7 | "regexp" 8 | "strings" 9 | "time" 10 | 11 | "gopkg.in/src-d/enry.v1/data" 12 | ) 13 | 14 | var goCodeRE = func() *regexp.Regexp { 15 | parts := []string{ 16 | `\berr != nil\b`, 17 | `func \w+\(`, 18 | `\w+ := \S`, 19 | } 20 | return regexp.MustCompile(strings.Join(parts, "|")) 21 | }() 22 | 23 | func extensionByLang(lang string) string { 24 | // TODO(Quasilyte): write a switch and handle more languages. 25 | return strings.ToLower(lang) 26 | } 27 | 28 | func progLangBySources(majorLang string, src []byte) string { 29 | if majorLang == "" { 30 | // Not safe to do any guessing. 31 | return "" 32 | } 33 | 34 | // If can, use enry for language detection. 35 | ext := extensionByLang(majorLang) 36 | matcher, ok := data.ContentMatchers[ext] 37 | if ok { 38 | matches := matcher(src) 39 | if len(matches) == 1 { 40 | return strings.ToLower(matches[0]) 41 | } 42 | } 43 | 44 | // Fallback to a less smart inference. 45 | 46 | majorLang = strings.ToLower(majorLang) 47 | 48 | if goCodeRE.Match(src) && majorLang == "go" { 49 | return "go" 50 | } 51 | 52 | return "" 53 | } 54 | 55 | var httpClient = http.Client{ 56 | Timeout: time.Duration(3 * time.Second), 57 | } 58 | 59 | func urlReachable(addr string) bool { 60 | resp, err := httpClient.Get(addr) 61 | if err != nil { 62 | return false 63 | } 64 | defer resp.Body.Close() 65 | io.Copy(ioutil.Discard, resp.Body) 66 | return true 67 | } 68 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/generator/types.go: -------------------------------------------------------------------------------- 1 | package generator 2 | 3 | import ( 4 | "bytes" 5 | "gopkg.in/yaml.v2" 6 | "io" 7 | "io/ioutil" 8 | ) 9 | 10 | var typeToTypeConst = map[string]int{ 11 | "data": 1, 12 | "programming": 2, 13 | "markup": 3, 14 | "prose": 4, 15 | } 16 | 17 | // Types reads from fileToParse and builds source file from tmplPath. It complies with type File signature. 18 | func Types(fileToParse, samplesDir, outPath, tmplPath, tmplName, commit string) error { 19 | data, err := ioutil.ReadFile(fileToParse) 20 | if err != nil { 21 | return err 22 | } 23 | 24 | languages := make(map[string]*languageInfo) 25 | if err := yaml.Unmarshal(data, &languages); err != nil { 26 | return err 27 | } 28 | 29 | langTypeMap := buildLanguageTypeMap(languages) 30 | 31 | buf := &bytes.Buffer{} 32 | if err := executeTypesTemplate(buf, langTypeMap, tmplPath, tmplName, commit); err != nil { 33 | return err 34 | } 35 | 36 | return formatedWrite(outPath, buf.Bytes()) 37 | } 38 | 39 | func buildLanguageTypeMap(languages map[string]*languageInfo) map[string]int { 40 | langTypeMap := make(map[string]int) 41 | for lang, info := range languages { 42 | langTypeMap[lang] = typeToTypeConst[info.Type] 43 | } 44 | 45 | return langTypeMap 46 | } 47 | 48 | func executeTypesTemplate(out io.Writer, langTypeMap map[string]int, tmplPath, tmplName, commit string) error { 49 | return executeTemplate(out, tmplName, tmplPath, commit, nil, langTypeMap) 50 | } 51 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/java/Makefile: -------------------------------------------------------------------------------- 1 | JNAERATOR_VERSION=ac73c9e 2 | JARS_DIR=./lib 3 | JAR=$(JARS_DIR)/enry.jar 4 | JNAERATOR_DIR=./.jnaerator 5 | JNAERATOR_JAR=$(JNAERATOR_DIR)/jnaerator.jar 6 | JNAERATOR_JAR_URL="https://jitpack.io/com/github/nativelibs4java/JNAerator/jnaerator/$(JNAERATOR_VERSION)/jnaerator-$(JNAERATOR_VERSION)-shaded.jar" 7 | RESOURCES_SRC=../.shared 8 | RESOURCES_DIR=./shared 9 | HEADER_FILE=$(RESOURCES_DIR)/libenry.h 10 | 11 | SHELL := /bin/bash 12 | 13 | all: $(JAR) 14 | 15 | $(JAR): $(RESOURCES_DIR) $(JNAERATOR_JAR) 16 | mkdir -p lib && \ 17 | java -jar $(JNAERATOR_JAR) \ 18 | -package tech.sourced.enry.nativelib \ 19 | -library enry \ 20 | $(HEADER_FILE) \ 21 | -o $(JARS_DIR) \ 22 | -mode StandaloneJar \ 23 | -runtime JNA; 24 | 25 | $(RESOURCES_DIR): os-shared-lib 26 | cp -R $(RESOURCES_SRC) $(RESOURCES_DIR) 27 | 28 | $(JNAERATOR_JAR): $(RESOURCES_DIR) 29 | mkdir $(JNAERATOR_DIR) && \ 30 | wget $(JNAERATOR_JAR_URL) -O $(JNAERATOR_JAR) 31 | 32 | os-shared-lib: 33 | @os_name="$(shell uname -s)" && \ 34 | if [ "$$os_name" == "Linux" ]; then \ 35 | $(MAKE) linux-shared; \ 36 | elif [ "$$os_name" == "Darwin" ]; then \ 37 | $(MAKE) darwin-shared; \ 38 | else \ 39 | echo "Unsupported operating system, can't build shared library"; \ 40 | exit 1; \ 41 | fi; 42 | 43 | linux-shared: 44 | cd .. && \ 45 | $(MAKE) linux-shared 46 | 47 | darwin-shared: 48 | cd .. && \ 49 | $(MAKE) darwin-shared 50 | 51 | test: 52 | ./sbt clean test 53 | 54 | package: 55 | ./sbt clean assembly 56 | 57 | clean: 58 | rm -rf $(JAR) 59 | rm -rf $(RESOURCES_DIR) 60 | 61 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/java/src/main/java/tech/sourced/enry/Guess.java: -------------------------------------------------------------------------------- 1 | package tech.sourced.enry; 2 | 3 | /** 4 | * Guess denotes a language detection result of which enry can be 5 | * completely sure or not. 6 | */ 7 | public class Guess { 8 | /** 9 | * The resultant language of the detection. 10 | */ 11 | public String language; 12 | 13 | /** 14 | * Indicates whether the enry was completely sure the language is 15 | * the correct one or it might not be. 16 | */ 17 | public boolean safe; 18 | 19 | public Guess(String language, boolean safe) { 20 | this.language = language; 21 | this.safe = safe; 22 | } 23 | 24 | @Override 25 | public String toString() { 26 | return "Guess{" + 27 | "language='" + language + '\'' + ", safe=" + safe + 28 | '}'; 29 | } 30 | 31 | @Override 32 | public boolean equals(Object object) { 33 | if (this == object) return true; 34 | if (object == null || getClass() != object.getClass()) return false; 35 | if (!super.equals(object)) return false; 36 | 37 | Guess guess = (Guess) object; 38 | 39 | if (safe != guess.safe) return false; 40 | if (language != null ? !language.equals(guess.language) : guess.language != null) return false; 41 | 42 | return true; 43 | } 44 | 45 | public int hashCode() { 46 | int result = super.hashCode(); 47 | result = 23 * result + (language != null ? language.hashCode() : 0); 48 | result = 23 * result + (safe ? 1 : 0); 49 | return result; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/generator/generator.go: -------------------------------------------------------------------------------- 1 | package generator 2 | 3 | import ( 4 | "bytes" 5 | "go/format" 6 | "io" 7 | "io/ioutil" 8 | "path/filepath" 9 | "text/template" 10 | ) 11 | 12 | // File is the function's type that generate source file from a file to be parsed, linguist's samples dir and a template. 13 | type File func(fileToParse, samplesDir, outPath, tmplPath, tmplName, commit string) error 14 | 15 | func formatedWrite(outPath string, source []byte) error { 16 | formatedSource, err := format.Source(source) 17 | if err != nil { 18 | return err 19 | } 20 | if err := ioutil.WriteFile(outPath, formatedSource, 0666); err != nil { 21 | return err 22 | } 23 | return nil 24 | } 25 | 26 | func executeTemplate(w io.Writer, name, path, commit string, fmap template.FuncMap, data interface{}) error { 27 | getCommit := func() string { 28 | return commit 29 | } 30 | 31 | buf := bytes.NewBuffer(nil) 32 | 33 | const headerTmpl = "header.go.tmpl" 34 | 35 | headerPath := filepath.Join(filepath.Dir(path), headerTmpl) 36 | 37 | h := template.Must(template.New(headerTmpl).Funcs(template.FuncMap{ 38 | "getCommit": getCommit, 39 | }).ParseFiles(headerPath)) 40 | 41 | if err := h.Execute(buf, data); err != nil { 42 | return err 43 | } 44 | 45 | if fmap == nil { 46 | fmap = make(template.FuncMap) 47 | } 48 | fmap["getCommit"] = getCommit 49 | 50 | t := template.Must(template.New(name).Funcs(fmap).ParseFiles(path)) 51 | if err := t.Execute(buf, data); err != nil { 52 | return err 53 | } 54 | 55 | src, err := format.Source(buf.Bytes()) 56 | if err != nil { 57 | return err 58 | } 59 | _, err = w.Write(src) 60 | return err 61 | } 62 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/java/README.md: -------------------------------------------------------------------------------- 1 | # enry-java 2 | 3 | ## Usage 4 | 5 | `enry-java` package is available thorugh [maven central](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22enry-java%22), 6 | so it be used easily added as a dependency in various package management systems. 7 | Examples of how to handle it for most commons systems are included below, 8 | for other systems just look at maven central's dependency information. 9 | 10 | ### Apache Maven 11 | 12 | ```xml 13 | 14 | tech.sourced 15 | enry-java 16 | ${enry_version} 17 | 18 | ``` 19 | 20 | ### Scala SBT 21 | 22 | ```scala 23 | libraryDependencies += "tech.sourced" % "enry-java" % enryVersion 24 | ``` 25 | 26 | ## Build 27 | 28 | ### Requirements 29 | 30 | * `sbt` 31 | * `Java` (tested with Java 1.8) 32 | * `wget` 33 | * `Go` (only for building the shared objects for your operating system) 34 | 35 | ### Generate jar with Java bindings and shared libraries 36 | 37 | You need to do this before exporting the jar and/or testing. 38 | 39 | ``` 40 | make 41 | ``` 42 | 43 | This will download JNAerator jar to generate the code from the `libenry.h` header file, it will be placed under `lib`. 44 | The shared libraries for your operating system will be built if needed and copied inside the `shared` directory. 45 | 46 | For IntelliJ and other IDEs remember to mark `shared` folder as sources and add `lib/enry.jar` as library. If you use `sbt` from the command line directly that's already taken care of. 47 | 48 | ### Run tests 49 | 50 | ``` 51 | make test 52 | ``` 53 | 54 | ### Export jar 55 | 56 | ``` 57 | make package 58 | ``` 59 | 60 | Will build fatJar under `./target/enry-java-assembly-X.X.X.jar`. 61 | One can use `./sbt publish-local` to install enry-java dependency on local machine. 62 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/generator/aliases.go: -------------------------------------------------------------------------------- 1 | package generator 2 | 3 | import ( 4 | "bytes" 5 | "gopkg.in/yaml.v2" 6 | "io" 7 | "io/ioutil" 8 | "strings" 9 | ) 10 | 11 | // Aliases reads from fileToParse and builds source file from tmplPath. It complies with type File signature. 12 | func Aliases(fileToParse, samplesDir, outPath, tmplPath, tmplName, commit string) error { 13 | data, err := ioutil.ReadFile(fileToParse) 14 | if err != nil { 15 | return err 16 | } 17 | 18 | languages := make(map[string]*languageInfo) 19 | if err := yaml.Unmarshal(data, &languages); err != nil { 20 | return err 21 | } 22 | 23 | orderedLangList := getAlphabeticalOrderedKeys(languages) 24 | languagesByAlias := buildAliasLanguageMap(languages, orderedLangList) 25 | 26 | buf := &bytes.Buffer{} 27 | if err := executeAliasesTemplate(buf, languagesByAlias, tmplPath, tmplName, commit); err != nil { 28 | return err 29 | } 30 | 31 | return formatedWrite(outPath, buf.Bytes()) 32 | } 33 | 34 | func buildAliasLanguageMap(languages map[string]*languageInfo, orderedLangList []string) map[string]string { 35 | aliasLangsMap := make(map[string]string) 36 | for _, lang := range orderedLangList { 37 | langInfo := languages[lang] 38 | key := convertToAliasKey(lang) 39 | aliasLangsMap[key] = lang 40 | for _, alias := range langInfo.Aliases { 41 | key := convertToAliasKey(alias) 42 | aliasLangsMap[key] = lang 43 | } 44 | } 45 | 46 | return aliasLangsMap 47 | } 48 | 49 | func convertToAliasKey(s string) (key string) { 50 | key = strings.Replace(s, ` `, `_`, -1) 51 | key = strings.ToLower(key) 52 | return 53 | } 54 | 55 | func executeAliasesTemplate(out io.Writer, languagesByAlias map[string]string, aliasesTmplPath, aliasesTmpl, commit string) error { 56 | return executeTemplate(out, aliasesTmpl, aliasesTmplPath, commit, nil, languagesByAlias) 57 | } 58 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/generator/interpreters.go: -------------------------------------------------------------------------------- 1 | package generator 2 | 3 | import ( 4 | "bytes" 5 | "io" 6 | "io/ioutil" 7 | "strings" 8 | "text/template" 9 | 10 | "gopkg.in/yaml.v2" 11 | ) 12 | 13 | // Interpreters reads from fileToParse and builds source file from tmplPath. It complies with type File signature. 14 | func Interpreters(fileToParse, samplesDir, outPath, tmplPath, tmplName, commit string) error { 15 | data, err := ioutil.ReadFile(fileToParse) 16 | if err != nil { 17 | return err 18 | } 19 | 20 | languages := make(map[string]*languageInfo) 21 | if err := yaml.Unmarshal(data, &languages); err != nil { 22 | return err 23 | } 24 | 25 | orderedKeys := getAlphabeticalOrderedKeys(languages) 26 | languagesByInterpreter := buildInterpreterLanguagesMap(languages, orderedKeys) 27 | 28 | buf := &bytes.Buffer{} 29 | if err := executeInterpretersTemplate(buf, languagesByInterpreter, tmplPath, tmplName, commit); err != nil { 30 | return err 31 | } 32 | 33 | return formatedWrite(outPath, buf.Bytes()) 34 | } 35 | 36 | func buildInterpreterLanguagesMap(languages map[string]*languageInfo, orderedKeys []string) map[string][]string { 37 | interpreterLangsMap := make(map[string][]string) 38 | for _, lang := range orderedKeys { 39 | langInfo := languages[lang] 40 | for _, interpreter := range langInfo.Interpreters { 41 | interpreterLangsMap[interpreter] = append(interpreterLangsMap[interpreter], lang) 42 | } 43 | } 44 | 45 | return interpreterLangsMap 46 | } 47 | 48 | func executeInterpretersTemplate(out io.Writer, languagesByInterpreter map[string][]string, tmplPath, tmplName, commit string) error { 49 | fmap := template.FuncMap{ 50 | "formatStringSlice": func(slice []string) string { return `"` + strings.Join(slice, `","`) + `"` }, 51 | } 52 | return executeTemplate(out, tmplName, tmplPath, commit, fmap, languagesByInterpreter) 53 | } 54 | -------------------------------------------------------------------------------- /issues2019/adobe.txt: -------------------------------------------------------------------------------- 1 | github.com/adobe/adobeio-cna-auth-cache-dynamodb: misspell: README.md:13:71: "terminilogy" is a misspelling of "terminology" 2 | github.com/adobe/aem-cif-project-archetype: misspell: README.md:73:465: "upcomming" is a misspelling of "upcoming" 3 | github.com/adobe/aem-core-cif-components: misspell: ui.apps/src/main/content/jcr_root/apps/core/cif/components/content/button/v1/button/README.md:24:15: "avaialble" is a misspelling of "available" 4 | github.com/adobe/aem-core-cif-components: misspell: README.md:42:465: "upcomming" is a misspelling of "upcoming" 5 | github.com/adobe/aem-core-wcm-components: misspell: content/src/content/jcr_root/apps/core/wcm/components/page/v1/page/README.md:51:109: "configuraiton" is a misspelling of "configuration" 6 | github.com/adobe/aem-modernize-tools: misspell: CONTRIBUTING.md:43:19: "intented" is a misspelling of "intended" 7 | github.com/adobe/avmplus: misspell: gtest/gtest-1.6.0/README:75:59: "repositary" is a misspelling of "repository" 8 | github.com/adobe/avmplus: misspell: pcre2/README:349:57: "sytem" is a misspelling of "system" 9 | github.com/adobe/avmplus: misspell: pcre2/doc/html/README.txt:349:57: "sytem" is a misspelling of "system" 10 | github.com/adobe/brackets: misspell: src/extensions/samples/LocalizationExample/README.md:30:40: "substite" is a misspelling of "substitute" 11 | github.com/adobe/brackets: unwanted file: remove Vim swap file: src/nls/ko/.strings.js.swp 12 | github.com/adobe/butler: misspell: README.md:252:266: "percieved" is a misspelling of "perceived" 13 | github.com/adobe/commerce-cif-api: misspell: documentation/README.md:60:11: "negociation" is a misspelling of "negotiation" 14 | github.com/adobe/commerce-cif-api: misspell: README.md:65:198: "corresponsing" is a misspelling of "corresponding" 15 | github.com/adobe/commerce-cif-graphql-client: misspell: README.md:41:102: "overriden" is a misspelling of "overridden" 16 | github.com/adobe/commerce-cif-magento: misspell: customer-deployment/README.md:86:314: "environmnet" is a misspelling of "environments" 17 | github.com/adobe/frontend-regression-validator: misspell: README.md:7:13: "comparision" is a misspelling of "comparison" 18 | github.com/adobe/generator-tsx: misspell: generators/app/templates/src/utils/README.md:3:26: "supplimental" is a misspelling of "supplemental" 19 | github.com/adobe/helix-continuous: misspell: scripts/gdm/README.md:12:68: "dependends" is a misspelling of "depended" 20 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/java/build.sbt: -------------------------------------------------------------------------------- 1 | name := "enry-java" 2 | organization := "tech.sourced" 3 | version := "1.6.3" 4 | 5 | sonatypeProfileName := "tech.sourced" 6 | 7 | // pom settings for sonatype 8 | homepage := Some(url("https://github.com/src-d/enry")) 9 | scmInfo := Some(ScmInfo(url("https://github.com/src-d/enry"), 10 | "git@github.com:src-d/enry.git")) 11 | developers += Developer("abeaumont", 12 | "Alfredo Beaumont", 13 | "alfredo@sourced.tech", 14 | url("https://github.com/abeaumont")) 15 | licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0")) 16 | pomIncludeRepository := (_ => false) 17 | 18 | crossPaths := false 19 | autoScalaLibrary := false 20 | publishMavenStyle := true 21 | exportJars := true 22 | 23 | val SONATYPE_USERNAME = scala.util.Properties.envOrElse("SONATYPE_USERNAME", "NOT_SET") 24 | val SONATYPE_PASSWORD = scala.util.Properties.envOrElse("SONATYPE_PASSWORD", "NOT_SET") 25 | credentials += Credentials( 26 | "Sonatype Nexus Repository Manager", 27 | "oss.sonatype.org", 28 | SONATYPE_USERNAME, 29 | SONATYPE_PASSWORD) 30 | 31 | val SONATYPE_PASSPHRASE = scala.util.Properties.envOrElse("SONATYPE_PASSPHRASE", "not set") 32 | 33 | useGpg := false 34 | pgpSecretRing := baseDirectory.value / "project" / ".gnupg" / "secring.gpg" 35 | pgpPublicRing := baseDirectory.value / "project" / ".gnupg" / "pubring.gpg" 36 | pgpPassphrase := Some(SONATYPE_PASSPHRASE.toArray) 37 | 38 | libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test 39 | 40 | unmanagedBase := baseDirectory.value / "lib" 41 | unmanagedClasspath in Test += baseDirectory.value / "shared" 42 | unmanagedClasspath in Runtime += baseDirectory.value / "shared" 43 | unmanagedClasspath in Compile += baseDirectory.value / "shared" 44 | testOptions += Tests.Argument(TestFrameworks.JUnit) 45 | 46 | publishArtifact in (Compile, packageBin) := false 47 | 48 | artifact in (Compile, assembly) := { 49 | val art = (artifact in (Compile, assembly)).value 50 | art.copy(`classifier` = None) 51 | } 52 | 53 | addArtifact(artifact in (Compile, assembly), assembly) 54 | 55 | isSnapshot := version.value endsWith "SNAPSHOT" 56 | 57 | publishTo := { 58 | val nexus = "https://oss.sonatype.org/" 59 | if (isSnapshot.value) 60 | Some("snapshots" at nexus + "content/repositories/snapshots") 61 | else 62 | Some("releases" at nexus + "service/local/staging/deploy/maven2") 63 | } 64 | -------------------------------------------------------------------------------- /issues2019/cloudflare.txt: -------------------------------------------------------------------------------- 1 | github.com/cloudflare/backoff: code snippet: block #1: add "go" language marker 2 | github.com/cloudflare/backoff: code snippet: block #2: add "go" language marker 3 | github.com/cloudflare/certmgr: misspell: README.md:163:58: "htis" is a misspelling of "this" 4 | github.com/cloudflare/cf-ui: misspell: packages/cf-component-box/README.md:10:79: "accomodate" is a misspelling of "accommodate" 5 | github.com/cloudflare/cf-ui: misspell: CONTRIBUTING.md:18:3: "Commiting" is a misspelling of "Committing" 6 | github.com/cloudflare/cf-ui: misspell: packages/cf-component-notifications/README.md:111:14: "Persistant" is a misspelling of "Persistent" 7 | github.com/cloudflare/cloudflare-blog: misspell: 2019-04-ebpf-alu32/README.md:23:13: "calcualte" is a misspelling of "calculate" 8 | github.com/cloudflare/Cloudflare-CPanel: misspell: README.md:18:275: "immedietely" is a misspelling of "immediately" 9 | github.com/cloudflare/hugo-cloudflare-docs: misspell: static/revealjs/css/theme/README.md:3:222: "proceding" is a misspelling of "proceeding" 10 | github.com/cloudflare/hugo-cloudflare-docs: misspell: static/revealjs/README.md:847:213: "presention" is a misspelling of "presenting" 11 | github.com/cloudflare/json-schema-tools: misspell: workspaces/json-schema-walker/README.md:37:27: "direclty" is a misspelling of "directly" 12 | github.com/cloudflare/lazyhtml: misspell: README.md:65:52: "propertly" is a misspelling of "property" 13 | github.com/cloudflare/lua-resty-json: misspell: README.md:49:13: "interperted" is a misspelling of "interpreted" 14 | github.com/cloudflare/mitmengine: code snippet: block #2: add "go" language marker 15 | github.com/cloudflare/mmproxy: misspell: README.md:80:64: "exemple" is a misspelling of "example" 16 | github.com/cloudflare/pmtud: misspell: README.md:79:20: "neccesary" is a misspelling of "necessary" 17 | github.com/cloudflare/react-modal2: misspell: README.md:230:69: "whereever" is a misspelling of "wherever" 18 | github.com/cloudflare/serverless-cloudflare-workers: misspell: README.md:44:59: "vairables" is a misspelling of "variables" 19 | github.com/cloudflare/serverless-cloudflare-workers: misspell: README.md:57:150: "defintion" is a misspelling of "definition" 20 | github.com/cloudflare/unsee: misspell: README.md:61:65: "withing" is a misspelling of "within" 21 | github.com/cloudflare/workers-docs: misspell: CONTRIBUTING.md:49:276: "documenation" is a misspelling of "documentation" 22 | github.com/cloudflare/workers-react-pwa-example: misspell: README.md:35:6: "exmaple" is a misspelling of "example" 23 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/java/src/main/java/tech/sourced/enry/GoUtils.java: -------------------------------------------------------------------------------- 1 | package tech.sourced.enry; 2 | 3 | import com.sun.jna.Memory; 4 | import com.sun.jna.Pointer; 5 | import tech.sourced.enry.nativelib.GoSlice; 6 | import tech.sourced.enry.nativelib.GoString; 7 | 8 | import java.io.UnsupportedEncodingException; 9 | 10 | class GoUtils { 11 | 12 | static GoString.ByValue toGoString(String str) { 13 | byte[] bytes; 14 | try { 15 | bytes = str.getBytes("utf-8"); 16 | } catch (UnsupportedEncodingException e) { 17 | bytes = str.getBytes(); 18 | } catch (NullPointerException e) { 19 | bytes = null; 20 | } 21 | 22 | int length = 0; 23 | Pointer ptr = null; 24 | if (bytes != null) { 25 | length = bytes.length; 26 | ptr = ptrFromBytes(bytes); 27 | } 28 | 29 | GoString.ByValue val = new GoString.ByValue(); 30 | val.n = length; 31 | val.p = ptr; 32 | return val; 33 | } 34 | 35 | static String toJavaString(GoString str) { 36 | if (str.n == 0) { 37 | return ""; 38 | } 39 | 40 | byte[] bytes = new byte[(int) str.n]; 41 | str.p.read(0, bytes, 0, (int) str.n); 42 | try { 43 | return new String(bytes, "utf-8"); 44 | } catch (UnsupportedEncodingException e) { 45 | throw new RuntimeException("utf-8 encoding is not supported"); 46 | } 47 | } 48 | 49 | static String[] toJavaStringArray(GoSlice slice) { 50 | String[] result = new String[(int) slice.len]; 51 | Pointer[] ptrArr = slice.data.getPointerArray(0, (int) slice.len); 52 | for (int i = 0; i < (int) slice.len; i++) { 53 | result[i] = ptrArr[i].getString(0); 54 | } 55 | return result; 56 | } 57 | 58 | static GoSlice.ByValue toGoByteSlice(byte[] bytes) { 59 | int length = 0; 60 | Pointer ptr = null; 61 | if (bytes != null && bytes.length > 0) { 62 | length = bytes.length; 63 | ptr = ptrFromBytes(bytes); 64 | } 65 | 66 | return sliceFromPtr(length, ptr); 67 | } 68 | 69 | static GoSlice.ByValue sliceFromPtr(int len, Pointer ptr) { 70 | GoSlice.ByValue val = new GoSlice.ByValue(); 71 | val.cap = len; 72 | val.len = len; 73 | val.data = ptr; 74 | return val; 75 | } 76 | 77 | static Pointer ptrFromBytes(byte[] bytes) { 78 | Pointer ptr = new Memory(bytes.length); 79 | ptr.write(0, bytes, 0, bytes.length); 80 | return ptr; 81 | } 82 | 83 | static boolean toJavaBool(byte goBool) { 84 | return goBool == 1; 85 | } 86 | 87 | } 88 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/generator/filenames.go: -------------------------------------------------------------------------------- 1 | package generator 2 | 3 | import ( 4 | "bytes" 5 | "io" 6 | "io/ioutil" 7 | "os" 8 | "path/filepath" 9 | "strings" 10 | "text/template" 11 | 12 | yaml "gopkg.in/yaml.v2" 13 | ) 14 | 15 | // Filenames reads from fileToParse and builds source file from tmplPath. It complies with type File signature. 16 | func Filenames(fileToParse, samplesDir, outPath, tmplPath, tmplName, commit string) error { 17 | data, err := ioutil.ReadFile(fileToParse) 18 | if err != nil { 19 | return err 20 | } 21 | 22 | languages := make(map[string]*languageInfo) 23 | if err := yaml.Unmarshal(data, &languages); err != nil { 24 | return err 25 | } 26 | 27 | if err := walkSamplesFilenames(samplesDir, languages); err != nil { 28 | return err 29 | } 30 | 31 | languagesByFilename := buildFilenameLanguageMap(languages) 32 | 33 | buf := &bytes.Buffer{} 34 | if err := executeFilenamesTemplate(buf, languagesByFilename, tmplPath, tmplName, commit); err != nil { 35 | return err 36 | } 37 | 38 | return formatedWrite(outPath, buf.Bytes()) 39 | } 40 | 41 | func walkSamplesFilenames(samplesDir string, languages map[string]*languageInfo) error { 42 | const filenamesDir = "filenames" 43 | var language string 44 | err := filepath.Walk(samplesDir, func(path string, f os.FileInfo, err error) error { 45 | if err != nil { 46 | return err 47 | } 48 | 49 | if f.IsDir() { 50 | if f.Name() != filenamesDir { 51 | language = f.Name() 52 | } 53 | 54 | return nil 55 | } 56 | 57 | parentDir := filepath.Base(filepath.Dir(path)) 58 | if parentDir != filenamesDir { 59 | return nil 60 | } 61 | 62 | info, ok := languages[language] 63 | if !ok { 64 | info = &languageInfo{Filenames: []string{}} 65 | } 66 | 67 | for _, filename := range info.Filenames { 68 | if filename == f.Name() { 69 | return nil 70 | } 71 | } 72 | 73 | info.Filenames = append(info.Filenames, f.Name()) 74 | 75 | return nil 76 | }) 77 | 78 | return err 79 | } 80 | 81 | func buildFilenameLanguageMap(languages map[string]*languageInfo) map[string][]string { 82 | filenameLangMap := make(map[string][]string) 83 | for lang, langInfo := range languages { 84 | for _, filename := range langInfo.Filenames { 85 | filenameLangMap[filename] = append(filenameLangMap[filename], lang) 86 | } 87 | } 88 | 89 | return filenameLangMap 90 | } 91 | 92 | func executeFilenamesTemplate(out io.Writer, languagesByFilename map[string][]string, tmplPath, tmplName, commit string) error { 93 | fmap := template.FuncMap{ 94 | "formatStringSlice": func(slice []string) string { return `"` + strings.Join(slice, `","`) + `"` }, 95 | } 96 | return executeTemplate(out, tmplName, tmplPath, commit, fmap, languagesByFilename) 97 | } 98 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/generator/extensions.go: -------------------------------------------------------------------------------- 1 | package generator 2 | 3 | import ( 4 | "bytes" 5 | "io" 6 | "io/ioutil" 7 | "strings" 8 | "text/template" 9 | 10 | yaml "gopkg.in/yaml.v2" 11 | ) 12 | 13 | type extensionsInfo struct { 14 | LanguagesByExtension map[string][]string 15 | ExtensionsByLanguage map[string][]string 16 | } 17 | 18 | // Extensions reads from fileToParse and builds source file from tmplPath. It complies with type File signature. 19 | func Extensions(fileToParse, samplesDir, outPath, tmplPath, tmplName, commit string) error { 20 | data, err := ioutil.ReadFile(fileToParse) 21 | if err != nil { 22 | return err 23 | } 24 | 25 | languages := make(map[string]*languageInfo) 26 | if err := yaml.Unmarshal(data, &languages); err != nil { 27 | return err 28 | } 29 | 30 | extensionsToLower(languages) 31 | extInfo := &extensionsInfo{} 32 | orderedKeyList := getAlphabeticalOrderedKeys(languages) 33 | extInfo.LanguagesByExtension = buildExtensionLanguageMap(languages, orderedKeyList) 34 | extInfo.ExtensionsByLanguage = buildLanguageExtensionsMap(languages) 35 | 36 | buf := &bytes.Buffer{} 37 | if err := executeExtensionsTemplate(buf, extInfo, tmplPath, tmplName, commit); err != nil { 38 | return err 39 | } 40 | 41 | return formatedWrite(outPath, buf.Bytes()) 42 | } 43 | 44 | func extensionsToLower(languages map[string]*languageInfo) { 45 | for _, info := range languages { 46 | info.Extensions = stringSliceToLower(info.Extensions) 47 | } 48 | } 49 | 50 | func stringSliceToLower(slice []string) []string { 51 | toLower := make([]string, 0, len(slice)) 52 | for _, s := range slice { 53 | toLower = append(toLower, strings.ToLower(s)) 54 | } 55 | 56 | return toLower 57 | } 58 | 59 | func buildExtensionLanguageMap(languages map[string]*languageInfo, orderedKeyList []string) map[string][]string { 60 | extensionLangsMap := make(map[string][]string) 61 | for _, lang := range orderedKeyList { 62 | langInfo := languages[lang] 63 | for _, extension := range langInfo.Extensions { 64 | extensionLangsMap[extension] = append(extensionLangsMap[extension], lang) 65 | } 66 | } 67 | 68 | return extensionLangsMap 69 | } 70 | 71 | func buildLanguageExtensionsMap(languages map[string]*languageInfo) map[string][]string { 72 | langExtensionMap := make(map[string][]string, len(languages)) 73 | for lang, info := range languages { 74 | if len(info.Extensions) > 0 { 75 | langExtensionMap[lang] = info.Extensions 76 | } 77 | } 78 | 79 | return langExtensionMap 80 | } 81 | 82 | func executeExtensionsTemplate(out io.Writer, extInfo *extensionsInfo, tmplPath, tmplName, commit string) error { 83 | fmap := template.FuncMap{ 84 | "formatStringSlice": func(slice []string) string { return `"` + strings.Join(slice, `","`) + `"` }, 85 | } 86 | return executeTemplate(out, tmplName, tmplPath, commit, fmap, extInfo) 87 | } 88 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/benchmarks/linguist-total.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require 'benchmark' 4 | require 'linguist' 5 | 6 | iterations = (ARGV[0] || 1).to_i 7 | 8 | # BenchBlob wraps a FileBlob to keep data loaded and to clean attributes added by language detection. 9 | class BenchBlob < Linguist::FileBlob 10 | attr_accessor :data 11 | attr_accessor :fullpath 12 | 13 | def initialize(path, base_path = nil) 14 | super 15 | @data = File.read(@fullpath) 16 | end 17 | 18 | def clean 19 | @_mime_type = nil 20 | @detect_encoding = nil 21 | @lines = nil 22 | end 23 | end 24 | 25 | def get_samples(root) 26 | samples = Array.new 27 | Dir.foreach(root) do |file| 28 | path = File.join(root, file) 29 | if file == "." or file == ".." 30 | next 31 | elsif File.directory?(path) 32 | get_samples(path).each do |blob| 33 | samples << blob 34 | end 35 | else 36 | samples << BenchBlob.new(path) 37 | end 38 | end 39 | return samples 40 | end 41 | 42 | samples = get_samples('.linguist/samples') 43 | languages = Linguist::Language.all 44 | 45 | Benchmark.bmbm do |bm| 46 | time = bm.report('GetLanguage()_TOTAL ' + iterations.to_s) do 47 | iterations.times do 48 | samples.each do |blob| 49 | Linguist::detect(blob) 50 | blob.clean 51 | end 52 | end 53 | end 54 | end 55 | 56 | Benchmark.bmbm do |bm| 57 | bm.report('Classify()_TOTAL ' + iterations.to_s) do 58 | iterations.times do 59 | samples.each do |blob| 60 | Linguist::Classifier.classify(Linguist::Samples.cache, blob.data) 61 | blob.clean 62 | end 63 | end 64 | end 65 | end 66 | 67 | Benchmark.bmbm do |bm| 68 | bm.report('GetLanguagesByModeline()_TOTAL ' + iterations.to_s) do 69 | iterations.times do 70 | samples.each do |blob| 71 | Linguist::Strategy::Modeline.call(blob, languages) 72 | blob.clean 73 | end 74 | end 75 | end 76 | end 77 | 78 | Benchmark.bmbm do |bm| 79 | bm.report('GetLanguagesByFilename()_TOTAL ' + iterations.to_s) do 80 | iterations.times do 81 | samples.each do |blob| 82 | Linguist::Strategy::Filename.call(blob, languages) 83 | blob.clean 84 | end 85 | end 86 | end 87 | end 88 | 89 | Benchmark.bmbm do |bm| 90 | bm.report('GetLanguagesByShebang()_TOTAL ' + iterations.to_s) do 91 | iterations.times do 92 | samples.each do |blob| 93 | Linguist::Shebang.call(blob, languages) 94 | blob.clean 95 | end 96 | end 97 | end 98 | end 99 | 100 | Benchmark.bmbm do |bm| 101 | bm.report('GetLanguagesByExtension()_TOTAL ' + iterations.to_s) do 102 | iterations.times do 103 | samples.each do |blob| 104 | Linguist::Strategy::Extension.call(blob, languages) 105 | blob.clean 106 | end 107 | end 108 | end 109 | end 110 | 111 | Benchmark.bmbm do |bm| 112 | bm.report('GetLanguagesByContent()_TOTAL ' + iterations.to_s) do 113 | iterations.times do 114 | samples.each do |blob| 115 | Linguist::Heuristics.call(blob, languages) 116 | blob.clean 117 | end 118 | end 119 | end 120 | end 121 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/generator/test_files/interpreter.gold: -------------------------------------------------------------------------------- 1 | // Code generated by gopkg.in/src-d/enry.v1/internal/code-generator DO NOT EDIT. 2 | // Extracted from github/linguist commit: d5c8db3fb91963c4b2762ca2ea2ff7cfac109f68 3 | 4 | package data 5 | 6 | var LanguagesByInterpreter = map[string][]string{ 7 | "Rscript": {"R"}, 8 | "apl": {"APL"}, 9 | "aplx": {"APL"}, 10 | "awk": {"Awk"}, 11 | "bash": {"Shell"}, 12 | "bigloo": {"Scheme"}, 13 | "boolector": {"SMT"}, 14 | "ccl": {"Common Lisp"}, 15 | "chicken": {"Scheme"}, 16 | "clisp": {"Common Lisp"}, 17 | "coffee": {"CoffeeScript"}, 18 | "crystal": {"Crystal"}, 19 | "csi": {"Scheme"}, 20 | "cvc4": {"SMT"}, 21 | "dart": {"Dart"}, 22 | "dtrace": {"DTrace"}, 23 | "dyalog": {"APL"}, 24 | "ecl": {"Common Lisp"}, 25 | "elixir": {"Elixir"}, 26 | "escript": {"Erlang"}, 27 | "fish": {"fish"}, 28 | "gawk": {"Awk"}, 29 | "gn": {"GN"}, 30 | "gnuplot": {"Gnuplot"}, 31 | "gosh": {"Scheme"}, 32 | "groovy": {"Groovy"}, 33 | "guile": {"Scheme"}, 34 | "instantfpc": {"Pascal"}, 35 | "io": {"Io"}, 36 | "ioke": {"Ioke"}, 37 | "jconsole": {"J"}, 38 | "jolie": {"Jolie"}, 39 | "jruby": {"Ruby"}, 40 | "julia": {"Julia"}, 41 | "lisp": {"Common Lisp"}, 42 | "lsl": {"LSL"}, 43 | "lua": {"Lua", "Terra"}, 44 | "macruby": {"Ruby"}, 45 | "make": {"Makefile"}, 46 | "mathsat5": {"SMT"}, 47 | "mawk": {"Awk"}, 48 | "mmi": {"Mercury"}, 49 | "moon": {"MoonScript"}, 50 | "nawk": {"Awk"}, 51 | "newlisp": {"NewLisp"}, 52 | "node": {"JavaScript"}, 53 | "nush": {"Nu"}, 54 | "ocaml": {"OCaml", "Reason"}, 55 | "ocamlrun": {"OCaml"}, 56 | "ocamlscript": {"OCaml"}, 57 | "openrc-run": {"OpenRC runscript"}, 58 | "opensmt": {"SMT"}, 59 | "osascript": {"AppleScript"}, 60 | "parrot": {"Parrot Assembly", "Parrot Internal Representation"}, 61 | "perl": {"Perl"}, 62 | "perl6": {"Perl 6"}, 63 | "php": {"PHP"}, 64 | "picolisp": {"PicoLisp"}, 65 | "pike": {"Pike"}, 66 | "pil": {"PicoLisp"}, 67 | "python": {"Python"}, 68 | "python2": {"Python"}, 69 | "python3": {"Python"}, 70 | "qmake": {"QMake"}, 71 | "r6rs": {"Scheme"}, 72 | "racket": {"Racket"}, 73 | "rake": {"Ruby"}, 74 | "rbx": {"Ruby"}, 75 | "rc": {"Shell"}, 76 | "regina": {"REXX"}, 77 | "rexx": {"REXX"}, 78 | "ruby": {"Ruby"}, 79 | "rune": {"E"}, 80 | "runhaskell": {"Haskell"}, 81 | "sbcl": {"Common Lisp"}, 82 | "scala": {"Scala"}, 83 | "sclang": {"SuperCollider"}, 84 | "scsynth": {"SuperCollider"}, 85 | "sh": {"Shell"}, 86 | "smt-rat": {"SMT"}, 87 | "smtinterpol": {"SMT"}, 88 | "stp": {"SMT"}, 89 | "swipl": {"Prolog"}, 90 | "tcc": {"C"}, 91 | "tclsh": {"Tcl"}, 92 | "verit": {"SMT"}, 93 | "wish": {"Tcl"}, 94 | "yap": {"Prolog"}, 95 | "yices2": {"SMT"}, 96 | "z3": {"SMT"}, 97 | "zsh": {"Shell"}, 98 | } 99 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/classifier.go: -------------------------------------------------------------------------------- 1 | package enry 2 | 3 | import ( 4 | "math" 5 | "sort" 6 | 7 | "gopkg.in/src-d/enry.v1/internal/tokenizer" 8 | ) 9 | 10 | // Classifier is the interface in charge to detect the possible languages of the given content based on a set of 11 | // candidates. Candidates is a map which can be used to assign weights to languages dynamically. 12 | type Classifier interface { 13 | Classify(content []byte, candidates map[string]float64) (languages []string) 14 | } 15 | 16 | type classifier struct { 17 | languagesLogProbabilities map[string]float64 18 | tokensLogProbabilities map[string]map[string]float64 19 | tokensTotal float64 20 | } 21 | 22 | type scoredLanguage struct { 23 | language string 24 | score float64 25 | } 26 | 27 | // Classify returns a sorted slice of possible languages sorted by decreasing language's probability 28 | func (c *classifier) Classify(content []byte, candidates map[string]float64) []string { 29 | if len(content) == 0 { 30 | return nil 31 | } 32 | 33 | var languages map[string]float64 34 | if len(candidates) == 0 { 35 | languages = c.knownLangs() 36 | } else { 37 | languages = make(map[string]float64, len(candidates)) 38 | for candidate, weight := range candidates { 39 | if lang, ok := GetLanguageByAlias(candidate); ok { 40 | candidate = lang 41 | } 42 | 43 | languages[candidate] = weight 44 | } 45 | } 46 | 47 | tokens := tokenizer.Tokenize(content) 48 | scoredLangs := make([]*scoredLanguage, 0, len(languages)) 49 | for language := range languages { 50 | scoredLang := &scoredLanguage{ 51 | language: language, 52 | score: c.tokensLogProbability(tokens, language) + c.languagesLogProbabilities[language], 53 | } 54 | 55 | scoredLangs = append(scoredLangs, scoredLang) 56 | } 57 | 58 | return sortLanguagesByScore(scoredLangs) 59 | } 60 | 61 | func sortLanguagesByScore(scoredLangs []*scoredLanguage) []string { 62 | sort.Stable(byScore(scoredLangs)) 63 | sortedLanguages := make([]string, 0, len(scoredLangs)) 64 | for _, scoredLang := range scoredLangs { 65 | sortedLanguages = append(sortedLanguages, scoredLang.language) 66 | } 67 | 68 | return sortedLanguages 69 | } 70 | 71 | func (c *classifier) knownLangs() map[string]float64 { 72 | langs := make(map[string]float64, len(c.languagesLogProbabilities)) 73 | for lang := range c.languagesLogProbabilities { 74 | langs[lang]++ 75 | } 76 | 77 | return langs 78 | } 79 | 80 | func (c *classifier) tokensLogProbability(tokens []string, language string) float64 { 81 | var sum float64 82 | for _, token := range tokens { 83 | sum += c.tokenProbability(token, language) 84 | } 85 | 86 | return sum 87 | } 88 | 89 | func (c *classifier) tokenProbability(token, language string) float64 { 90 | tokenProb, ok := c.tokensLogProbabilities[language][token] 91 | if !ok { 92 | tokenProb = math.Log(1.000000 / c.tokensTotal) 93 | } 94 | 95 | return tokenProb 96 | } 97 | 98 | type byScore []*scoredLanguage 99 | 100 | func (b byScore) Len() int { return len(b) } 101 | func (b byScore) Swap(i, j int) { b[i], b[j] = b[j], b[i] } 102 | func (b byScore) Less(i, j int) bool { return b[j].score < b[i].score } 103 | -------------------------------------------------------------------------------- /issues2019/redhat.txt: -------------------------------------------------------------------------------- 1 | github.com/RedHatOfficial/ansible-redhat_cloudforms: misspell: README.md:109:109: "Tempalte" is a misspelling of "Template" 2 | github.com/RedHatOfficial/ansible-redhat_openshift_utils: misspell: README.md:12:77: "seperate" is a misspelling of "separate" 3 | github.com/RedHatOfficial/ansible-redhat_openshift_utils: misspell: README.md:49:90: "assoicated" is a misspelling of "associated" 4 | github.com/RedHatOfficial/ansible-redhat_satellite6: misspell: roles/redhat_satellite6_storage/README.md:2:93: "Satelite" is a misspelling of "Satellite" 5 | github.com/RedHatOfficial/miq-LDAP: misspell: README:40:37: "overriden" is a misspelling of "overridden" 6 | github.com/RedHatOfficial/miq-LDAP: misspell: README:132:265: "mutliple" is a misspelling of "multiple" 7 | github.com/RedHatOfficial/miq-LDAP: misspell: README.md:40:37: "overriden" is a misspelling of "overridden" 8 | github.com/RedHatOfficial/miq-LDAP: misspell: README.md:132:265: "mutliple" is a misspelling of "multiple" 9 | github.com/RedHatOfficial/miq-Utilities: misspell: TODO.md:7:44: "configuraiton" is a misspelling of "configuration" 10 | github.com/RedHatOfficial/miq-Utilities: misspell: README.md:28:99: "tempaltes" is a misspelling of "templates" 11 | github.com/RedHatOfficial/miq-Utilities: misspell: README.md:111:83: "guarentee" is a misspelling of "guarantee" 12 | github.com/RedHatOfficial/miq-Utilities: misspell: README.md:119:210: "determinging" is a misspelling of "determining" 13 | github.com/RedHatOfficial/miq-Utilities: misspell: README.md:119:246: "determing" is a misspelling of "determining" 14 | github.com/RedHatOfficial/miq-Utilities: misspell: README:28:99: "tempaltes" is a misspelling of "templates" 15 | github.com/RedHatOfficial/miq-Utilities: misspell: README.md:121:210: "determinging" is a misspelling of "determining" 16 | github.com/RedHatOfficial/miq-Utilities: misspell: README.md:121:246: "determing" is a misspelling of "determining" 17 | github.com/RedHatOfficial/miq-Utilities: misspell: README:111:83: "guarentee" is a misspelling of "guarantee" 18 | github.com/RedHatOfficial/miq-Utilities: misspell: README.md:148:26: "repoistory" is a misspelling of "repository" 19 | github.com/RedHatOfficial/miq-Utilities: misspell: README:119:210: "determinging" is a misspelling of "determining" 20 | github.com/RedHatOfficial/miq-Utilities: misspell: README:119:246: "determing" is a misspelling of "determining" 21 | github.com/RedHatOfficial/miq-Utilities: misspell: README:121:210: "determinging" is a misspelling of "determining" 22 | github.com/RedHatOfficial/miq-Utilities: misspell: README:121:246: "determing" is a misspelling of "determining" 23 | github.com/RedHatOfficial/miq-Utilities: misspell: README:148:26: "repoistory" is a misspelling of "repository" 24 | github.com/RedHatOfficial/odie: misspell: roles/kickstart-generator/README.md:25:75: "overriden" is a misspelling of "overridden" 25 | github.com/RedHatOfficial/odie: misspell: README.adoc:208:18: "intial" is a misspelling of "initial" 26 | github.com/RedHatOfficial/odie: unwanted file: remove Vim swap file: contrib/postgresql-container-stig/.Dockerfile.rhel7.swp 27 | github.com/RedHatOfficial/odie: unwanted file: remove Vim swap file: playbooks/security/.configure_pivproxy_roles.yml.swp 28 | github.com/RedHatOfficial/rhsecapi: misspell: README.md:835:32: "ammount" is a misspelling of "amount" 29 | github.com/RedHatOfficial/rhsecapi: misspell: README.md:889:32: "ammount" is a misspelling of "amount" 30 | -------------------------------------------------------------------------------- /issues2019/twitter.txt: -------------------------------------------------------------------------------- 1 | github.com/twitter/cloudhopper-commons: misspell: ch-commons-sql/TODO:14:38: "determing" is a misspelling of "determining" 2 | github.com/twitter/cloudhopper-commons: misspell: ch-commons-rfs/README:74:0: "paramter" is a misspelling of "parameter" 3 | github.com/twitter/commons: misspell: build-support/checkstyle/README:3:49: "reccomended" is a misspelling of "recommended" 4 | github.com/twitter/distributedlog: misspell: README.md:88:263: "developement" is a misspelling of "development" 5 | github.com/twitter/distributedlog: misspell: docs/README.md:24:8: "developement" is a misspelling of "development" 6 | github.com/twitter/go-bindata: misspell: CONTRIBUTING.md:29:33: "unneccesary" is a misspelling of "unnecessary" 7 | github.com/twitter/go-bindata: misspell: README.md:3:36: "managable" is a misspelling of "manageable" 8 | github.com/twitter/go-bindata: misspell: README.md:157:0: "desireable" is a misspelling of "desirable" 9 | github.com/twitter/go-bindata: code snippet: block #7: add "go" language marker 10 | github.com/twitter/hraven: misspell: README.md:187:140: "sucessful" is a misspelling of "successful" 11 | github.com/twitter/ios-twitter-image-pipeline: misspell: README.md:357:57: "explicitely" is a misspelling of "explicitly" 12 | github.com/twitter/ios-twitter-logging-service: misspell: README.md:109:313: "explicitely" is a misspelling of "explicitly" 13 | github.com/twitter/ios-twitter-logging-service: misspell: README.md:167:358: "explicitely" is a misspelling of "explicitly" 14 | github.com/twitter/ios-twitter-network-layer: misspell: README.md:102:32: "resuable" is a misspelling of "reusable" 15 | github.com/twitter/ios-twitter-network-layer: misspell: README.md:206:20: "explicitely" is a misspelling of "explicitly" 16 | github.com/twitter/ios-twitter-network-layer: misspell: README.md:305:63: "properites" is a misspelling of "properties" 17 | github.com/twitter/nodes: misspell: README.md:311:58: "wiht" is a misspelling of "with" 18 | github.com/twitter/scoot: misspell: bazel/remoteexecution/README.md:65:24: "compatibilty" is a misspelling of "compatibility" 19 | github.com/twitter/torch-autograd: misspell: README.md:232:74: "arbitarily" is a misspelling of "arbitrarily" 20 | github.com/twitter/twemcache: misspell: scripts/README.twctop.md:45:57: "happends" is a misspelling of "happens" 21 | github.com/twitter/twemcache: misspell: README.md:95:407: "inital" is a misspelling of "initial" 22 | github.com/twitter/twitter-cldr-rb: misspell: README.md:466:134: "tradicional" is a misspelling of "traditional" 23 | github.com/twitter/twitter-cldr-rb: misspell: README.md:472:93: "tradicional" is a misspelling of "traditional" 24 | github.com/twitter/twitter-cldr-rb: misspell: README.md:476:57: "tradicional" is a misspelling of "traditional" 25 | github.com/twitter/twitter-cldr-rb: misspell: README.md:477:93: "tradicional" is a misspelling of "traditional" 26 | github.com/twitter/twitter-cldr-rb: misspell: README.md.erb:420:206: "tradicional" is a misspelling of "traditional" 27 | github.com/twitter/twitter-cldr-rb: misspell: README.md.erb:426:174: "tradicional" is a misspelling of "traditional" 28 | github.com/twitter/twitter-cldr-rb: misspell: README.md.erb:430:57: "tradicional" is a misspelling of "traditional" 29 | github.com/twitter/twitter-cldr-rb: misspell: README.md.erb:430:154: "tradicional" is a misspelling of "traditional" 30 | github.com/twitter/twitter-cldr-rb: misspell: README.md.erb:431:188: "tradicional" is a misspelling of "traditional" 31 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/Makefile: -------------------------------------------------------------------------------- 1 | # Package configuration 2 | PROJECT = enry 3 | COMMANDS = cli/enry 4 | 5 | # Including ci Makefile 6 | MAKEFILE = Makefile.main 7 | CI_REPOSITORY = https://github.com/src-d/ci.git 8 | CI_FOLDER = .ci 9 | $(MAKEFILE): 10 | @git clone --quiet $(CI_REPOSITORY) $(CI_FOLDER); \ 11 | cp $(CI_FOLDER)/$(MAKEFILE) .; 12 | -include $(MAKEFILE) 13 | 14 | # Docsrv: configure the languages whose api-doc can be auto generated 15 | LANGUAGES = go 16 | # Docs: do not edit this 17 | DOCS_REPOSITORY := https://github.com/src-d/docs 18 | SHARED_PATH ?= $(shell pwd)/.docsrv-resources 19 | DOCS_PATH ?= $(SHARED_PATH)/.docs 20 | $(DOCS_PATH)/Makefile.inc: 21 | git clone --quiet --depth 1 $(DOCS_REPOSITORY) $(DOCS_PATH); 22 | -include $(DOCS_PATH)/Makefile.inc 23 | 24 | LINGUIST_PATH = .linguist 25 | 26 | # build CLI 27 | LOCAL_TAG := $(shell git describe --tags --abbrev=0) 28 | LOCAL_COMMIT := $(shell git rev-parse --short HEAD) 29 | LOCAL_BUILD := $(shell date +"%m-%d-%Y_%H_%M_%S") 30 | LOCAL_LDFLAGS = -s -X main.version=$(LOCAL_TAG) -X main.build=$(LOCAL_BUILD) -X main.commit=$(LOCAL_COMMIT) 31 | 32 | # shared objects 33 | RESOURCES_DIR=./.shared 34 | LINUX_DIR=$(RESOURCES_DIR)/linux-x86-64 35 | LINUX_SHARED_LIB=$(LINUX_DIR)/libenry.so 36 | DARWIN_DIR=$(RESOURCES_DIR)/darwin 37 | DARWIN_SHARED_LIB=$(DARWIN_DIR)/libenry.dylib 38 | HEADER_FILE=libenry.h 39 | NATIVE_LIB=./shared/enry.go 40 | 41 | # source files to be patched for using "rubex" instead of "regexp" 42 | RUBEX_PATCHED := internal/code-generator/generator/heuristics.go internal/tokenizer/tokenize.go common.go 43 | RUBEX_ORIG := $(RUBEX_PATCHED:=.orig) 44 | 45 | .PHONY: revert-oniguruma 46 | 47 | $(LINGUIST_PATH): 48 | git clone https://github.com/github/linguist.git $@ 49 | 50 | clean-linguist: 51 | rm -rf $(LINGUIST_PATH) 52 | 53 | clean-shared: 54 | rm -rf $(RESOURCES_DIR) 55 | 56 | clean: clean-linguist clean-shared 57 | 58 | code-generate: $(LINGUIST_PATH) 59 | mkdir -p data 60 | go run internal/code-generator/main.go 61 | 62 | benchmarks: $(LINGUIST_PATH) 63 | go test -run=NONE -bench=. && benchmarks/linguist-total.sh 64 | 65 | benchmarks-samples: $(LINGUIST_PATH) 66 | go test -run=NONE -bench=. -benchtime=5us && benchmarks/linguist-samples.rb 67 | 68 | benchmarks-slow: $(LINGUST_PATH) 69 | mkdir -p benchmarks/output && go test -run=NONE -bench=. -slow -benchtime=100ms -timeout=100h >benchmarks/output/enry_samples.bench && \ 70 | benchmarks/linguist-samples.rb 5 >benchmarks/output/linguist_samples.bench 71 | 72 | $(RUBEX_ORIG): %.orig : % 73 | sed -i.orig -e 's/"regexp"/regexp "github.com\/moovweb\/rubex"/g' $< 74 | @touch $@ 75 | 76 | oniguruma: $(RUBEX_ORIG) 77 | 78 | revert-oniguruma: 79 | @for file in $(RUBEX_PATCHED); do if [ -e "$$file.orig" ]; then mv "$$file.orig" "$$file" && echo mv "$$file.orig" "$$file"; fi; done 80 | 81 | build-cli: 82 | go build -o enry -ldflags "$(LOCAL_LDFLAGS)" cli/enry/main.go 83 | 84 | linux-shared: $(LINUX_SHARED_LIB) 85 | 86 | darwin-shared: $(DARWIN_SHARED_LIB) 87 | 88 | $(DARWIN_SHARED_LIB): 89 | mkdir -p $(DARWIN_DIR) && \ 90 | CC="o64-clang" CXX="o64-clang++" CGO_ENABLED=1 GOOS=darwin go build -buildmode=c-shared -o $(DARWIN_SHARED_LIB) $(NATIVE_LIB) && \ 91 | mv $(DARWIN_DIR)/$(HEADER_FILE) $(RESOURCES_DIR)/$(HEADER_FILE) 92 | 93 | $(LINUX_SHARED_LIB): 94 | mkdir -p $(LINUX_DIR) && \ 95 | GOOS=linux GOARCH=amd64 go build -buildmode=c-shared -o $(LINUX_SHARED_LIB) $(NATIVE_LIB) && \ 96 | mv $(LINUX_DIR)/$(HEADER_FILE) $(RESOURCES_DIR)/$(HEADER_FILE) 97 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/utils.go: -------------------------------------------------------------------------------- 1 | package enry 2 | 3 | import ( 4 | "bytes" 5 | "path/filepath" 6 | "strings" 7 | 8 | "gopkg.in/src-d/enry.v1/data" 9 | ) 10 | 11 | var ( 12 | auxiliaryLanguages = map[string]bool{ 13 | "Other": true, "XML": true, "YAML": true, "TOML": true, "INI": true, 14 | "JSON": true, "TeX": true, "Public Key": true, "AsciiDoc": true, 15 | "AGS Script": true, "VimL": true, "Diff": true, "CMake": true, "fish": true, 16 | "Awk": true, "Graphviz (DOT)": true, "Markdown": true, "desktop": true, 17 | "XSLT": true, "SQL": true, "RMarkdown": true, "IRC log": true, 18 | "reStructuredText": true, "Twig": true, "CSS": true, "Batchfile": true, 19 | "Text": true, "HTML+ERB": true, "HTML": true, "Gettext Catalog": true, 20 | "Smarty": true, "Raw token data": true, 21 | } 22 | 23 | configurationLanguages = map[string]bool{ 24 | "XML": true, "JSON": true, "TOML": true, "YAML": true, "INI": true, "SQL": true, 25 | } 26 | ) 27 | 28 | // IsAuxiliaryLanguage returns whether or not lang is an auxiliary language. 29 | func IsAuxiliaryLanguage(lang string) bool { 30 | _, ok := auxiliaryLanguages[lang] 31 | return ok 32 | } 33 | 34 | // IsConfiguration returns whether or not path is using a configuration language. 35 | func IsConfiguration(path string) bool { 36 | language, _ := GetLanguageByExtension(path) 37 | _, is := configurationLanguages[language] 38 | return is 39 | } 40 | 41 | // IsDotFile returns whether or not path has dot as a prefix. 42 | func IsDotFile(path string) bool { 43 | path = filepath.Clean(path) 44 | base := filepath.Base(path) 45 | return strings.HasPrefix(base, ".") && base != "." && base != ".." 46 | } 47 | 48 | // IsVendor returns whether or not path is a vendor path. 49 | func IsVendor(path string) bool { 50 | return data.VendorMatchers.Match(path) 51 | } 52 | 53 | // IsDocumentation returns whether or not path is a documentation path. 54 | func IsDocumentation(path string) bool { 55 | return data.DocumentationMatchers.Match(path) 56 | } 57 | 58 | func IsImage(path string) bool { 59 | extension := filepath.Ext(path) 60 | if extension == ".png" || extension == ".jpg" || extension == ".jpeg" || extension == ".gif" { 61 | return true 62 | } 63 | 64 | return false 65 | } 66 | 67 | func GetMimeType(path string, language string) string { 68 | if mime, ok := data.LanguagesMime[language]; ok { 69 | return mime 70 | } 71 | 72 | if IsImage(path) { 73 | return "image/" + filepath.Ext(path)[1:] 74 | } 75 | 76 | return "text/plain" 77 | } 78 | 79 | const sniffLen = 8000 80 | 81 | // IsBinary detects if data is a binary value based on: 82 | // http://git.kernel.org/cgit/git/git.git/tree/xdiff-interface.c?id=HEAD#n198 83 | func IsBinary(data []byte) bool { 84 | if len(data) > sniffLen { 85 | data = data[:sniffLen] 86 | } 87 | 88 | if bytes.IndexByte(data, byte(0)) == -1 { 89 | return false 90 | } 91 | 92 | return true 93 | } 94 | 95 | // FileCount type stores language name and count of files belonging to the 96 | // language. 97 | type FileCount struct { 98 | Name string 99 | Count int 100 | } 101 | 102 | // FileCountList type is a list of FileCounts. 103 | type FileCountList []FileCount 104 | 105 | func (fcl FileCountList) Len() int { return len(fcl) } 106 | func (fcl FileCountList) Less(i, j int) bool { return fcl[i].Count < fcl[j].Count } 107 | func (fcl FileCountList) Swap(i, j int) { fcl[i], fcl[j] = fcl[j], fcl[i] } 108 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/data/interpreter.go: -------------------------------------------------------------------------------- 1 | // Code generated by gopkg.in/src-d/enry.v1/internal/code-generator DO NOT EDIT. 2 | // Extracted from github/linguist commit: 4cd558c37482e8d2c535d8107f2d11b49afbc5b5 3 | 4 | package data 5 | 6 | var LanguagesByInterpreter = map[string][]string{ 7 | "Rscript": {"R"}, 8 | "apl": {"APL"}, 9 | "aplx": {"APL"}, 10 | "ash": {"Shell"}, 11 | "awk": {"Awk"}, 12 | "bash": {"Shell"}, 13 | "bigloo": {"Scheme"}, 14 | "boolector": {"SMT"}, 15 | "ccl": {"Common Lisp"}, 16 | "chicken": {"Scheme"}, 17 | "clisp": {"Common Lisp"}, 18 | "coffee": {"CoffeeScript"}, 19 | "crystal": {"Crystal"}, 20 | "csi": {"Scheme"}, 21 | "cvc4": {"SMT"}, 22 | "dart": {"Dart"}, 23 | "dash": {"Shell"}, 24 | "dtrace": {"DTrace"}, 25 | "dyalog": {"APL"}, 26 | "ecl": {"Common Lisp"}, 27 | "elixir": {"Elixir"}, 28 | "escript": {"Erlang"}, 29 | "fish": {"fish"}, 30 | "gawk": {"Awk"}, 31 | "gerbv": {"Gerber Image"}, 32 | "gerbview": {"Gerber Image"}, 33 | "gn": {"GN"}, 34 | "gnuplot": {"Gnuplot"}, 35 | "gosh": {"Scheme"}, 36 | "groovy": {"Groovy"}, 37 | "guile": {"Scheme"}, 38 | "instantfpc": {"Pascal"}, 39 | "io": {"Io"}, 40 | "ioke": {"Ioke"}, 41 | "jconsole": {"J"}, 42 | "jolie": {"Jolie"}, 43 | "jruby": {"Ruby"}, 44 | "julia": {"Julia"}, 45 | "ksh": {"Shell"}, 46 | "lisp": {"Common Lisp"}, 47 | "lsl": {"LSL"}, 48 | "lua": {"Lua", "Terra"}, 49 | "macruby": {"Ruby"}, 50 | "make": {"Makefile"}, 51 | "mathsat5": {"SMT"}, 52 | "mawk": {"Awk"}, 53 | "mksh": {"Shell"}, 54 | "mmi": {"Mercury"}, 55 | "moon": {"MoonScript"}, 56 | "nawk": {"Awk"}, 57 | "newlisp": {"NewLisp"}, 58 | "node": {"JavaScript"}, 59 | "nush": {"Nu"}, 60 | "ocaml": {"OCaml", "Reason"}, 61 | "ocamlrun": {"OCaml"}, 62 | "ocamlscript": {"OCaml"}, 63 | "openrc-run": {"OpenRC runscript"}, 64 | "opensmt": {"SMT"}, 65 | "osascript": {"AppleScript"}, 66 | "parrot": {"Parrot Assembly", "Parrot Internal Representation"}, 67 | "pdksh": {"Shell"}, 68 | "perl": {"Perl", "Pod"}, 69 | "perl6": {"Perl 6"}, 70 | "php": {"PHP"}, 71 | "picolisp": {"PicoLisp"}, 72 | "pike": {"Pike"}, 73 | "pil": {"PicoLisp"}, 74 | "python": {"Python"}, 75 | "python2": {"Python"}, 76 | "python3": {"Python"}, 77 | "qmake": {"QMake"}, 78 | "r6rs": {"Scheme"}, 79 | "racket": {"Racket"}, 80 | "rake": {"Ruby"}, 81 | "rbx": {"Ruby"}, 82 | "rc": {"Shell"}, 83 | "regina": {"REXX"}, 84 | "rexx": {"REXX"}, 85 | "ruby": {"Ruby"}, 86 | "rune": {"E"}, 87 | "runhaskell": {"Haskell"}, 88 | "sbcl": {"Common Lisp"}, 89 | "scala": {"Scala"}, 90 | "sclang": {"SuperCollider"}, 91 | "scsynth": {"SuperCollider"}, 92 | "sh": {"Shell"}, 93 | "smt-rat": {"SMT"}, 94 | "smtinterpol": {"SMT"}, 95 | "stp": {"SMT"}, 96 | "swipl": {"Prolog"}, 97 | "tcc": {"C"}, 98 | "tclsh": {"Tcl"}, 99 | "verit": {"SMT"}, 100 | "wish": {"Tcl"}, 101 | "yap": {"Prolog"}, 102 | "yices2": {"SMT"}, 103 | "z3": {"SMT"}, 104 | "zsh": {"Shell"}, 105 | } 106 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/benchmarks/linguist-samples.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require 'benchmark' 4 | require 'linguist' 5 | 6 | iterations = (ARGV[0] || 1).to_i 7 | 8 | # BenchBlob wraps a FileBlob to keep data loaded and to clean attributes added by language detection. 9 | class BenchBlob < Linguist::FileBlob 10 | attr_accessor :data 11 | 12 | def initialize(path, base_path = nil) 13 | super 14 | @data = File.read(@fullpath) 15 | end 16 | 17 | def clean 18 | @_mime_type = nil 19 | @detect_encoding = nil 20 | @lines = nil 21 | end 22 | end 23 | 24 | def get_samples(root) 25 | samples = Array.new 26 | Dir.foreach(root) do |file| 27 | path = File.join(root, file) 28 | if file == "." or file == ".." 29 | next 30 | elsif File.directory?(path) 31 | get_samples(path).each do |blob| 32 | samples << blob 33 | end 34 | else 35 | samples << BenchBlob.new(path) 36 | end 37 | end 38 | return samples 39 | end 40 | 41 | samples = get_samples('.linguist/samples') 42 | languages = Linguist::Language.all 43 | 44 | samples.each do |blob| 45 | sample_name = blob.path.gsub(/\s/, '_') 46 | Benchmark.bmbm do |bm| 47 | bm.report('GetLanguage()_SAMPLE_' + sample_name + ' ' + iterations.to_s) do 48 | iterations.times do 49 | Linguist::detect(blob) 50 | blob.clean 51 | end 52 | end 53 | end 54 | end 55 | 56 | samples.each do |blob| 57 | sample_name = blob.path.gsub(/\s/, '_') 58 | Benchmark.bmbm do |bm| 59 | bm.report('Classify()_SAMPLE_' + sample_name + ' ' + iterations.to_s) do 60 | iterations.times do 61 | Linguist::Classifier.classify(Linguist::Samples.cache, blob.data) 62 | blob.clean 63 | end 64 | end 65 | end 66 | end 67 | 68 | samples.each do |blob| 69 | sample_name = blob.path.gsub(/\s/, '_') 70 | Benchmark.bmbm do |bm| 71 | bm.report('GetLanguagesByModeline()_SAMPLE_' + sample_name + ' ' + iterations.to_s) do 72 | iterations.times do 73 | Linguist::Strategy::Modeline.call(blob, languages) 74 | blob.clean 75 | end 76 | end 77 | end 78 | end 79 | 80 | samples.each do |blob| 81 | sample_name = blob.path.gsub(/\s/, '_') 82 | Benchmark.bmbm do |bm| 83 | bm.report('GetLanguagesByFilename()_SAMPLE_' + sample_name + ' ' + iterations.to_s) do 84 | iterations.times do 85 | Linguist::Strategy::Filename.call(blob, languages) 86 | blob.clean 87 | end 88 | end 89 | end 90 | end 91 | 92 | samples.each do |blob| 93 | sample_name = blob.path.gsub(/\s/, '_') 94 | Benchmark.bmbm do |bm| 95 | bm.report('GetLanguagesByShebang()_SAMPLE_' + sample_name + ' ' + iterations.to_s) do 96 | iterations.times do 97 | Linguist::Shebang.call(blob, languages) 98 | blob.clean 99 | end 100 | end 101 | end 102 | end 103 | 104 | samples.each do |blob| 105 | sample_name = blob.path.gsub(/\s/, '_') 106 | Benchmark.bmbm do |bm| 107 | bm.report('GetLanguagesByExtension()_SAMPLE_' + sample_name + ' ' + iterations.to_s) do 108 | iterations.times do 109 | Linguist::Strategy::Extension.call(blob, languages) 110 | blob.clean 111 | end 112 | end 113 | end 114 | end 115 | 116 | samples.each do |blob| 117 | sample_name = blob.path.gsub(/\s/, '_') 118 | Benchmark.bmbm do |bm| 119 | bm.report('GetLanguagesByContent()_SAMPLE_' + sample_name + ' ' + iterations.to_s) do 120 | iterations.times do 121 | Linguist::Heuristics.call(blob, languages) 122 | blob.clean 123 | end 124 | end 125 | end 126 | end 127 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/tokenizer/tokenize_test.go: -------------------------------------------------------------------------------- 1 | package tokenizer 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | 7 | "github.com/stretchr/testify/assert" 8 | ) 9 | 10 | const ( 11 | testContent = `#!/usr/bin/ruby 12 | 13 | #!/usr/bin/env node 14 | 15 | aaa 16 | 17 | #!/usr/bin/env A=B foo=bar awk -f 18 | 19 | #!python 20 | 21 | func Tokenize(content []byte) []string { 22 | splitted := bytes.Fields(content) 23 | tokens := /* make([]string, 0, len(splitted)) 24 | no comment -- comment 25 | for _, tokenByte := range splitted { 26 | token64 := base64.StdEncoding.EncodeToString(tokenByte) 27 | tokens = append(tokens, token64) 28 | notcatchasanumber3.5 29 | }*/ 30 | othercode 31 | /* testing multiple 32 | 33 | multiline comments*/ 34 | 35 | 37 | 38 | ppp no comment # comment 39 | 40 | "literal1" 41 | 42 | abb (tokenByte, 0xAF02) | ,3.2L 43 | 44 | 'literal2' notcatchasanumber3.5 45 | 46 | 5 += number * anotherNumber 47 | if isTrue && isToo { 48 | 0b00001000 >> 1 49 | } 50 | 51 | return tokens 52 | 53 | oneBool = 3 <= 2 54 | varBool = 3<=2> 55 | 56 | #ifndef 57 | #i'm not a comment if the single line comment symbol is not followed by a white 58 | 59 | PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); 60 | 61 | 62 | 63 | 64 | This is a XHTML sample file 65 | 70 | 71 | 72 |
73 | Just a simple XHTML test page. 74 |
75 | 76 | ` 77 | ) 78 | 79 | var ( 80 | tokensFromTestContent = []string{"SHEBANG#!ruby", "SHEBANG#!node", "SHEBANG#!awk", "", "PUBLIC", "W3C", "DTD", "XHTML", "1", "0", 81 | "Strict", "EN", "http", "www", "w3", "org", "TR", "xhtml1", "DTD", "xhtml1", "strict", "dtd", "", "", "", "class=", 82 | "", "", "", "", "
", "", 83 | "", "
", "", "", "(", "[", "]", ")", "[", "]", "{", "(", ")", "(", ")", "{", "}", "(", ")", ";", "{", ";", 84 | "}", "]", "]", "#", "/usr/bin/ruby", "#", "/usr/bin/env", "node", "aaa", "#", "/usr/bin/env", "A", "B", "foo", "bar", "awk", "f", "#", 85 | "python", "func", "Tokenize", "content", "byte", "string", "splitted", "bytes.Fields", "content", "tokens", "othercode", "ppp", "no", 86 | "comment", "abb", "tokenByte", "notcatchasanumber", "number", "*", "anotherNumber", "if", "isTrue", "isToo", "b", "return", "tokens", 87 | "oneBool", "varBool", "#ifndef", "#i", "m", "not", "a", "comment", "if", "the", "single", "line", "comment", "symbol", "is", "not", 88 | "followed", "by", "a", "white", "PyErr_SetString", "PyExc_RuntimeError", "html", "PUBLIC", "xmlns", "id", "class", "This", "is", "a", 89 | "XHTML", "sample", "file", "type", "#example", "background", "color", "yellow", "id", "Just", "a", "simple", "XHTML", "test", "page.", 90 | "-", "|", "+", "&&", "<", "<", "-", "!", "!", "!", "=", "=", "!", ":", "=", ":", "=", ",", ",", "=", ">", ">", "=", "=", "=", "=", ">", 91 | "'", ",", ">", "=", ">", "=", "=", ">", "=", ">", ":", ">", "=", ">"} 92 | ) 93 | 94 | func TestTokenize(t *testing.T) { 95 | tests := []struct { 96 | name string 97 | content []byte 98 | expected []string 99 | }{ 100 | {name: "content", content: []byte(testContent), expected: tokensFromTestContent}, 101 | } 102 | 103 | for _, test := range tests { 104 | t.Run(test.name, func(t *testing.T) { 105 | tokens := Tokenize(test.content) 106 | assert.Equal(t, len(test.expected), len(tokens), fmt.Sprintf("token' slice length = %v, want %v", len(test.expected), len(tokens))) 107 | for i, expectedToken := range test.expected { 108 | assert.Equal(t, expectedToken, tokens[i], fmt.Sprintf("token = %v, want %v", tokens[i], expectedToken)) 109 | } 110 | }) 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/utils_test.go: -------------------------------------------------------------------------------- 1 | package enry 2 | 3 | import ( 4 | "bytes" 5 | "fmt" 6 | "sort" 7 | "testing" 8 | 9 | "github.com/stretchr/testify/assert" 10 | ) 11 | 12 | func (s *EnryTestSuite) TestIsVendor() { 13 | tests := []struct { 14 | name string 15 | path string 16 | expected bool 17 | }{ 18 | {name: "TestIsVendor_1", path: "foo/bar", expected: false}, 19 | {name: "TestIsVendor_2", path: "foo/vendor/foo", expected: true}, 20 | {name: "TestIsVendor_3", path: ".sublime-project", expected: true}, 21 | {name: "TestIsVendor_4", path: "leaflet.draw-src.js", expected: true}, 22 | {name: "TestIsVendor_5", path: "foo/bar/MochiKit.js", expected: true}, 23 | {name: "TestIsVendor_6", path: "foo/bar/dojo.js", expected: true}, 24 | {name: "TestIsVendor_7", path: "foo/env/whatever", expected: true}, 25 | {name: "TestIsVendor_8", path: "foo/.imageset/bar", expected: true}, 26 | {name: "TestIsVendor_9", path: "Vagrantfile", expected: true}, 27 | } 28 | 29 | for _, test := range tests { 30 | is := IsVendor(test.path) 31 | assert.Equal(s.T(), is, test.expected, fmt.Sprintf("%v: is = %v, expected: %v", test.name, is, test.expected)) 32 | } 33 | } 34 | 35 | func (s *EnryTestSuite) TestIsDocumentation() { 36 | tests := []struct { 37 | name string 38 | path string 39 | expected bool 40 | }{ 41 | {name: "TestIsDocumentation_1", path: "foo", expected: false}, 42 | {name: "TestIsDocumentation_2", path: "README", expected: true}, 43 | } 44 | 45 | for _, test := range tests { 46 | is := IsDocumentation(test.path) 47 | assert.Equal(s.T(), is, test.expected, fmt.Sprintf("%v: is = %v, expected: %v", test.name, is, test.expected)) 48 | } 49 | } 50 | 51 | func (s *EnryTestSuite) TestIsConfiguration() { 52 | tests := []struct { 53 | name string 54 | path string 55 | expected bool 56 | }{ 57 | {name: "TestIsConfiguration_1", path: "foo", expected: false}, 58 | {name: "TestIsConfiguration_2", path: "foo.ini", expected: true}, 59 | {name: "TestIsConfiguration_3", path: "/test/path/foo.json", expected: true}, 60 | } 61 | 62 | for _, test := range tests { 63 | is := IsConfiguration(test.path) 64 | assert.Equal(s.T(), is, test.expected, fmt.Sprintf("%v: is = %v, expected: %v", test.name, is, test.expected)) 65 | } 66 | } 67 | 68 | func (s *EnryTestSuite) TestIsBinary() { 69 | tests := []struct { 70 | name string 71 | data []byte 72 | expected bool 73 | }{ 74 | {name: "TestIsBinary_1", data: []byte("foo"), expected: false}, 75 | {name: "TestIsBinary_2", data: []byte{0}, expected: true}, 76 | {name: "TestIsBinary_3", data: bytes.Repeat([]byte{'o'}, 8000), expected: false}, 77 | } 78 | 79 | for _, test := range tests { 80 | is := IsBinary(test.data) 81 | assert.Equal(s.T(), is, test.expected, fmt.Sprintf("%v: is = %v, expected: %v", test.name, is, test.expected)) 82 | } 83 | } 84 | 85 | func (s *EnryTestSuite) TestIsDotFile() { 86 | tests := []struct { 87 | name string 88 | path string 89 | expected bool 90 | }{ 91 | {name: "TestIsDotFile_1", path: "foo/bar/./", expected: false}, 92 | {name: "TestIsDotFile_2", path: "./", expected: false}, 93 | } 94 | 95 | for _, test := range tests { 96 | is := IsDotFile(test.path) 97 | assert.Equal(s.T(), test.expected, is, fmt.Sprintf("%v: is = %v, expected: %v", test.name, is, test.expected)) 98 | } 99 | } 100 | 101 | func TestFileCountListSort(t *testing.T) { 102 | sampleData := FileCountList{{"a", 8}, {"b", 65}, {"c", 20}, {"d", 90}} 103 | const ascending = "ASC" 104 | const descending = "DESC" 105 | 106 | tests := []struct { 107 | name string 108 | data FileCountList 109 | order string 110 | expectedData FileCountList 111 | }{ 112 | { 113 | name: "ascending order", 114 | data: sampleData, 115 | order: ascending, 116 | expectedData: FileCountList{{"a", 8}, {"c", 20}, {"b", 65}, {"d", 90}}, 117 | }, 118 | { 119 | name: "descending order", 120 | data: sampleData, 121 | order: descending, 122 | expectedData: FileCountList{{"d", 90}, {"b", 65}, {"c", 20}, {"a", 8}}, 123 | }, 124 | } 125 | 126 | for _, test := range tests { 127 | t.Run(test.name, func(t *testing.T) { 128 | if test.order == descending { 129 | sort.Sort(sort.Reverse(test.data)) 130 | } else { 131 | sort.Sort(test.data) 132 | } 133 | 134 | for i := 0; i < len(test.data); i++ { 135 | assert.Equal(t, test.data[i], test.expectedData[i], fmt.Sprintf("%v: FileCount at position %d = %v, expected: %v", test.name, i, test.data[i], test.expectedData[i])) 136 | } 137 | }) 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/shared/enry.go: -------------------------------------------------------------------------------- 1 | // +build darwin,cgo linux,cgo 2 | // +build amd64 3 | 4 | package main 5 | 6 | import "C" 7 | import "gopkg.in/src-d/enry.v1" 8 | 9 | //export GetLanguage 10 | func GetLanguage(filename string, content []byte) string { 11 | return enry.GetLanguage(filename, content) 12 | } 13 | 14 | //export GetLanguageByContent 15 | func GetLanguageByContent(filename string, content []byte) (language string, safe bool) { 16 | return enry.GetLanguageByContent(filename, content) 17 | } 18 | 19 | //export GetLanguageByEmacsModeline 20 | func GetLanguageByEmacsModeline(content []byte) (language string, safe bool) { 21 | return enry.GetLanguageByModeline(content) 22 | } 23 | 24 | //export GetLanguageByExtension 25 | func GetLanguageByExtension(filename string) (language string, safe bool) { 26 | return enry.GetLanguageByExtension(filename) 27 | } 28 | 29 | //export GetLanguageByFilename 30 | func GetLanguageByFilename(filename string) (language string, safe bool) { 31 | return enry.GetLanguageByFilename(filename) 32 | } 33 | 34 | //export GetLanguageByModeline 35 | func GetLanguageByModeline(content []byte) (language string, safe bool) { 36 | return enry.GetLanguageByModeline(content) 37 | } 38 | 39 | //export GetLanguageByShebang 40 | func GetLanguageByShebang(content []byte) (language string, safe bool) { 41 | return enry.GetLanguageByShebang(content) 42 | } 43 | 44 | //export GetLanguageByVimModeline 45 | func GetLanguageByVimModeline(content []byte) (language string, safe bool) { 46 | return enry.GetLanguageByVimModeline(content) 47 | } 48 | 49 | //export GetLanguageExtensions 50 | func GetLanguageExtensions(language string, result *[]*C.char) { 51 | strSliceCopy(result, enry.GetLanguageExtensions(language)) 52 | } 53 | 54 | //export GetLanguages 55 | func GetLanguages(filename string, content []byte, result *[]*C.char) { 56 | strSliceCopy(result, enry.GetLanguages(filename, content)) 57 | } 58 | 59 | //export GetLanguagesByContent 60 | func GetLanguagesByContent(filename string, content []byte, candidates []string, result *[]*C.char) { 61 | strSliceCopy(result, enry.GetLanguagesByContent(filename, content, candidates)) 62 | } 63 | 64 | //export GetLanguagesByEmacsModeline 65 | func GetLanguagesByEmacsModeline(filename string, content []byte, candidates []string, result *[]*C.char) { 66 | strSliceCopy(result, enry.GetLanguagesByEmacsModeline(filename, content, candidates)) 67 | } 68 | 69 | //export GetLanguagesByExtension 70 | func GetLanguagesByExtension(filename string, content []byte, candidates []string, result *[]*C.char) { 71 | strSliceCopy(result, enry.GetLanguagesByExtension(filename, content, candidates)) 72 | } 73 | 74 | //export GetLanguagesByFilename 75 | func GetLanguagesByFilename(filename string, content []byte, candidates []string, result *[]*C.char) { 76 | strSliceCopy(result, enry.GetLanguagesByFilename(filename, content, candidates)) 77 | } 78 | 79 | //export GetLanguagesByModeline 80 | func GetLanguagesByModeline(filename string, content []byte, candidates []string, result *[]*C.char) { 81 | strSliceCopy(result, enry.GetLanguagesByModeline(filename, content, candidates)) 82 | } 83 | 84 | //export GetLanguagesByShebang 85 | func GetLanguagesByShebang(filename string, content []byte, candidates []string, result *[]*C.char) { 86 | strSliceCopy(result, enry.GetLanguagesByShebang(filename, content, candidates)) 87 | } 88 | 89 | //export GetLanguagesByVimModeline 90 | func GetLanguagesByVimModeline(filename string, content []byte, candidates []string, result *[]*C.char) { 91 | strSliceCopy(result, enry.GetLanguagesByVimModeline(filename, content, candidates)) 92 | } 93 | 94 | //export GetMimeType 95 | func GetMimeType(path string, language string) string { 96 | return enry.GetMimeType(path, language) 97 | } 98 | 99 | //export IsAuxiliaryLanguage 100 | func IsAuxiliaryLanguage(lang string) bool { 101 | return enry.IsAuxiliaryLanguage(lang) 102 | } 103 | 104 | //export IsBinary 105 | func IsBinary(data []byte) bool { 106 | return enry.IsBinary(data) 107 | } 108 | 109 | //export IsConfiguration 110 | func IsConfiguration(path string) bool { 111 | return enry.IsConfiguration(path) 112 | } 113 | 114 | //export IsDocumentation 115 | func IsDocumentation(path string) bool { 116 | return enry.IsDocumentation(path) 117 | } 118 | 119 | //export IsDotFile 120 | func IsDotFile(path string) bool { 121 | return enry.IsDotFile(path) 122 | } 123 | 124 | //export IsImage 125 | func IsImage(path string) bool { 126 | return enry.IsImage(path) 127 | } 128 | 129 | //export IsVendor 130 | func IsVendor(path string) bool { 131 | return enry.IsVendor(path) 132 | } 133 | 134 | func strSliceCopy(result *[]*C.char, slice []string) { 135 | for _, str := range slice { 136 | *result = append(*result, C.CString(str)) 137 | } 138 | } 139 | 140 | func main() {} 141 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.9.x 5 | - tip 6 | 7 | addons: 8 | apt: 9 | packages: 10 | - libonig-dev 11 | 12 | matrix: 13 | allow_failures: 14 | - go: tip 15 | fast_finish: true 16 | 17 | env: 18 | - ONIGURUMA=0 19 | - ONIGURUMA=1 20 | 21 | install: 22 | - rm -rf $GOPATH/src/gopkg.in/src-d 23 | - mkdir -p $GOPATH/src/gopkg.in/src-d 24 | - ln -s $PWD $GOPATH/src/gopkg.in/src-d/enry.v1 25 | - cd $GOPATH/src/gopkg.in/src-d/enry.v1 26 | - if [ "$ONIGURUMA" == "1" ]; then make oniguruma; fi 27 | - go get -v -t ./... 28 | 29 | script: 30 | - make test-coverage 31 | 32 | after_success: 33 | - bash <(curl -s https://codecov.io/bash) 34 | 35 | before_deploy: 36 | - make packages 37 | 38 | deploy: 39 | provider: releases 40 | api_key: 41 | secure: $GITHUB_TOKEN 42 | file_glob: true 43 | file: build/*.tar.gz 44 | skip_cleanup: true 45 | on: 46 | tags: true 47 | 48 | jobs: 49 | env: 50 | - ONIGURUMA=0 51 | include: 52 | - stage: test 53 | language: scala 54 | jdk: oraclejdk8 55 | 56 | install: 57 | - GIMME_OUTPUT=$(gimme 1.8 | tee -a $HOME/.bashrc) && eval "$GIMME_OUTPUT" 58 | - export GOPATH=$HOME/gopath 59 | - mkdir -p $GOPATH/src/gopkg.in/src-d/enry.v1 60 | - rsync -az ${TRAVIS_BUILD_DIR}/ $GOPATH/src/gopkg.in/src-d/enry.v1 61 | - go get -v gopkg.in/src-d/enry.v1/... 62 | 63 | before_script: 64 | - cd java 65 | - make 66 | 67 | script: 68 | - make test 69 | 70 | before_deploy: 71 | - cd .. 72 | 73 | deploy: 74 | provider: releases 75 | api_key: 76 | secure: $GITHUB_TOKEN 77 | file: 78 | - ./.shared/linux-x86-64/libenry.so 79 | skip_cleanup: true 80 | on: 81 | tags: true 82 | 83 | - stage: Build macOS shared 84 | 85 | env: 86 | - OSXCROSS_PACKAGE="osxcross_3034f7149716d815bc473d0a7b35d17e4cf175aa.tar.gz" 87 | - OSXCROSS_URL="https://github.com/bblfsh/client-scala/releases/download/v1.5.2/${OSXCROSS_PACKAGE}" 88 | - PATH="/$HOME/osxcross/bin:$PATH" 89 | 90 | sudo: true 91 | 92 | install: 93 | - if [[ -z "$TRAVIS_TAG" ]]; then echo "Skipping this build for non-tag builds."; exit 0; fi 94 | - rm -rf $GOPATH/src/gopkg.in/src-d 95 | - mkdir -p $GOPATH/src/gopkg.in/src-d 96 | - ln -s $PWD $GOPATH/src/gopkg.in/src-d/enry.v1 97 | - cd $GOPATH/src/gopkg.in/src-d/enry.v1 98 | - go get -v -t ./... 99 | - sudo apt-get update 100 | - sudo apt-get install -y --no-install-recommends clang g++ gcc gcc-multilib libc6-dev libc6-dev-i386 mingw-w64 patch xz-utils 101 | - cd ${HOME} 102 | - curl -sSL ${OSXCROSS_URL} | tar -C ${HOME} -xzf - 103 | - cd $GOPATH/src/gopkg.in/src-d/enry.v1 104 | 105 | script: 106 | - make darwin-shared 107 | 108 | before_deploy: 109 | - echo "skip before_deploy" 110 | 111 | deploy: 112 | provider: releases 113 | api_key: 114 | secure: $GITHUB_TOKEN 115 | file: ./.shared/darwin/libenry.dylib 116 | skip_cleanup: true 117 | on: 118 | tags: true 119 | 120 | - stage: Publish Maven 121 | language: scala 122 | jdk: oraclejdk8 123 | 124 | before_script: 125 | - if [[ -z "$TRAVIS_TAG" ]]; then echo "Skipping this build for non-tag builds."; exit 0; fi 126 | - cd java 127 | - make 128 | - curl -o ./shared/linux-x86-64/libenry.so -sL "https://github.com/$TRAVIS_REPO_SLUG/releases/download/$TRAVIS_TAG/libenry.so" 129 | - mkdir -p ./shared/darwin 130 | - curl -o ./shared/darwin/libenry.dylib -sL "https://github.com/$TRAVIS_REPO_SLUG/releases/download/$TRAVIS_TAG/libenry.dylib" 131 | - openssl aes-256-cbc -K $encrypted_a0e1c69dbbc7_key -iv $encrypted_a0e1c69dbbc7_iv -in key.asc.enc -out key.asc -d 132 | - gpg --no-default-keyring --primary-keyring ./project/.gnupg/pubring.gpg --secret-keyring ./project/.gnupg/secring.gpg --keyring ./project/.gnupg/pubring.gpg --fingerprint --import key.asc 133 | 134 | script: 135 | - make test # ensure the shared objects are functional 136 | - ./sbt publishLocal 137 | - ./sbt publishSigned 138 | - ./sbt sonatypeRelease 139 | 140 | before_deploy: 141 | - rm ./target/enry-java-*-javadoc.jar 142 | - rm ./target/enry-java-*-sources.jar 143 | - rm ./target/enry-java-*-tests.jar 144 | - rm ./target/enry-java-assembly-*.jar 145 | 146 | deploy: 147 | provider: releases 148 | api_key: 149 | secure: $GITHUB_TOKEN 150 | file_glob: true 151 | file: ./target/enry-java*.jar 152 | skip_cleanup: true 153 | on: 154 | tags: true 155 | -------------------------------------------------------------------------------- /issues2019/oracle.txt: -------------------------------------------------------------------------------- 1 | github.com/oracle/bots-node-sdk: misspell: examples/custom-components/starter/README.md:28:68: "constitues" is a misspelling of "constitutes" 2 | github.com/oracle/bots-node-sdk: misspell: README.md:262:59: "stuctured" is a misspelling of "structured" 3 | github.com/oracle/cloudnative: misspell: labs/fn-container/README.md:36:368: "libary" is a misspelling of "library" 4 | github.com/oracle/cloudtestdrive: misspell: AppDev/jcs-create/README.md:73:194: "choosen" is a misspelling of "chosen" 5 | github.com/oracle/coherence-operator: misspell: operator/README.md:81:59: "adn" is a misspelling of "and" 6 | github.com/oracle/coherence-operator: misspell: operator/src/main/helm/coherence-operator/charts/prometheus-operator/charts/grafana/README.md:167:10: "usualy" is a misspelling of "usually" 7 | github.com/oracle/db-sharding: misspell: sdb-terraform/README.md:162:282: "succesfully" is a misspelling of "successfully" 8 | github.com/oracle/db-sharding: misspell: sdb-terraform/README.md:176:97: "specifed" is a misspelling of "specified" 9 | github.com/oracle/dino-date: misspell: README.md:21:43: "improvments" is a misspelling of "improvements" 10 | github.com/oracle/docker-images: misspell: OracleDatabase/RAC/OracleRACStorageServer/README.md:9:98: "enviornment" is a misspelling of "environment" 11 | github.com/oracle/docker-images: misspell: OracleDatabase/RAC/OracleRACStorageServer/README.md:13:206: "prefered" is a misspelling of "preferred" 12 | github.com/oracle/docker-images: misspell: OracleDatabase/RAC/OracleRACStorageServer/README.md:22:46: "folowing" is a misspelling of "following" 13 | github.com/oracle/docker-images: misspell: OracleDatabase/RAC/OracleConnectionManager/README.md:14:108: "enviornment" is a misspelling of "environment" 14 | github.com/oracle/docker-images: misspell: OracleDatabase/RAC/OracleConnectionManager/README.md:19:206: "prefered" is a misspelling of "preferred" 15 | github.com/oracle/docker-images: misspell: OracleDatabase/SingleInstance/samples/customdb/README.md:6:72: "substitue" is a misspelling of "substitute" 16 | github.com/oracle/docker-images: misspell: OracleDatabase/SingleInstance/samples/plugpdb/README.md:12:9: "substitue" is a misspelling of "substitute" 17 | github.com/oracle/docker-images: misspell: OracleDatabase/SingleInstance/samples/unplugpdb/README.md:11:9: "substitue" is a misspelling of "substitute" 18 | github.com/oracle/docker-images: misspell: OracleDatabase/SingleInstance/README.md:14:206: "prefered" is a misspelling of "preferred" 19 | github.com/oracle/docker-images: misspell: OracleHTTPServer/samples/12213-patch/README.md:35:44: "conatiner" is a misspelling of "container" 20 | github.com/oracle/docker-images: misspell: OracleFMWInfrastructure/dockerfiles/12.2.1.3/README.md:10:187: "prefered" is a misspelling of "preferred" 21 | github.com/oracle/docker-images: misspell: OracleFMWInfrastructure/dockerfiles/12.2.1.4/README.md:10:187: "prefered" is a misspelling of "preferred" 22 | github.com/oracle/docker-images: misspell: OracleHTTPServer/README.md:58:44: "conatiner" is a misspelling of "container" 23 | github.com/oracle/docker-images: misspell: OracleRestDataServices/README.md:10:206: "prefered" is a misspelling of "preferred" 24 | github.com/oracle/docker-images: misspell: OracleRestDataServices/README.md:36:80: "wich" is a misspelling of "which" 25 | github.com/oracle/docker-images: misspell: OracleTuxedo/core/README.md:16:202: "prefered" is a misspelling of "preferred" 26 | github.com/oracle/docker-images: misspell: OracleUnifiedDirectory/dockerfiles/12.2.1.4.0/software/README.md:7:2: "Sofware" is a misspelling of "Software" 27 | github.com/oracle/docker-images: misspell: OracleSOASuite/dockerfiles/README.md:76:82: "Infrastrucure" is a misspelling of "Infrastructure" 28 | github.com/oracle/docker-images: misspell: OracleWebLogic/samples/1221-domain-with-resources/README.md:21:26: "Persistance" is a misspelling of "Persistence" 29 | github.com/oracle/docker-images: misspell: OracleWebLogic/samples/12212-msiserver/README.md:203:73: "reponse" is a misspelling of "response" 30 | github.com/oracle/docker-images: misspell: OracleWebLogic/dockerfiles/12.2.1.3/README.md:12:201: "prefered" is a misspelling of "preferred" 31 | github.com/oracle/docker-images: misspell: OracleWebLogic/dockerfiles/12.2.1.4/README.md:21:201: "prefered" is a misspelling of "preferred" 32 | github.com/oracle/docker-images: misspell: OracleWebLogic/README.md:14:201: "prefered" is a misspelling of "preferred" 33 | github.com/oracle/docker-images: misspell: OracleWebLogic/samples/12213-patch-wls-for-k8s/README.md:3:232: "necesary" is a misspelling of "necessary" 34 | github.com/oracle/docker-images: misspell: OracleWebLogic/samples/12213-patch-wls-for-k8s/README.md:3:423: "necesary" is a misspelling of "necessary" 35 | github.com/oracle/dotnet-db-samples: misspell: README.md:3:28: "Respository" is a misspelling of "Repository" 36 | github.com/oracle/dtrace-linux-kernel: misspell: Documentation/filesystems/cifs/README:404:25: "hardlinked" is a misspelling of "hardline" 37 | github.com/oracle/dtrace-linux-kernel: misspell: Documentation/isdn/README.gigaset:137:36: "strengh" is a misspelling of "strength" 38 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "io/ioutil" 5 | "log" 6 | 7 | "gopkg.in/src-d/enry.v1/internal/code-generator/generator" 8 | ) 9 | 10 | const ( 11 | // languages info file 12 | languagesYAML = ".linguist/lib/linguist/languages.yml" 13 | 14 | // linguist's samples directory 15 | samplesDir = ".linguist/samples" 16 | 17 | // extension.go generation 18 | extensionsFile = "data/extension.go" 19 | extensionsTmplPath = "internal/code-generator/assets/extension.go.tmpl" 20 | extensionsTmpl = "extension.go.tmpl" 21 | 22 | // content.go generation 23 | heuristicsRuby = ".linguist/lib/linguist/heuristics.rb" 24 | contentFile = "data/content.go" 25 | contentTmplPath = "internal/code-generator/assets/content.go.tmpl" 26 | contentTmpl = "content.go.tmpl" 27 | 28 | // vendor.go generation 29 | vendorYAML = ".linguist/lib/linguist/vendor.yml" 30 | vendorFile = "data/vendor.go" 31 | vendorTmplPath = "internal/code-generator/assets/vendor.go.tmpl" 32 | vendorTmpl = "vendor.go.tmpl" 33 | 34 | // documentation.go generation 35 | documentationYAML = ".linguist/lib/linguist/documentation.yml" 36 | documentationFile = "data/documentation.go" 37 | documentationTmplPath = "internal/code-generator/assets/documentation.go.tmpl" 38 | documentationTmpl = "documentation.go.tmpl" 39 | 40 | // type.go generation 41 | typeFile = "data/type.go" 42 | typeTmplPath = "internal/code-generator/assets/type.go.tmpl" 43 | typeTmpl = "type.go.tmpl" 44 | 45 | // interpreter.go generation 46 | interpretersFile = "data/interpreter.go" 47 | interpretersTmplPath = "internal/code-generator/assets/interpreter.go.tmpl" 48 | interpretersTmpl = "interpreter.go.tmpl" 49 | 50 | // filename.go generation 51 | filenamesFile = "data/filename.go" 52 | filenamesTmplPath = "internal/code-generator/assets/filename.go.tmpl" 53 | filenamesTmpl = "filename.go.tmpl" 54 | 55 | // alias.go generation 56 | aliasesFile = "data/alias.go" 57 | aliasesTmplPath = "internal/code-generator/assets/alias.go.tmpl" 58 | aliasesTmpl = "alias.go.tmpl" 59 | 60 | // frequencies.go generation 61 | frequenciesFile = "data/frequencies.go" 62 | frequenciesTmplPath = "internal/code-generator/assets/frequencies.go.tmpl" 63 | frequenciesTmpl = "frequencies.go.tmpl" 64 | 65 | // commit.go generation 66 | commitFile = "data/commit.go" 67 | commitTmplPath = "internal/code-generator/assets/commit.go.tmpl" 68 | commitTmpl = "commit.go.tmpl" 69 | 70 | // mimeType.go generation 71 | mimeTypeFile = "data/mimeType.go" 72 | mimeTypeTmplPath = "internal/code-generator/assets/mimeType.go.tmpl" 73 | mimeTypeTmpl = "mimeType.go.tmpl" 74 | 75 | commitPath = ".linguist/.git/HEAD" 76 | ) 77 | 78 | type generatorFiles struct { 79 | generate generator.File 80 | fileToParse string 81 | samplesDir string 82 | outPath string 83 | tmplPath string 84 | tmplName string 85 | commit string 86 | } 87 | 88 | func main() { 89 | commit, err := getCommit(commitPath) 90 | if err != nil { 91 | log.Printf("couldn't find commit: %v", err) 92 | } 93 | 94 | fileList := []*generatorFiles{ 95 | {generator.Extensions, languagesYAML, "", extensionsFile, extensionsTmplPath, extensionsTmpl, commit}, 96 | {generator.Heuristics, heuristicsRuby, "", contentFile, contentTmplPath, contentTmpl, commit}, 97 | {generator.Vendor, vendorYAML, "", vendorFile, vendorTmplPath, vendorTmpl, commit}, 98 | {generator.Documentation, documentationYAML, "", documentationFile, documentationTmplPath, documentationTmpl, commit}, 99 | {generator.Types, languagesYAML, "", typeFile, typeTmplPath, typeTmpl, commit}, 100 | {generator.Interpreters, languagesYAML, "", interpretersFile, interpretersTmplPath, interpretersTmpl, commit}, 101 | {generator.Filenames, languagesYAML, samplesDir, filenamesFile, filenamesTmplPath, filenamesTmpl, commit}, 102 | {generator.Aliases, languagesYAML, "", aliasesFile, aliasesTmplPath, aliasesTmpl, commit}, 103 | {generator.Frequencies, "", samplesDir, frequenciesFile, frequenciesTmplPath, frequenciesTmpl, commit}, 104 | {generator.Commit, "", "", commitFile, commitTmplPath, commitTmpl, commit}, 105 | {generator.MimeType, languagesYAML, "", mimeTypeFile, mimeTypeTmplPath, mimeTypeTmpl, commit}, 106 | } 107 | 108 | for _, file := range fileList { 109 | if err := file.generate(file.fileToParse, file.samplesDir, file.outPath, file.tmplPath, file.tmplName, file.commit); err != nil { 110 | log.Println(err) 111 | } 112 | } 113 | } 114 | 115 | func getCommit(path string) (string, error) { 116 | commit, err := ioutil.ReadFile(path) 117 | if err != nil { 118 | return "", err 119 | } 120 | 121 | if string(commit) == "ref: refs/heads/master\n" { 122 | path = ".linguist/.git/" + string(commit[5:len(commit)-1]) 123 | commit, err = ioutil.ReadFile(path) 124 | if err != nil { 125 | return "", err 126 | } 127 | } 128 | 129 | return string(commit[:len(commit)-1]), nil 130 | } 131 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/java/src/test/java/tech/sourced/enry/EnryTest.java: -------------------------------------------------------------------------------- 1 | package tech.sourced.enry; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | public class EnryTest { 8 | 9 | @Test 10 | public void isAuxiliaryLanguage() { 11 | assertTrue(Enry.isAuxiliaryLanguage("HTML")); 12 | assertFalse(Enry.isAuxiliaryLanguage("Go")); 13 | } 14 | 15 | @Test 16 | public void getLanguage() { 17 | String code = " class { X i; };"; 61 | assertGuess( 62 | "C++", 63 | true, 64 | Enry.getLanguageByEmacsModeline(code.getBytes()) 65 | ); 66 | } 67 | 68 | @Test 69 | public void getLanguageByExtension() { 70 | assertGuess( 71 | "Ruby", 72 | true, 73 | Enry.getLanguageByExtension("foo.rb") 74 | ); 75 | } 76 | 77 | @Test 78 | public void getLanguageByShebang() { 79 | String code = "#!/usr/bin/env python"; 80 | assertGuess( 81 | "Python", 82 | true, 83 | Enry.getLanguageByShebang(code.getBytes()) 84 | ); 85 | } 86 | 87 | @Test 88 | public void getLanguageByModeline() { 89 | String code = "// -*- font:bar;mode:c++ -*-\n" + 90 | "template class { X i; };"; 91 | assertGuess( 92 | "C++", 93 | true, 94 | Enry.getLanguageByModeline(code.getBytes()) 95 | ); 96 | 97 | code = "# vim: noexpandtab: ft=javascript"; 98 | assertGuess( 99 | "JavaScript", 100 | true, 101 | Enry.getLanguageByModeline(code.getBytes()) 102 | ); 103 | } 104 | 105 | @Test 106 | public void getLanguageByVimModeline() { 107 | String code = "# vim: noexpandtab: ft=javascript"; 108 | assertGuess( 109 | "JavaScript", 110 | true, 111 | Enry.getLanguageByVimModeline(code.getBytes()) 112 | ); 113 | } 114 | 115 | @Test 116 | public void getLanguageExtensions() { 117 | String[] exts = Enry.getLanguageExtensions("Go"); 118 | String[] expected = {".go"}; 119 | assertArrayEquals(expected, exts); 120 | } 121 | 122 | @Test 123 | public void getLanguages() { 124 | String code = "#include " + 125 | "" + 126 | "extern int foo(void *bar);"; 127 | 128 | String[] result = Enry.getLanguages("foo.h", code.getBytes()); 129 | String[] expected = {"C", "C++", "Objective-C"}; 130 | assertArrayEquals(expected, result); 131 | } 132 | 133 | @Test 134 | public void getMimeType() { 135 | assertEquals( 136 | "text/x-ruby", 137 | Enry.getMimeType("foo.rb", "Ruby") 138 | ); 139 | } 140 | 141 | @Test 142 | public void isBinary() { 143 | assertFalse(Enry.isBinary("hello = 'world'".getBytes())); 144 | } 145 | 146 | @Test 147 | public void isConfiguration() { 148 | assertTrue(Enry.isConfiguration("config.yml")); 149 | assertFalse(Enry.isConfiguration("FooServiceProviderImplementorFactory.java")); 150 | } 151 | 152 | @Test 153 | public void isDocumentation() { 154 | assertTrue(Enry.isDocumentation("docs/")); 155 | assertFalse(Enry.isDocumentation("src/")); 156 | } 157 | 158 | @Test 159 | public void isDotFile() { 160 | assertTrue(Enry.isDotFile(".env")); 161 | assertFalse(Enry.isDotFile("config.json")); 162 | } 163 | 164 | @Test 165 | public void isImage() { 166 | assertTrue(Enry.isImage("yup.jpg")); 167 | assertFalse(Enry.isImage("nope.go")); 168 | } 169 | 170 | void assertGuess(String language, boolean safe, Guess guess) { 171 | assertEquals(language, guess.language); 172 | assertEquals(safe, guess.safe); 173 | } 174 | 175 | } 176 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/cli/enry/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "bytes" 5 | "encoding/json" 6 | "flag" 7 | "fmt" 8 | "io/ioutil" 9 | "log" 10 | "os" 11 | "path/filepath" 12 | "sort" 13 | "strings" 14 | 15 | "gopkg.in/src-d/enry.v1" 16 | "gopkg.in/src-d/enry.v1/data" 17 | ) 18 | 19 | var ( 20 | version = "undefined" 21 | build = "undefined" 22 | commit = "undefined" 23 | ) 24 | 25 | func main() { 26 | flag.Usage = usage 27 | breakdownFlag := flag.Bool("breakdown", false, "") 28 | jsonFlag := flag.Bool("json", false, "") 29 | showVersion := flag.Bool("version", false, "Show the enry version information") 30 | flag.Parse() 31 | 32 | if *showVersion { 33 | fmt.Println(version) 34 | return 35 | } 36 | 37 | root, err := filepath.Abs(flag.Arg(0)) 38 | if err != nil { 39 | log.Fatal(err) 40 | } 41 | 42 | fileInfo, err := os.Stat(root) 43 | if err != nil { 44 | log.Fatal(err) 45 | } 46 | 47 | if fileInfo.Mode().IsRegular() { 48 | printFileAnalysis(root) 49 | return 50 | } 51 | 52 | out := make(map[string][]string, 0) 53 | err = filepath.Walk(root, func(path string, f os.FileInfo, err error) error { 54 | if err != nil { 55 | log.Println(err) 56 | return filepath.SkipDir 57 | } 58 | 59 | if !f.Mode().IsDir() && !f.Mode().IsRegular() { 60 | return nil 61 | } 62 | 63 | relativePath, err := filepath.Rel(root, path) 64 | if err != nil { 65 | log.Println(err) 66 | return nil 67 | } 68 | 69 | if relativePath == "." { 70 | return nil 71 | } 72 | 73 | if f.IsDir() { 74 | relativePath = relativePath + "/" 75 | } 76 | 77 | if enry.IsVendor(relativePath) || enry.IsDotFile(relativePath) || 78 | enry.IsDocumentation(relativePath) || enry.IsConfiguration(relativePath) { 79 | if f.IsDir() { 80 | return filepath.SkipDir 81 | } 82 | 83 | return nil 84 | } 85 | 86 | if f.IsDir() { 87 | return nil 88 | } 89 | 90 | language, ok := enry.GetLanguageByExtension(path) 91 | if !ok { 92 | if language, ok = enry.GetLanguageByFilename(path); !ok { 93 | content, err := ioutil.ReadFile(path) 94 | if err != nil { 95 | log.Println(err) 96 | return nil 97 | } 98 | 99 | language = enry.GetLanguage(filepath.Base(path), content) 100 | if language == enry.OtherLanguage { 101 | return nil 102 | } 103 | } 104 | } 105 | 106 | out[language] = append(out[language], relativePath) 107 | return nil 108 | }) 109 | 110 | if err != nil { 111 | log.Fatal(err) 112 | } 113 | 114 | var buff bytes.Buffer 115 | switch { 116 | case *jsonFlag && !*breakdownFlag: 117 | printJson(out, &buff) 118 | case *jsonFlag && *breakdownFlag: 119 | printBreakDown(out, &buff) 120 | case *breakdownFlag: 121 | printPercents(out, &buff) 122 | buff.WriteByte('\n') 123 | printBreakDown(out, &buff) 124 | default: 125 | printPercents(out, &buff) 126 | } 127 | 128 | fmt.Print(buff.String()) 129 | } 130 | 131 | func usage() { 132 | fmt.Fprintf( 133 | os.Stderr, 134 | ` %[1]s %[2]s build: %[3]s commit: %[4]s, based on linguist commit: %[5]s 135 | %[1]s, A simple (and faster) implementation of github/linguist 136 | usage: %[1]s 137 | %[1]s [-json] [-breakdown] 138 | %[1]s [-json] [-breakdown] 139 | %[1]s [-version] 140 | `, 141 | os.Args[0], version, build, commit, data.LinguistCommit[:7], 142 | ) 143 | } 144 | 145 | func printBreakDown(out map[string][]string, buff *bytes.Buffer) { 146 | for name, language := range out { 147 | writeStringLn(name, buff) 148 | for _, file := range language { 149 | writeStringLn(file, buff) 150 | } 151 | 152 | writeStringLn("", buff) 153 | } 154 | } 155 | 156 | func printJson(out map[string][]string, buff *bytes.Buffer) { 157 | data, _ := json.Marshal(out) 158 | buff.Write(data) 159 | buff.WriteByte('\n') 160 | } 161 | 162 | func printPercents(out map[string][]string, buff *bytes.Buffer) { 163 | var fileCountList enry.FileCountList 164 | total := 0 165 | for name, language := range out { 166 | fc := enry.FileCount{Name: name, Count: len(language)} 167 | fileCountList = append(fileCountList, fc) 168 | total += len(language) 169 | } 170 | // Sort the fileCountList in descending order of their count value. 171 | sort.Sort(sort.Reverse(fileCountList)) 172 | 173 | for _, fc := range fileCountList { 174 | percent := float32(fc.Count) / float32(total) * 100 175 | buff.WriteString(fmt.Sprintf("%.2f%% %s\n", percent, fc.Name)) 176 | } 177 | } 178 | 179 | func printFileAnalysis(file string) { 180 | content, err := ioutil.ReadFile(file) 181 | if err != nil { 182 | fmt.Println(err) 183 | } 184 | 185 | totalLines, nonBlank := getLines(file, string(content)) 186 | fileType := getFileType(file, content) 187 | language := enry.GetLanguage(file, content) 188 | mimeType := enry.GetMimeType(file, language) 189 | 190 | fmt.Printf( 191 | `%s: %d lines (%d sloc) 192 | type: %s 193 | mime_type: %s 194 | language: %s 195 | `, 196 | filepath.Base(file), totalLines, nonBlank, fileType, mimeType, language, 197 | ) 198 | } 199 | 200 | func getLines(file string, content string) (int, int) { 201 | totalLines := strings.Count(content, "\n") 202 | nonBlank := totalLines - strings.Count(content, "\n\n") 203 | return totalLines, nonBlank 204 | } 205 | 206 | func getFileType(file string, content []byte) string { 207 | switch { 208 | case enry.IsImage(file): 209 | return "Image" 210 | case enry.IsBinary(content): 211 | return "Binary" 212 | default: 213 | return "Text" 214 | } 215 | } 216 | 217 | func writeStringLn(s string, buff *bytes.Buffer) { 218 | buff.WriteString(s) 219 | buff.WriteByte('\n') 220 | } 221 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/generator/samplesfreq.go: -------------------------------------------------------------------------------- 1 | package generator 2 | 3 | import ( 4 | "bytes" 5 | "fmt" 6 | "io" 7 | "io/ioutil" 8 | "log" 9 | "math" 10 | "os" 11 | "path/filepath" 12 | "sort" 13 | "strconv" 14 | "text/template" 15 | 16 | "gopkg.in/src-d/enry.v1/internal/tokenizer" 17 | ) 18 | 19 | type samplesFrequencies struct { 20 | LanguageTotal int `json:"language_total,omitempty"` 21 | Languages map[string]int `json:"languages,omitempty"` 22 | TokensTotal int `json:"tokens_total,omitempty"` 23 | Tokens map[string]map[string]int `json:"tokens,omitempty"` 24 | LanguageTokens map[string]int `json:"language_tokens,omitempty"` 25 | } 26 | 27 | // Frequencies reads directories in samplesDir, retrieves information about frequencies of languages and tokens, and write 28 | // the file outPath using tmplName as a template. It complies with type File signature. 29 | func Frequencies(fileToParse, samplesDir, outPath, tmplPath, tmplName, commit string) error { 30 | freqs, err := getFrequencies(samplesDir) 31 | if err != nil { 32 | return err 33 | } 34 | 35 | buf := &bytes.Buffer{} 36 | if err := executeFrequenciesTemplate(buf, freqs, tmplPath, tmplName, commit); err != nil { 37 | return err 38 | } 39 | 40 | return formatedWrite(outPath, buf.Bytes()) 41 | } 42 | 43 | func getFrequencies(samplesDir string) (*samplesFrequencies, error) { 44 | entries, err := ioutil.ReadDir(samplesDir) 45 | if err != nil { 46 | return nil, err 47 | } 48 | 49 | var languageTotal int 50 | var languages = make(map[string]int) 51 | var tokensTotal int 52 | var tokens = make(map[string]map[string]int) 53 | var languageTokens = make(map[string]int) 54 | 55 | for _, entry := range entries { 56 | if !entry.IsDir() { 57 | log.Println(err) 58 | continue 59 | } 60 | 61 | samples, err := getSamples(samplesDir, entry) 62 | if err != nil { 63 | log.Println(err) 64 | } 65 | 66 | if len(samples) == 0 { 67 | continue 68 | } 69 | 70 | samplesTokens, err := getTokens(samples) 71 | if err != nil { 72 | log.Println(err) 73 | continue 74 | } 75 | 76 | lang := entry.Name() 77 | languageTotal += len(samples) 78 | languages[lang] = len(samples) 79 | tokensTotal += len(samplesTokens) 80 | languageTokens[lang] = len(samplesTokens) 81 | tokens[lang] = make(map[string]int) 82 | for _, token := range samplesTokens { 83 | tokens[lang][token]++ 84 | } 85 | } 86 | 87 | return &samplesFrequencies{ 88 | TokensTotal: tokensTotal, 89 | LanguageTotal: languageTotal, 90 | Tokens: tokens, 91 | LanguageTokens: languageTokens, 92 | Languages: languages, 93 | }, nil 94 | } 95 | 96 | func getSamples(samplesDir string, langDir os.FileInfo) ([]string, error) { 97 | const samplesSubDir = "filenames" 98 | samples := []string{} 99 | path := filepath.Join(samplesDir, langDir.Name()) 100 | entries, err := ioutil.ReadDir(path) 101 | if err != nil { 102 | return nil, err 103 | } 104 | 105 | for _, entry := range entries { 106 | if entry.Mode().IsRegular() { 107 | samples = append(samples, filepath.Join(path, entry.Name())) 108 | } 109 | 110 | if entry.IsDir() && entry.Name() == samplesSubDir { 111 | subSamples, err := getSubSamples(samplesDir, langDir.Name(), entry) 112 | if err != nil { 113 | return nil, err 114 | } 115 | 116 | samples = append(samples, subSamples...) 117 | } 118 | 119 | } 120 | 121 | return samples, nil 122 | } 123 | 124 | func getSubSamples(samplesDir, langDir string, subLangDir os.FileInfo) ([]string, error) { 125 | subSamples := []string{} 126 | path := filepath.Join(samplesDir, langDir, subLangDir.Name()) 127 | entries, err := ioutil.ReadDir(path) 128 | if err != nil { 129 | return nil, err 130 | } 131 | 132 | for _, entry := range entries { 133 | if entry.Mode().IsRegular() { 134 | subSamples = append(subSamples, filepath.Join(path, entry.Name())) 135 | } 136 | } 137 | 138 | return subSamples, nil 139 | } 140 | 141 | func getTokens(samples []string) ([]string, error) { 142 | tokens := make([]string, 0, 20) 143 | var anyError error 144 | for _, sample := range samples { 145 | content, err := ioutil.ReadFile(sample) 146 | if err != nil { 147 | anyError = err 148 | continue 149 | } 150 | 151 | t := tokenizer.Tokenize(content) 152 | tokens = append(tokens, t...) 153 | } 154 | 155 | return tokens, anyError 156 | } 157 | 158 | func executeFrequenciesTemplate(out io.Writer, freqs *samplesFrequencies, tmplPath, tmplName, commit string) error { 159 | fmap := template.FuncMap{ 160 | "toFloat64": func(num int) string { return fmt.Sprintf("%f", float64(num)) }, 161 | "orderKeys": func(m map[string]int) []string { 162 | keys := make([]string, 0, len(m)) 163 | for key := range m { 164 | keys = append(keys, key) 165 | } 166 | 167 | sort.Strings(keys) 168 | return keys 169 | }, 170 | "languageLogProbability": func(language string) string { 171 | num := math.Log(float64(freqs.Languages[language]) / float64(freqs.LanguageTotal)) 172 | return fmt.Sprintf("%f", num) 173 | }, 174 | "orderMapMapKeys": func(mm map[string]map[string]int) []string { 175 | keys := make([]string, 0, len(mm)) 176 | for key := range mm { 177 | keys = append(keys, key) 178 | } 179 | 180 | sort.Strings(keys) 181 | return keys 182 | }, 183 | "tokenLogProbability": func(language, token string) string { 184 | num := math.Log(float64(freqs.Tokens[language][token]) / float64(freqs.LanguageTokens[language])) 185 | return fmt.Sprintf("%f", num) 186 | }, 187 | "quote": strconv.Quote, 188 | } 189 | return executeTemplate(out, tmplName, tmplPath, commit, fmap, freqs) 190 | } 191 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # repolint 2 | 3 | Tool to check github user/organization repositories for some simple and common issues. 4 | 5 | ## Using the collected results 6 | 7 | [./issues/](/issues) directory contains a list of issues found in multiple Github organizations. 8 | Every file contains a whole organization analysis. 9 | 10 | Here is a list of analyzed organizations (in alphabetical order): 11 | 12 | * [adobe](/issues/adobe.txt) 13 | * [apache](/issues/apache.txt) 14 | * [apple](/issues/apple.txt) 15 | * [autodesk](/issues/autodesk.txt) 16 | * [CanonicalLtd](/issues/CanonicalLtd.txt) 17 | * [Debian](/issues/Debian.txt) 18 | * [dell](/issues/dell.txt) 19 | * [docker](/issues/docker.txt) 20 | * [eclipse](/issues/eclipse.txt) 21 | * [esri](/issues/esri.txt) 22 | * [freedesktop](/issues/freedesktop.txt) 23 | * [gentoo](/issues/gentoo.txt) 24 | * [github](/issues/github.txt) 25 | * [google](/issues/google.txt) 26 | * [hewlettpackard](/issues/hewlettpackard.txt) 27 | * [IBM](/issues/IBM.txt) 28 | * [intel](/issues/intel.txt) 29 | * [JetBrains](/issues/JetBrains.txt) 30 | * [microsoft](/issues/microsoft.txt) 31 | * [Netflix](/issues/Netflix.txt) 32 | * [nvidia](/issues/nvidia.txt) 33 | * [openshift](/issues/openshift.txt) 34 | * [oracle](/issues/oracle.txt) 35 | * [sap](/issues/sap.txt) 36 | * [siemens](/issues/siemens.txt) 37 | * [spotify](/issues/spotify.txt) 38 | * [tdf](/issues/tdf.txt) 39 | * [twitter](/issues/twitter.txt) 40 | * [vmware](/issues/vmware.txt) 41 | * [yandex](/issues/yandex.txt) 42 | 43 | 44 | Some stats: 45 | 46 | | Kind of an issue | Numbers reported | 47 | | --- | --- | 48 | | Broken link | 3860 | 49 | | Misspell (typo) | 3408 | 50 | | Acronym | 166 | 51 | | Unwanted file | 137 | 52 | 53 | Number of checked repositories: 5891. 54 | 55 | ## Overview 56 | 57 | `repolint` makes contributions during events like hacktoberfest simpler 58 | for first time contributors and people that are not familiar with open source very well. 59 | 60 | One can prepare a list of detected issues and propose them as a tasks to be solved 61 | by attendees or ask them to run `repolint` on their own. 62 | 63 | Almost everything that `repolint` finds can be converted into a pull request 64 | that fixes reported issues. 65 | 66 | ## Installation / Usage / Quick start 67 | 68 | To get `repolint` binary, run: 69 | 70 | ``` 71 | go get -v github.com/Quasilyte/repolint 72 | ``` 73 | 74 | This assumes that `$(go env GOPATH)/bin` is under your system `$PATH`. 75 | 76 | You need github [auth token](https://github.com/settings/tokens) to continue. 77 | 78 | There are 2 ways to pass token to the `repolint`: 79 | 80 | 1. Use environment variable `TOKEN`. 81 | 2. Place `token` file that contains the token in the current working directory. 82 | 83 | Code below runs `repolint` over all [Microsoft](https://github.com/Microsoft) organization 84 | repositories. Note that it can take a lot of time to complete: 85 | 86 | ```bash 87 | # Suppose your token is `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`. 88 | export TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 89 | repolint -v -user=Microsoft 90 | ``` 91 | 92 | `-v` flag is used to get more debug output from the `repolint`. It's optional. 93 | 94 | By default, it skips all fork repositories. `-skipForks=false` will enable forked repositories checks. 95 | 96 | ## What repolint can find 97 | 98 | Most issues are very simple and are agnostic to the repository programming language. 99 | 100 | * Typos in some common files like readme and contributing guidelines. 101 | * Broken links. 102 | * Committed files that should be removed (like Emacs autosave and backup files). 103 | * Issues in special files like `.travis.ci`. 104 | 105 | ## Dependencies 106 | 107 | ### CLI / commands 108 | 109 | * [raviqqe/liche](https://github.com/raviqqe/liche) - link checker. 110 | * [client9/misspell](https://github.com/client9/misspell/) - spelling checker. 111 | 112 | ### Libs 113 | 114 | * [src-d/enry](https://github.com/src-d/enry) - programming language detection. 115 | * [gomarkdown/markdown](https://github.com/gomarkdown/markdown) - markdown parser. 116 | 117 | ## Example 118 | 119 | For [bad-repo](https://github.com/quasilyte/bad-repo) it can output something like: 120 | 121 | ``` 122 | repolint -user=quasilyte -repo=bad-repo 123 | checking quasilyte/bad-repo (1/1, made 1 requests so far) ... 124 | github.com/quasilyte/bad-repo: readme badge: could add travis-ci build status badge 125 | github.com/quasilyte/bad-repo: sloppy copyright: LICENSE: license contains sloppy copyright 126 | github.com/quasilyte/bad-repo: acronym: README.rst:13: replace sql with SQL 127 | github.com/quasilyte/bad-repo: acronym: README.rst:15: replace gnu with GNU 128 | github.com/quasilyte/bad-repo: misspell: CONTRIBUTING:1:0: "existance" is a misspelling of "existence" 129 | github.com/quasilyte/bad-repo: misspell: CONTRIBUTING.md:1:0: "existance" is a misspelling of "existence" 130 | github.com/quasilyte/bad-repo: misspell: dir/README.md:1:0: "oversimplificiation" is a misspelling of "oversimplification" 131 | github.com/quasilyte/bad-repo: misspell: README.rst:11:0: "excelent" is a misspelling of "excellent" 132 | github.com/quasilyte/bad-repo: var name typo: README.rst:19: $CLASSPAHT could be a misspelling of CLASSPATH 133 | github.com/quasilyte/bad-repo: var name typo: README.rst:20: ${GOPAHT} could be a misspelling of GOPATH 134 | github.com/quasilyte/bad-repo: unwanted file: remove Emacs autosave file: #autosave.txt# 135 | github.com/quasilyte/bad-repo: unwanted file: remove Emacs lock file file: .#lockfile.txt 136 | github.com/quasilyte/bad-repo: unwanted file: remove Mac OS sys file file: .DS_STORE 137 | github.com/quasilyte/bad-repo: unwanted file: remove Vim swap file: .foo.swp 138 | github.com/quasilyte/bad-repo: unwanted file: remove Windows sys file file: Thumbs.db 139 | github.com/quasilyte/bad-repo: unwanted file: remove Emacs backup file: backup.txt~ 140 | ``` 141 | 142 | Note that this example output may be outdated and the `bad-repo` 143 | itself can change over time. It's only a demonstration. 144 | 145 | Also note that we're using `-repo` argument here to restrict `repolint` to a single user repository. 146 | -------------------------------------------------------------------------------- /issues/gentoo.txt: -------------------------------------------------------------------------------- 1 | checking gentoo/api-gentoo-org (1/58, made 2 requests so far) ... 2 | api-gentoo-org: misspell: files/gentoo-keys/seeds/README:33:25: "relavent" is a misspelling of "relevant" 3 | checking gentoo/arm (2/58, made 5 requests so far) ... 4 | checking gentoo/binutils-config (3/58, made 9 requests so far) ... 5 | checking gentoo/binutils-gdb (4/58, made 11 requests so far) ... 6 | error: get binutils-gdb tree: GET https://api.github.com/repos/gentoo/binutils-gdb/git/trees/master?recursive=1: 404 Not Found [] 7 | checking gentoo/catalyst (5/58, made 12 requests so far) ... 8 | catalyst: misspell: README:17:11: "reproducable" is a misspelling of "reproducible" 9 | checking gentoo/devmanual.gentoo.org (6/58, made 17 requests so far) ... 10 | checking gentoo/dlang (7/58, made 20 requests so far) ... 11 | checking gentoo/docutils-glep (8/58, made 23 requests so far) ... 12 | checking gentoo/dotnet (9/58, made 24 requests so far) ... 13 | checking gentoo/elfix (10/58, made 26 requests so far) ... 14 | elfix: misspell: README.md:15:28: "independant" is a misspelling of "independent" 15 | checking gentoo/elivepatch-client (11/58, made 29 requests so far) ... 16 | checking gentoo/elivepatch-server (12/58, made 32 requests so far) ... 17 | checking gentoo/elivepatch_lintian (13/58, made 34 requests so far) ... 18 | checking gentoo/eudev (14/58, made 36 requests so far) ... 19 | checking gentoo/gcc (15/58, made 40 requests so far) ... 20 | error: get gcc tree: GET https://api.github.com/repos/gentoo/gcc/git/trees/master?recursive=1: 404 Not Found [] 21 | checking gentoo/gcc-multilib-bootstrap (16/58, made 41 requests so far) ... 22 | checking gentoo/gentoo (17/58, made 43 requests so far) ... 23 | debug: gentoo tree is truncated 24 | gentoo: broken link: games-strategy/openra/files/README.gentoo: http://master.open-ra.org/list.php: Lookup master.open-ra.org on 127.0.1.1:53: no such host 25 | gentoo: misspell: app-emulation/spice/files/README.gentoo:3:22: "addtional" is a misspelling of "additional" 26 | gentoo: misspell: app-admin/rsyslog/files/README.gentoo:17:43: "availble" is a misspelling of "available" 27 | gentoo: misspell: games-strategy/openra/files/README.gentoo:95:64: "wich" is a misspelling of "which" 28 | gentoo: misspell: games-strategy/openra/files/README.gentoo:105:17: "wich" is a misspelling of "which" 29 | checking gentoo/gentoo-bashcomp (18/58, made 67 requests so far) ... 30 | checking gentoo/gentoo-docker-images (19/58, made 69 requests so far) ... 31 | checking gentoo/gentoo-functions (20/58, made 72 requests so far) ... 32 | checking gentoo/gentoo-keys (21/58, made 73 requests so far) ... 33 | checking gentoo/gentoo-mate (22/58, made 76 requests so far) ... 34 | checking gentoo/gentoo-rust (23/58, made 77 requests so far) ... 35 | checking gentoo/gentoo-syntax (24/58, made 79 requests so far) ... 36 | checking gentoo/gentoo-zsh-completions (25/58, made 81 requests so far) ... 37 | checking gentoo/gentoolkit (26/58, made 83 requests so far) ... 38 | checking gentoo/Gentoo_kernelCI (27/58, made 88 requests so far) ... 39 | checking gentoo/glibc (28/58, made 91 requests so far) ... 40 | error: get glibc tree: GET https://api.github.com/repos/gentoo/glibc/git/trees/master?recursive=1: 404 Not Found [] 41 | checking gentoo/gnome (29/58, made 92 requests so far) ... 42 | checking gentoo/gpackages (30/58, made 96 requests so far) ... 43 | checking gentoo/grss (31/58, made 99 requests so far) ... 44 | checking gentoo/hwids (32/58, made 103 requests so far) ... 45 | hwids: broken link: README.md: https://usb-ids.gowdy.us/index.html: Dialing to the given TCP address timed out 46 | checking gentoo/infra-status (33/58, made 105 requests so far) ... 47 | checking gentoo/java-config (34/58, made 107 requests so far) ... 48 | checking gentoo/java-overlay (35/58, made 110 requests so far) ... 49 | checking gentoo/kde (36/58, made 112 requests so far) ... 50 | checking gentoo/layman (37/58, made 115 requests so far) ... 51 | layman: broken link: README: http://gentoo-wiki.com/Portage_Overlay_Listing#Layman: Lookup gentoo-wiki.com on 127.0.1.1:53: server misbehaving 52 | layman: broken link: README: http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=summary: Lookup git.overlays.gentoo.org on 127.0.1.1:53: no such host 53 | checking gentoo/libressl (38/58, made 120 requests so far) ... 54 | libressl: broken link: README.md: https://blog.hboeck.de/archives/851-LibreSSL-on-Gentoo.html: Dial tcp4 178.63.68.96:443: connect: connection refused 55 | checking gentoo/linux-patches (39/58, made 122 requests so far) ... 56 | checking gentoo/locale-gen (40/58, made 123 requests so far) ... 57 | checking gentoo/lua (41/58, made 125 requests so far) ... 58 | checking gentoo/musl (42/58, made 126 requests so far) ... 59 | musl: misspell: app-admin/rsyslog/files/8-stable/README.gentoo:17:43: "availble" is a misspelling of "available" 60 | checking gentoo/netifrc (43/58, made 134 requests so far) ... 61 | checking gentoo/parity (44/58, made 138 requests so far) ... 62 | checking gentoo/pax-utils (45/58, made 140 requests so far) ... 63 | pax-utils: broken link: README.md: http://archive.netbsd.se/?ml=freebsd-cvs-all&a=2006-08&m=2311441: Lookup archive.netbsd.se on 127.0.1.1:53: no such host 64 | pax-utils: broken link: README.md: http://magog.se/crux/pax-utils/Pkgfile: Lookup magog.se on 127.0.1.1:53: no such host 65 | checking gentoo/portage (46/58, made 143 requests so far) ... 66 | checking gentoo/portage-utils (47/58, made 147 requests so far) ... 67 | checking gentoo/porticron (48/58, made 150 requests so far) ... 68 | checking gentoo/python (49/58, made 153 requests so far) ... 69 | checking gentoo/qt (50/58, made 155 requests so far) ... 70 | checking gentoo/releng (51/58, made 158 requests so far) ... 71 | checking gentoo/repo-proj-wine (52/58, made 204 requests so far) ... 72 | checking gentoo/sandbox (53/58, made 206 requests so far) ... 73 | checking gentoo/sci (54/58, made 209 requests so far) ... 74 | checking gentoo/tatt (55/58, made 216 requests so far) ... 75 | tatt: misspell: README.md:65:53: "successfull" is a misspelling of "successful" 76 | checking gentoo/vmware (56/58, made 218 requests so far) ... 77 | checking gentoo/webapp-config (57/58, made 219 requests so far) ... 78 | checking gentoo/x11 (58/58, made 220 requests so far) ... 79 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/benchmark_test.go: -------------------------------------------------------------------------------- 1 | package enry 2 | 3 | import ( 4 | "flag" 5 | "io/ioutil" 6 | "log" 7 | "os" 8 | "os/exec" 9 | "path/filepath" 10 | "testing" 11 | 12 | "gopkg.in/src-d/enry.v1/data" 13 | ) 14 | 15 | type sample struct { 16 | filename string 17 | content []byte 18 | } 19 | 20 | var ( 21 | slow bool 22 | overcomeLanguage string 23 | overcomeLanguages []string 24 | samples []*sample 25 | samplesDir string 26 | cloned bool 27 | ) 28 | 29 | func TestMain(m *testing.M) { 30 | var exitCode int 31 | defer os.Exit(exitCode) 32 | 33 | flag.BoolVar(&slow, "slow", false, "run benchmarks per sample for strategies too") 34 | flag.Parse() 35 | 36 | if err := cloneLinguist(linguistURL); err != nil { 37 | log.Fatal(err) 38 | } 39 | if cloned { 40 | defer os.RemoveAll(filepath.Dir(samplesDir)) 41 | } 42 | 43 | var err error 44 | samples, err = getSamples(samplesDir) 45 | if err != nil { 46 | log.Fatal(err) 47 | } 48 | 49 | exitCode = m.Run() 50 | } 51 | 52 | func cloneLinguist(linguistURL string) error { 53 | repoLinguist := os.Getenv(linguistClonedEnvVar) 54 | cloned = repoLinguist == "" 55 | if cloned { 56 | var err error 57 | repoLinguist, err = ioutil.TempDir("", "linguist-") 58 | if err != nil { 59 | return err 60 | } 61 | } 62 | 63 | samplesDir = filepath.Join(repoLinguist, "samples") 64 | 65 | if cloned { 66 | cmd := exec.Command("git", "clone", linguistURL, repoLinguist) 67 | if err := cmd.Run(); err != nil { 68 | return err 69 | } 70 | } 71 | 72 | cwd, err := os.Getwd() 73 | if err != nil { 74 | return err 75 | } 76 | 77 | if err = os.Chdir(repoLinguist); err != nil { 78 | return err 79 | } 80 | 81 | cmd := exec.Command("git", "checkout", data.LinguistCommit) 82 | if err := cmd.Run(); err != nil { 83 | return err 84 | } 85 | 86 | if err = os.Chdir(cwd); err != nil { 87 | return err 88 | } 89 | 90 | return nil 91 | } 92 | 93 | func getSamples(dir string) ([]*sample, error) { 94 | samples := make([]*sample, 0, 2000) 95 | err := filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { 96 | if err != nil { 97 | return err 98 | } 99 | 100 | if info.IsDir() { 101 | return nil 102 | } 103 | 104 | content, err := ioutil.ReadFile(path) 105 | if err != nil { 106 | return err 107 | } 108 | 109 | s := &sample{ 110 | filename: path, 111 | content: content, 112 | } 113 | 114 | samples = append(samples, s) 115 | return nil 116 | }) 117 | 118 | return samples, err 119 | } 120 | 121 | func BenchmarkGetLanguageTotal(b *testing.B) { 122 | if slow { 123 | b.SkipNow() 124 | } 125 | 126 | var o string 127 | b.Run("GetLanguage()_TOTAL", func(b *testing.B) { 128 | for n := 0; n < b.N; n++ { 129 | for _, sample := range samples { 130 | o = GetLanguage(sample.filename, sample.content) 131 | } 132 | } 133 | 134 | overcomeLanguage = o 135 | }) 136 | } 137 | 138 | func BenchmarkClassifyTotal(b *testing.B) { 139 | if slow { 140 | b.SkipNow() 141 | } 142 | 143 | var o []string 144 | b.Run("Classify()_TOTAL", func(b *testing.B) { 145 | for n := 0; n < b.N; n++ { 146 | for _, sample := range samples { 147 | o = DefaultClassifier.Classify(sample.content, nil) 148 | } 149 | 150 | overcomeLanguages = o 151 | } 152 | }) 153 | } 154 | 155 | func BenchmarkStrategiesTotal(b *testing.B) { 156 | if slow { 157 | b.SkipNow() 158 | } 159 | 160 | benchmarks := []struct { 161 | name string 162 | strategy Strategy 163 | candidates []string 164 | }{ 165 | {name: "GetLanguagesByModeline()_TOTAL", strategy: GetLanguagesByModeline}, 166 | {name: "GetLanguagesByFilename()_TOTAL", strategy: GetLanguagesByFilename}, 167 | {name: "GetLanguagesByShebang()_TOTAL", strategy: GetLanguagesByShebang}, 168 | {name: "GetLanguagesByExtension()_TOTAL", strategy: GetLanguagesByExtension}, 169 | {name: "GetLanguagesByContent()_TOTAL", strategy: GetLanguagesByContent}, 170 | } 171 | 172 | var o []string 173 | for _, benchmark := range benchmarks { 174 | b.Run(benchmark.name, func(b *testing.B) { 175 | for n := 0; n < b.N; n++ { 176 | for _, sample := range samples { 177 | o = benchmark.strategy(sample.filename, sample.content, benchmark.candidates) 178 | } 179 | 180 | overcomeLanguages = o 181 | } 182 | }) 183 | } 184 | } 185 | 186 | func BenchmarkGetLanguagePerSample(b *testing.B) { 187 | if !slow { 188 | b.SkipNow() 189 | } 190 | 191 | var o string 192 | for _, sample := range samples { 193 | b.Run("GetLanguage()_SAMPLE_"+sample.filename, func(b *testing.B) { 194 | for n := 0; n < b.N; n++ { 195 | o = GetLanguage(sample.filename, sample.content) 196 | } 197 | 198 | overcomeLanguage = o 199 | }) 200 | } 201 | } 202 | 203 | func BenchmarkClassifyPerSample(b *testing.B) { 204 | if !slow { 205 | b.SkipNow() 206 | } 207 | 208 | var o []string 209 | for _, sample := range samples { 210 | b.Run("Classify()_SAMPLE_"+sample.filename, func(b *testing.B) { 211 | for n := 0; n < b.N; n++ { 212 | o = DefaultClassifier.Classify(sample.content, nil) 213 | } 214 | 215 | overcomeLanguages = o 216 | }) 217 | } 218 | } 219 | 220 | func BenchmarkStrategiesPerSample(b *testing.B) { 221 | if !slow { 222 | b.SkipNow() 223 | } 224 | 225 | benchmarks := []struct { 226 | name string 227 | strategy Strategy 228 | candidates []string 229 | }{ 230 | {name: "GetLanguagesByModeline()_SAMPLE_", strategy: GetLanguagesByModeline}, 231 | {name: "GetLanguagesByFilename()_SAMPLE_", strategy: GetLanguagesByFilename}, 232 | {name: "GetLanguagesByShebang()_SAMPLE_", strategy: GetLanguagesByShebang}, 233 | {name: "GetLanguagesByExtension()_SAMPLE_", strategy: GetLanguagesByExtension}, 234 | {name: "GetLanguagesByContent()_SAMPLE_", strategy: GetLanguagesByContent}, 235 | } 236 | 237 | var o []string 238 | for _, benchmark := range benchmarks { 239 | for _, sample := range samples { 240 | b.Run(benchmark.name+sample.filename, func(b *testing.B) { 241 | for n := 0; n < b.N; n++ { 242 | o = benchmark.strategy(sample.filename, sample.content, benchmark.candidates) 243 | } 244 | 245 | overcomeLanguages = o 246 | }) 247 | } 248 | } 249 | } 250 | -------------------------------------------------------------------------------- /issues2019/vmware.txt: -------------------------------------------------------------------------------- 1 | github.com/vmware/ansible-role-govc: misspell: README.md:47:10: "alternativly" is a misspelling of "alternatively" 2 | github.com/vmware/cascade: misspell: README.md:21:56: "resembes" is a misspelling of "resembles" 3 | github.com/vmware/cascade: misspell: README.md:105:7: "Referenece" is a misspelling of "Reference" 4 | github.com/vmware/cascade: misspell: README.md:477:18: "enviornment" is a misspelling of "environment" 5 | github.com/vmware/concord-bft: misspell: test/README.md:22:12: "indpendent" is a misspelling of "independent" 6 | github.com/vmware/concord-bft: misspell: test/README.md:38:71: "respones" is a misspelling of "response" 7 | github.com/vmware/concord-bft: misspell: tools/README.md:14:121: "successfull" is a misspelling of "successful" 8 | github.com/vmware/concord-bft: misspell: tools/README.md:42:305: "ammount" is a misspelling of "amount" 9 | github.com/vmware/concord-bft: misspell: tools/README.md:59:233: "ammount" is a misspelling of "amount" 10 | github.com/vmware/concord-bft: misspell: tools/README.md:95:1: "optimisitic" is a misspelling of "optimistic" 11 | github.com/vmware/differential-datalog: misspell: README.md:74:41: "buidling" is a misspelling of "building" 12 | github.com/vmware/dscr-for-vmware: misspell: CONTRIBUTING.md:61:11: "Respository" is a misspelling of "Repository" 13 | github.com/vmware/dscr-for-vmware: misspell: CONTRIBUTING.md:142:37: "neccessary" is a misspelling of "necessary" 14 | github.com/vmware/flowgate: misspell: README.md:24:25: "proccess" is a misspelling of "process" 15 | github.com/vmware/fluent-plugin-vmware-loginsight: misspell: README.md:126:2: "Seperator" is a misspelling of "Separator" 16 | github.com/vmware/go-pmem-transaction: misspell: README.md:6:163: "repostiory" is a misspelling of "repository" 17 | github.com/vmware/go-pmem-transaction: misspell: README.md:41:23: "availabe" is a misspelling of "available" 18 | github.com/vmware/go-pmem-transaction: misspell: pmem/README.md:39:57: "retreive" is a misspelling of "retrieve" 19 | github.com/vmware/go-pmem-transaction: misspell: transaction/README.md:128:66: "wherease" is a misspelling of "whereas" 20 | github.com/vmware/iot-analytics-benchmark: misspell: ML/README.md:386:12: "mosquitto" is a misspelling of "mosquito" 21 | github.com/vmware/iot-analytics-benchmark: misspell: ML/README.md:389:0: "mosquitto" is a misspelling of "mosquito" 22 | github.com/vmware/iot-analytics-benchmark: misspell: ML/README.md:390:12: "mosquitto" is a misspelling of "mosquito" 23 | github.com/vmware/json-template-engine: misspell: README.md:4:71: "equivalant" is a misspelling of "equivalent" 24 | github.com/vmware/json-template-engine: misspell: README.md:92:28: "paramter" is a misspelling of "parameter" 25 | github.com/vmware/kube-fluentd-operator: misspell: README.md:402:14: "mulitple" is a misspelling of "multiple" 26 | github.com/vmware/lightwave: misspell: lwraft/thirdparty/openldap/README:3:63: "provinence" is a misspelling of "providence" 27 | github.com/vmware/lightwave: misspell: vmdir/thirdparty/openldap/README:3:63: "provinence" is a misspelling of "providence" 28 | github.com/vmware/lightwave: misspell: tools/mac/README.md:91:19: "indiviudally" is a misspelling of "individually" 29 | github.com/vmware/lightwave: misspell: tools/win/README.md:134:19: "indiviudally" is a misspelling of "individually" 30 | github.com/vmware/network-insight-sdk-generic-datasources: misspell: README.md:11:5: "Envirnoment" is a misspelling of "Environment" 31 | github.com/vmware/network-insight-sdk-generic-datasources: misspell: README.md:11:33: "envirnoment" is a misspelling of "environment" 32 | github.com/vmware/network-insight-sdk-generic-datasources: misspell: README.md:22:9: "envirnoment" is a misspelling of "environment" 33 | github.com/vmware/network-insight-sdk-generic-datasources: misspell: README.md:23:6: "Envirnoment" is a misspelling of "Environment" 34 | github.com/vmware/nsx-traceflow-pv: misspell: bootcamp-be/nsx-traceflow-tool_1.0-1/etc/nsx-traceflow-tool/pyvmomi/README.rst:20:79: "throrough" is a misspelling of "thorough" 35 | github.com/vmware/p4c-xdp: misspell: tests/README.md:40:25: "protocl" is a misspelling of "protocol" 36 | github.com/vmware/PowerCLI-Example-Scripts: misspell: Modules/VMware.VCGChecker/README.md:9:67: "offical" is a misspelling of "official" 37 | github.com/vmware/pyvmomi: misspell: README.rst:21:79: "throrough" is a misspelling of "thorough" 38 | github.com/vmware/simple-k8s-test-env: misspell: e2e/hack/keepalive/README.md:7:61: "scirpt" is a misspelling of "script" 39 | github.com/vmware/simple-k8s-test-env: misspell: README.md:2:27: "Enviornment" is a misspelling of "Environment" 40 | github.com/vmware/tosca-vcloud-plugin: misspell: README.md:22:53: "intergation" is a misspelling of "integration" 41 | github.com/vmware/vic-product: misspell: docs/user_doc/vic_cloud_admin/README.md:11:64: "Managment" is a misspelling of "Management" 42 | github.com/vmware/vic-product: misspell: tutorials/portainer/README.md:10:92: "comminicate" is a misspelling of "communicate" 43 | github.com/vmware/vic-product: misspell: tutorials/selenium/README.md:47:24: "everyting" is a misspelling of "everything" 44 | github.com/vmware/vic-product: misspell: tutorials/spark/README.md:48:24: "everyting" is a misspelling of "everything" 45 | github.com/vmware/vic-product: misspell: tutorials/api/README.md:88:60: "envrionment" is a misspelling of "environment" 46 | github.com/vmware/vic-ui: misspell: tests/README.md:59:8: "distrubuted" is a misspelling of "distributed" 47 | github.com/vmware/vsphere-automation-sdk-java: misspell: src/main/java/vmware/samples/vcenter/vcha/README.md:25:6: "Seperate" is a misspelling of "Separate" 48 | github.com/vmware/vsphere-automation-sdk-perl: misspell: README.md:107:65: "choosen" is a misspelling of "chosen" 49 | github.com/vmware/vsphere-automation-sdk-ruby: misspell: vcenter/README.md:123:228: "availabe" is a misspelling of "available" 50 | github.com/vmware/xenon: misspell: xenon-workshop/upgrade/upgrade-03-add-fields-validation/README.md:44:13: "occurance" is a misspelling of "occurrence" 51 | github.com/vmware/xenon: misspell: xenon-workshop/upgrade/upgrade-03-add-fields-validation/README.md:47:17: "occurance" is a misspelling of "occurrence" 52 | github.com/vmware/xenon: misspell: xenon-workshop/upgrade/upgrade-03-add-fields-validation/README.md:73:13: "occurance" is a misspelling of "occurrence" 53 | github.com/vmware/xenon: misspell: xenon-workshop/upgrade/upgrade-03-add-fields-validation/README.md:76:17: "occurance" is a misspelling of "occurrence" 54 | github.com/vmware/xenon: misspell: xenon-quickstart/src/main/resources/archetype-resources/README.quickstart:65:96: "applicaiton" is a misspelling of "application" 55 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/generator/test_files/filename.gold: -------------------------------------------------------------------------------- 1 | // Code generated by gopkg.in/src-d/enry.v1/internal/code-generator DO NOT EDIT. 2 | // Extracted from github/linguist commit: d5c8db3fb91963c4b2762ca2ea2ff7cfac109f68 3 | 4 | package data 5 | 6 | var LanguagesByFilename = map[string][]string{ 7 | ".Rprofile": {"R"}, 8 | ".XCompose": {"XCompose"}, 9 | ".abbrev_defs": {"Emacs Lisp"}, 10 | ".arcconfig": {"JSON"}, 11 | ".babelrc": {"JSON5"}, 12 | ".bash_history": {"Shell"}, 13 | ".bash_logout": {"Shell"}, 14 | ".bash_profile": {"Shell"}, 15 | ".bashrc": {"Shell"}, 16 | ".clang-format": {"YAML"}, 17 | ".classpath": {"XML"}, 18 | ".cproject": {"XML"}, 19 | ".cshrc": {"Shell"}, 20 | ".editorconfig": {"INI"}, 21 | ".emacs": {"Emacs Lisp"}, 22 | ".emacs.desktop": {"Emacs Lisp"}, 23 | ".factor-boot-rc": {"Factor"}, 24 | ".factor-rc": {"Factor"}, 25 | ".gclient": {"Python"}, 26 | ".gemrc": {"YAML"}, 27 | ".gitconfig": {"INI"}, 28 | ".gn": {"GN"}, 29 | ".gnus": {"Emacs Lisp"}, 30 | ".gvimrc": {"Vim script"}, 31 | ".htaccess": {"ApacheConf"}, 32 | ".irbrc": {"Ruby"}, 33 | ".jshintrc": {"JSON"}, 34 | ".login": {"Shell"}, 35 | ".nvimrc": {"Vim script"}, 36 | ".php": {"PHP"}, 37 | ".php_cs": {"PHP"}, 38 | ".php_cs.dist": {"PHP"}, 39 | ".profile": {"Shell"}, 40 | ".project": {"XML"}, 41 | ".pryrc": {"Ruby"}, 42 | ".spacemacs": {"Emacs Lisp"}, 43 | ".vimrc": {"Vim script"}, 44 | ".viper": {"Emacs Lisp"}, 45 | ".zlogin": {"Shell"}, 46 | ".zlogout": {"Shell"}, 47 | ".zprofile": {"Shell"}, 48 | ".zshenv": {"Shell"}, 49 | ".zshrc": {"Shell"}, 50 | "9fs": {"Shell"}, 51 | "APKBUILD": {"Alpine Abuild"}, 52 | "App.config": {"XML"}, 53 | "Appraisals": {"Ruby"}, 54 | "BSDmakefile": {"Makefile"}, 55 | "BUCK": {"Python"}, 56 | "BUILD": {"Python"}, 57 | "Berksfile": {"Ruby"}, 58 | "Brewfile": {"Ruby"}, 59 | "Buildfile": {"Ruby"}, 60 | "CMakeLists.txt": {"CMake"}, 61 | "COPYING": {"Text"}, 62 | "COPYING.regex": {"Text"}, 63 | "COPYRIGHT.regex": {"Text"}, 64 | "Cakefile": {"CoffeeScript"}, 65 | "Capfile": {"Ruby"}, 66 | "Cask": {"Emacs Lisp"}, 67 | "Dangerfile": {"Ruby"}, 68 | "Deliverfile": {"Ruby"}, 69 | "Dockerfile": {"Dockerfile"}, 70 | "Emakefile": {"Erlang"}, 71 | "FONTLOG": {"Text"}, 72 | "Fakefile": {"Fancy"}, 73 | "Fastfile": {"Ruby"}, 74 | "GNUmakefile": {"Makefile"}, 75 | "Gemfile": {"Ruby"}, 76 | "Gemfile.lock": {"Ruby"}, 77 | "Guardfile": {"Ruby"}, 78 | "INSTALL": {"Text"}, 79 | "INSTALL.mysql": {"Text"}, 80 | "Jakefile": {"JavaScript"}, 81 | "Jarfile": {"Ruby"}, 82 | "Jenkinsfile": {"Groovy"}, 83 | "Kbuild": {"Makefile"}, 84 | "LICENSE": {"Text"}, 85 | "LICENSE.mysql": {"Text"}, 86 | "Makefile": {"Makefile"}, 87 | "Makefile.am": {"Makefile"}, 88 | "Makefile.boot": {"Makefile"}, 89 | "Makefile.frag": {"Makefile"}, 90 | "Makefile.in": {"Makefile"}, 91 | "Makefile.inc": {"Makefile"}, 92 | "Makefile.wat": {"Makefile"}, 93 | "Mavenfile": {"Ruby"}, 94 | "Modulefile": {"Puppet"}, 95 | "NEWS": {"Text"}, 96 | "Notebook": {"Jupyter Notebook"}, 97 | "NuGet.config": {"XML"}, 98 | "Nukefile": {"Nu"}, 99 | "PKGBUILD": {"Shell"}, 100 | "Phakefile": {"PHP"}, 101 | "Podfile": {"Ruby"}, 102 | "Project.ede": {"Emacs Lisp"}, 103 | "Puppetfile": {"Ruby"}, 104 | "README.1ST": {"Text"}, 105 | "README.me": {"Text"}, 106 | "README.mysql": {"Text"}, 107 | "ROOT": {"Isabelle ROOT"}, 108 | "Rakefile": {"Ruby"}, 109 | "Rexfile": {"Perl 6"}, 110 | "SConscript": {"Python"}, 111 | "SConstruct": {"Python"}, 112 | "Settings.StyleCop": {"XML"}, 113 | "Slakefile": {"LiveScript"}, 114 | "Snakefile": {"Python"}, 115 | "Snapfile": {"Ruby"}, 116 | "Thorfile": {"Ruby"}, 117 | "Vagrantfile": {"Ruby"}, 118 | "WORKSPACE": {"Python"}, 119 | "Web.Debug.config": {"XML"}, 120 | "Web.Release.config": {"XML"}, 121 | "Web.config": {"XML"}, 122 | "XCompose": {"XCompose"}, 123 | "_emacs": {"Emacs Lisp"}, 124 | "_vimrc": {"Vim script"}, 125 | "abbrev_defs": {"Emacs Lisp"}, 126 | "ack": {"Perl"}, 127 | "ant.xml": {"Ant Build System"}, 128 | "apache2.conf": {"ApacheConf"}, 129 | "bash_logout": {"Shell"}, 130 | "bash_profile": {"Shell"}, 131 | "bashrc": {"Shell"}, 132 | "build.xml": {"Ant Build System"}, 133 | "buildfile": {"Ruby"}, 134 | "click.me": {"Text"}, 135 | "composer.lock": {"JSON"}, 136 | "configure.ac": {"M4Sugar"}, 137 | "cshrc": {"Shell"}, 138 | "delete.me": {"Text"}, 139 | "descrip.mmk": {"Module Management System"}, 140 | "descrip.mms": {"Module Management System"}, 141 | "expr-dist": {"R"}, 142 | "gradlew": {"Shell"}, 143 | "gvimrc": {"Vim script"}, 144 | "httpd.conf": {"ApacheConf"}, 145 | "keep.me": {"Text"}, 146 | "ld.script": {"Linker Script"}, 147 | "login": {"Shell"}, 148 | "makefile": {"Makefile"}, 149 | "makefile.sco": {"Makefile"}, 150 | "man": {"Shell"}, 151 | "mcmod.info": {"JSON"}, 152 | "meson.build": {"Meson"}, 153 | "meson_options.txt": {"Meson"}, 154 | "mix.lock": {"Elixir"}, 155 | "mkfile": {"Makefile"}, 156 | "mmn": {"Roff"}, 157 | "mmt": {"Roff"}, 158 | "nginx.conf": {"Nginx"}, 159 | "nvimrc": {"Vim script"}, 160 | "owh": {"Tcl"}, 161 | "packages.config": {"XML"}, 162 | "pom.xml": {"Maven POM"}, 163 | "profile": {"Shell"}, 164 | "read.me": {"Text"}, 165 | "readme.1st": {"Text"}, 166 | "rebar.config": {"Erlang"}, 167 | "rebar.config.lock": {"Erlang"}, 168 | "rebar.lock": {"Erlang"}, 169 | "riemann.config": {"Clojure"}, 170 | "script": {"C"}, 171 | "starfield": {"Tcl"}, 172 | "test.me": {"Text"}, 173 | "vimrc": {"Vim script"}, 174 | "wscript": {"Python"}, 175 | "xcompose": {"XCompose"}, 176 | "zlogin": {"Shell"}, 177 | "zlogout": {"Shell"}, 178 | "zprofile": {"Shell"}, 179 | "zshenv": {"Shell"}, 180 | "zshrc": {"Shell"}, 181 | } 182 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/data/filename.go: -------------------------------------------------------------------------------- 1 | // Code generated by gopkg.in/src-d/enry.v1/internal/code-generator DO NOT EDIT. 2 | // Extracted from github/linguist commit: 4cd558c37482e8d2c535d8107f2d11b49afbc5b5 3 | 4 | package data 5 | 6 | var LanguagesByFilename = map[string][]string{ 7 | ".Rprofile": {"R"}, 8 | ".XCompose": {"XCompose"}, 9 | ".abbrev_defs": {"Emacs Lisp"}, 10 | ".arcconfig": {"JSON"}, 11 | ".babelrc": {"JSON5"}, 12 | ".bash_history": {"Shell"}, 13 | ".bash_logout": {"Shell"}, 14 | ".bash_profile": {"Shell"}, 15 | ".bashrc": {"Shell"}, 16 | ".clang-format": {"YAML"}, 17 | ".clang-tidy": {"YAML"}, 18 | ".classpath": {"XML"}, 19 | ".cproject": {"XML"}, 20 | ".cshrc": {"Shell"}, 21 | ".editorconfig": {"INI"}, 22 | ".emacs": {"Emacs Lisp"}, 23 | ".emacs.desktop": {"Emacs Lisp"}, 24 | ".factor-boot-rc": {"Factor"}, 25 | ".factor-rc": {"Factor"}, 26 | ".gclient": {"Python"}, 27 | ".gemrc": {"YAML"}, 28 | ".gitconfig": {"INI"}, 29 | ".gn": {"GN"}, 30 | ".gnus": {"Emacs Lisp"}, 31 | ".gvimrc": {"Vim script"}, 32 | ".htaccess": {"ApacheConf"}, 33 | ".irbrc": {"Ruby"}, 34 | ".jshintrc": {"JSON"}, 35 | ".login": {"Shell"}, 36 | ".nvimrc": {"Vim script"}, 37 | ".php": {"PHP"}, 38 | ".php_cs": {"PHP"}, 39 | ".php_cs.dist": {"PHP"}, 40 | ".profile": {"Shell"}, 41 | ".project": {"XML"}, 42 | ".pryrc": {"Ruby"}, 43 | ".spacemacs": {"Emacs Lisp"}, 44 | ".vimrc": {"Vim script"}, 45 | ".viper": {"Emacs Lisp"}, 46 | ".zlogin": {"Shell"}, 47 | ".zlogout": {"Shell"}, 48 | ".zprofile": {"Shell"}, 49 | ".zshenv": {"Shell"}, 50 | ".zshrc": {"Shell"}, 51 | "9fs": {"Shell"}, 52 | "APKBUILD": {"Alpine Abuild"}, 53 | "App.config": {"XML"}, 54 | "Appraisals": {"Ruby"}, 55 | "BSDmakefile": {"Makefile"}, 56 | "BUCK": {"Python"}, 57 | "BUILD": {"Python"}, 58 | "Berksfile": {"Ruby"}, 59 | "Brewfile": {"Ruby"}, 60 | "Buildfile": {"Ruby"}, 61 | "CMakeLists.txt": {"CMake"}, 62 | "COPYING": {"Text"}, 63 | "COPYING.regex": {"Text"}, 64 | "COPYRIGHT.regex": {"Text"}, 65 | "Cakefile": {"CoffeeScript"}, 66 | "Capfile": {"Ruby"}, 67 | "Cask": {"Emacs Lisp"}, 68 | "Dangerfile": {"Ruby"}, 69 | "Deliverfile": {"Ruby"}, 70 | "Dockerfile": {"Dockerfile"}, 71 | "Emakefile": {"Erlang"}, 72 | "FONTLOG": {"Text"}, 73 | "Fakefile": {"Fancy"}, 74 | "Fastfile": {"Ruby"}, 75 | "GNUmakefile": {"Makefile"}, 76 | "Gemfile": {"Ruby"}, 77 | "Gemfile.lock": {"Ruby"}, 78 | "Guardfile": {"Ruby"}, 79 | "INSTALL": {"Text"}, 80 | "INSTALL.mysql": {"Text"}, 81 | "Jakefile": {"JavaScript"}, 82 | "Jarfile": {"Ruby"}, 83 | "Jenkinsfile": {"Groovy"}, 84 | "Kbuild": {"Makefile"}, 85 | "LICENSE": {"Text"}, 86 | "LICENSE.mysql": {"Text"}, 87 | "Makefile": {"Makefile"}, 88 | "Makefile.am": {"Makefile"}, 89 | "Makefile.boot": {"Makefile"}, 90 | "Makefile.frag": {"Makefile"}, 91 | "Makefile.in": {"Makefile"}, 92 | "Makefile.inc": {"Makefile"}, 93 | "Makefile.wat": {"Makefile"}, 94 | "Mavenfile": {"Ruby"}, 95 | "Modulefile": {"Puppet"}, 96 | "NEWS": {"Text"}, 97 | "Notebook": {"Jupyter Notebook"}, 98 | "NuGet.config": {"XML"}, 99 | "Nukefile": {"Nu"}, 100 | "PKGBUILD": {"Shell"}, 101 | "Phakefile": {"PHP"}, 102 | "Podfile": {"Ruby"}, 103 | "Project.ede": {"Emacs Lisp"}, 104 | "Puppetfile": {"Ruby"}, 105 | "README.1ST": {"Text"}, 106 | "README.me": {"Text"}, 107 | "README.mysql": {"Text"}, 108 | "ROOT": {"Isabelle ROOT"}, 109 | "Rakefile": {"Ruby"}, 110 | "Rexfile": {"Perl 6"}, 111 | "SConscript": {"Python"}, 112 | "SConstruct": {"Python"}, 113 | "Settings.StyleCop": {"XML"}, 114 | "Slakefile": {"LiveScript"}, 115 | "Snakefile": {"Python"}, 116 | "Snapfile": {"Ruby"}, 117 | "Thorfile": {"Ruby"}, 118 | "Vagrantfile": {"Ruby"}, 119 | "WORKSPACE": {"Python"}, 120 | "Web.Debug.config": {"XML"}, 121 | "Web.Release.config": {"XML"}, 122 | "Web.config": {"XML"}, 123 | "XCompose": {"XCompose"}, 124 | "_emacs": {"Emacs Lisp"}, 125 | "_vimrc": {"Vim script"}, 126 | "abbrev_defs": {"Emacs Lisp"}, 127 | "ack": {"Perl"}, 128 | "ant.xml": {"Ant Build System"}, 129 | "apache2.conf": {"ApacheConf"}, 130 | "bash_logout": {"Shell"}, 131 | "bash_profile": {"Shell"}, 132 | "bashrc": {"Shell"}, 133 | "build.xml": {"Ant Build System"}, 134 | "buildfile": {"Ruby"}, 135 | "buildozer.spec": {"INI"}, 136 | "click.me": {"Text"}, 137 | "composer.lock": {"JSON"}, 138 | "configure.ac": {"M4Sugar"}, 139 | "cpanfile": {"Perl"}, 140 | "cshrc": {"Shell"}, 141 | "delete.me": {"Text"}, 142 | "descrip.mmk": {"Module Management System"}, 143 | "descrip.mms": {"Module Management System"}, 144 | "expr-dist": {"R"}, 145 | "fp-lib-table": {"KiCad Layout"}, 146 | "gradlew": {"Shell"}, 147 | "gvimrc": {"Vim script"}, 148 | "httpd.conf": {"ApacheConf"}, 149 | "keep.me": {"Text"}, 150 | "ld.script": {"Linker Script"}, 151 | "login": {"Shell"}, 152 | "makefile": {"Makefile"}, 153 | "makefile.sco": {"Makefile"}, 154 | "man": {"Shell"}, 155 | "mcmod.info": {"JSON"}, 156 | "meson.build": {"Meson"}, 157 | "meson_options.txt": {"Meson"}, 158 | "mix.lock": {"Elixir"}, 159 | "mkfile": {"Makefile"}, 160 | "mmn": {"Roff"}, 161 | "mmt": {"Roff"}, 162 | "nginx.conf": {"Nginx"}, 163 | "nvimrc": {"Vim script"}, 164 | "owh": {"Tcl"}, 165 | "packages.config": {"XML"}, 166 | "pom.xml": {"Maven POM"}, 167 | "profile": {"Shell"}, 168 | "read.me": {"Text"}, 169 | "readme.1st": {"Text"}, 170 | "rebar.config": {"Erlang"}, 171 | "rebar.config.lock": {"Erlang"}, 172 | "rebar.lock": {"Erlang"}, 173 | "riemann.config": {"Clojure"}, 174 | "script": {"C"}, 175 | "starfield": {"Tcl"}, 176 | "test.me": {"Text"}, 177 | "vimrc": {"Vim script"}, 178 | "wscript": {"Python"}, 179 | "xcompose": {"XCompose"}, 180 | "zlogin": {"Shell"}, 181 | "zlogout": {"Shell"}, 182 | "zprofile": {"Shell"}, 183 | "zshenv": {"Shell"}, 184 | "zshrc": {"Shell"}, 185 | } 186 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/generator/test_files/vendor.gold: -------------------------------------------------------------------------------- 1 | // Code generated by gopkg.in/src-d/enry.v1/internal/code-generator DO NOT EDIT. 2 | // Extracted from github/linguist commit: d5c8db3fb91963c4b2762ca2ea2ff7cfac109f68 3 | 4 | package data 5 | 6 | import "gopkg.in/toqueteos/substring.v1" 7 | 8 | var VendorMatchers = substring.Or( 9 | substring.Regexp(`(^|/)cache/`), 10 | substring.Regexp(`^[Dd]ependencies/`), 11 | substring.Regexp(`(^|/)dist/`), 12 | substring.Regexp(`^deps/`), 13 | substring.Regexp(`^tools/`), 14 | substring.Regexp(`(^|/)configure$`), 15 | substring.Regexp(`(^|/)config.guess$`), 16 | substring.Regexp(`(^|/)config.sub$`), 17 | substring.Regexp(`(^|/)aclocal.m4`), 18 | substring.Regexp(`(^|/)libtool.m4`), 19 | substring.Regexp(`(^|/)ltoptions.m4`), 20 | substring.Regexp(`(^|/)ltsugar.m4`), 21 | substring.Regexp(`(^|/)ltversion.m4`), 22 | substring.Regexp(`(^|/)lt~obsolete.m4`), 23 | substring.Regexp(`cpplint.py`), 24 | substring.Regexp(`node_modules/`), 25 | substring.Regexp(`bower_components/`), 26 | substring.Regexp(`^rebar$`), 27 | substring.Regexp(`erlang.mk`), 28 | substring.Regexp(`Godeps/_workspace/`), 29 | substring.Regexp(`.indent.pro`), 30 | substring.Regexp(`(\.|-)min\.(js|css)$`), 31 | substring.Regexp(`([^\s]*)import\.(css|less|scss|styl)$`), 32 | substring.Regexp(`(^|/)bootstrap([^.]*)\.(js|css|less|scss|styl)$`), 33 | substring.Regexp(`(^|/)custom\.bootstrap([^\s]*)(js|css|less|scss|styl)$`), 34 | substring.Regexp(`(^|/)font-awesome\.(css|less|scss|styl)$`), 35 | substring.Regexp(`(^|/)foundation\.(css|less|scss|styl)$`), 36 | substring.Regexp(`(^|/)normalize\.(css|less|scss|styl)$`), 37 | substring.Regexp(`(^|/)skeleton\.(css|less|scss|styl)$`), 38 | substring.Regexp(`(^|/)[Bb]ourbon/.*\.(css|less|scss|styl)$`), 39 | substring.Regexp(`(^|/)animate\.(css|less|scss|styl)$`), 40 | substring.Regexp(`third[-_]?party/`), 41 | substring.Regexp(`3rd[-_]?party/`), 42 | substring.Regexp(`vendors?/`), 43 | substring.Regexp(`extern(al)?/`), 44 | substring.Regexp(`(^|/)[Vv]+endor/`), 45 | substring.Regexp(`^debian/`), 46 | substring.Regexp(`run.n$`), 47 | substring.Regexp(`bootstrap-datepicker/`), 48 | substring.Regexp(`(^|/)jquery([^.]*)\.js$`), 49 | substring.Regexp(`(^|/)jquery\-\d\.\d+(\.\d+)?\.js$`), 50 | substring.Regexp(`(^|/)jquery\-ui(\-\d\.\d+(\.\d+)?)?(\.\w+)?\.(js|css)$`), 51 | substring.Regexp(`(^|/)jquery\.(ui|effects)\.([^.]*)\.(js|css)$`), 52 | substring.Regexp(`jquery.fn.gantt.js`), 53 | substring.Regexp(`jquery.fancybox.(js|css)`), 54 | substring.Regexp(`fuelux.js`), 55 | substring.Regexp(`(^|/)jquery\.fileupload(-\w+)?\.js$`), 56 | substring.Regexp(`(^|/)slick\.\w+.js$`), 57 | substring.Regexp(`(^|/)Leaflet\.Coordinates-\d+\.\d+\.\d+\.src\.js$`), 58 | substring.Regexp(`leaflet.draw-src.js`), 59 | substring.Regexp(`leaflet.draw.css`), 60 | substring.Regexp(`Control.FullScreen.css`), 61 | substring.Regexp(`Control.FullScreen.js`), 62 | substring.Regexp(`leaflet.spin.js`), 63 | substring.Regexp(`wicket-leaflet.js`), 64 | substring.Regexp(`.sublime-project`), 65 | substring.Regexp(`.sublime-workspace`), 66 | substring.Regexp(`(^|/)prototype(.*)\.js$`), 67 | substring.Regexp(`(^|/)effects\.js$`), 68 | substring.Regexp(`(^|/)controls\.js$`), 69 | substring.Regexp(`(^|/)dragdrop\.js$`), 70 | substring.Regexp(`(.*?)\.d\.ts$`), 71 | substring.Regexp(`(^|/)mootools([^.]*)\d+\.\d+.\d+([^.]*)\.js$`), 72 | substring.Regexp(`(^|/)dojo\.js$`), 73 | substring.Regexp(`(^|/)MochiKit\.js$`), 74 | substring.Regexp(`(^|/)yahoo-([^.]*)\.js$`), 75 | substring.Regexp(`(^|/)yui([^.]*)\.js$`), 76 | substring.Regexp(`(^|/)ckeditor\.js$`), 77 | substring.Regexp(`(^|/)tiny_mce([^.]*)\.js$`), 78 | substring.Regexp(`(^|/)tiny_mce/(langs|plugins|themes|utils)`), 79 | substring.Regexp(`(^|/)ace-builds/`), 80 | substring.Regexp(`(^|/)fontello(.*?)\.css$`), 81 | substring.Regexp(`(^|/)MathJax/`), 82 | substring.Regexp(`(^|/)Chart\.js$`), 83 | substring.Regexp(`(^|/)[Cc]ode[Mm]irror/(\d+\.\d+/)?(lib|mode|theme|addon|keymap|demo)`), 84 | substring.Regexp(`(^|/)shBrush([^.]*)\.js$`), 85 | substring.Regexp(`(^|/)shCore\.js$`), 86 | substring.Regexp(`(^|/)shLegacy\.js$`), 87 | substring.Regexp(`(^|/)angular([^.]*)\.js$`), 88 | substring.Regexp(`(^|\/)d3(\.v\d+)?([^.]*)\.js$`), 89 | substring.Regexp(`(^|/)react(-[^.]*)?\.js$`), 90 | substring.Regexp(`(^|/)modernizr\-\d\.\d+(\.\d+)?\.js$`), 91 | substring.Regexp(`(^|/)modernizr\.custom\.\d+\.js$`), 92 | substring.Regexp(`(^|/)knockout-(\d+\.){3}(debug\.)?js$`), 93 | substring.Regexp(`(^|/)docs?/_?(build|themes?|templates?|static)/`), 94 | substring.Regexp(`(^|/)admin_media/`), 95 | substring.Regexp(`(^|/)env/`), 96 | substring.Regexp(`^fabfile\.py$`), 97 | substring.Regexp(`^waf$`), 98 | substring.Regexp(`^.osx$`), 99 | substring.Regexp(`\.xctemplate/`), 100 | substring.Regexp(`\.imageset/`), 101 | substring.Regexp(`^Carthage/`), 102 | substring.Regexp(`^Pods/`), 103 | substring.Regexp(`(^|/)Sparkle/`), 104 | substring.Regexp(`Crashlytics.framework/`), 105 | substring.Regexp(`Fabric.framework/`), 106 | substring.Regexp(`BuddyBuildSDK.framework/`), 107 | substring.Regexp(`Realm.framework`), 108 | substring.Regexp(`RealmSwift.framework`), 109 | substring.Regexp(`gitattributes$`), 110 | substring.Regexp(`gitignore$`), 111 | substring.Regexp(`gitmodules$`), 112 | substring.Regexp(`(^|/)gradlew$`), 113 | substring.Regexp(`(^|/)gradlew\.bat$`), 114 | substring.Regexp(`(^|/)gradle/wrapper/`), 115 | substring.Regexp(`-vsdoc\.js$`), 116 | substring.Regexp(`\.intellisense\.js$`), 117 | substring.Regexp(`(^|/)jquery([^.]*)\.validate(\.unobtrusive)?\.js$`), 118 | substring.Regexp(`(^|/)jquery([^.]*)\.unobtrusive\-ajax\.js$`), 119 | substring.Regexp(`(^|/)[Mm]icrosoft([Mm]vc)?([Aa]jax|[Vv]alidation)(\.debug)?\.js$`), 120 | substring.Regexp(`^[Pp]ackages\/.+\.\d+\/`), 121 | substring.Regexp(`(^|/)extjs/.*?\.js$`), 122 | substring.Regexp(`(^|/)extjs/.*?\.xml$`), 123 | substring.Regexp(`(^|/)extjs/.*?\.txt$`), 124 | substring.Regexp(`(^|/)extjs/.*?\.html$`), 125 | substring.Regexp(`(^|/)extjs/.*?\.properties$`), 126 | substring.Regexp(`(^|/)extjs/.sencha/`), 127 | substring.Regexp(`(^|/)extjs/docs/`), 128 | substring.Regexp(`(^|/)extjs/builds/`), 129 | substring.Regexp(`(^|/)extjs/cmd/`), 130 | substring.Regexp(`(^|/)extjs/examples/`), 131 | substring.Regexp(`(^|/)extjs/locale/`), 132 | substring.Regexp(`(^|/)extjs/packages/`), 133 | substring.Regexp(`(^|/)extjs/plugins/`), 134 | substring.Regexp(`(^|/)extjs/resources/`), 135 | substring.Regexp(`(^|/)extjs/src/`), 136 | substring.Regexp(`(^|/)extjs/welcome/`), 137 | substring.Regexp(`(^|/)html5shiv\.js$`), 138 | substring.Regexp(`^[Tt]ests?/fixtures/`), 139 | substring.Regexp(`^[Ss]pecs?/fixtures/`), 140 | substring.Regexp(`(^|/)cordova([^.]*)\.js$`), 141 | substring.Regexp(`(^|/)cordova\-\d\.\d(\.\d)?\.js$`), 142 | substring.Regexp(`foundation(\..*)?\.js$`), 143 | substring.Regexp(`^Vagrantfile$`), 144 | substring.Regexp(`.[Dd][Ss]_[Ss]tore$`), 145 | substring.Regexp(`^vignettes/`), 146 | substring.Regexp(`^inst/extdata/`), 147 | substring.Regexp(`octicons.css`), 148 | substring.Regexp(`sprockets-octicons.scss`), 149 | substring.Regexp(`(^|/)activator$`), 150 | substring.Regexp(`(^|/)activator\.bat$`), 151 | substring.Regexp(`proguard.pro`), 152 | substring.Regexp(`proguard-rules.pro`), 153 | substring.Regexp(`^puphpet/`), 154 | substring.Regexp(`(^|/)\.google_apis/`), 155 | substring.Regexp(`^Jenkinsfile$`), 156 | ) 157 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/data/vendor.go: -------------------------------------------------------------------------------- 1 | // Code generated by gopkg.in/src-d/enry.v1/internal/code-generator DO NOT EDIT. 2 | // Extracted from github/linguist commit: 4cd558c37482e8d2c535d8107f2d11b49afbc5b5 3 | 4 | package data 5 | 6 | import "gopkg.in/toqueteos/substring.v1" 7 | 8 | var VendorMatchers = substring.Or( 9 | substring.Regexp(`(^|/)cache/`), 10 | substring.Regexp(`^[Dd]ependencies/`), 11 | substring.Regexp(`(^|/)dist/`), 12 | substring.Regexp(`^deps/`), 13 | substring.Regexp(`^tools/`), 14 | substring.Regexp(`(^|/)configure$`), 15 | substring.Regexp(`(^|/)config.guess$`), 16 | substring.Regexp(`(^|/)config.sub$`), 17 | substring.Regexp(`(^|/)aclocal.m4`), 18 | substring.Regexp(`(^|/)libtool.m4`), 19 | substring.Regexp(`(^|/)ltoptions.m4`), 20 | substring.Regexp(`(^|/)ltsugar.m4`), 21 | substring.Regexp(`(^|/)ltversion.m4`), 22 | substring.Regexp(`(^|/)lt~obsolete.m4`), 23 | substring.Regexp(`cpplint.py`), 24 | substring.Regexp(`node_modules/`), 25 | substring.Regexp(`bower_components/`), 26 | substring.Regexp(`^rebar$`), 27 | substring.Regexp(`erlang.mk`), 28 | substring.Regexp(`Godeps/_workspace/`), 29 | substring.Regexp(`.indent.pro`), 30 | substring.Regexp(`(\.|-)min\.(js|css)$`), 31 | substring.Regexp(`([^\s]*)import\.(css|less|scss|styl)$`), 32 | substring.Regexp(`(^|/)bootstrap([^.]*)\.(js|css|less|scss|styl)$`), 33 | substring.Regexp(`(^|/)custom\.bootstrap([^\s]*)(js|css|less|scss|styl)$`), 34 | substring.Regexp(`(^|/)font-awesome\.(css|less|scss|styl)$`), 35 | substring.Regexp(`(^|/)foundation\.(css|less|scss|styl)$`), 36 | substring.Regexp(`(^|/)normalize\.(css|less|scss|styl)$`), 37 | substring.Regexp(`(^|/)skeleton\.(css|less|scss|styl)$`), 38 | substring.Regexp(`(^|/)[Bb]ourbon/.*\.(css|less|scss|styl)$`), 39 | substring.Regexp(`(^|/)animate\.(css|less|scss|styl)$`), 40 | substring.Regexp(`third[-_]?party/`), 41 | substring.Regexp(`3rd[-_]?party/`), 42 | substring.Regexp(`vendors?/`), 43 | substring.Regexp(`extern(al)?/`), 44 | substring.Regexp(`(^|/)[Vv]+endor/`), 45 | substring.Regexp(`^debian/`), 46 | substring.Regexp(`run.n$`), 47 | substring.Regexp(`bootstrap-datepicker/`), 48 | substring.Regexp(`(^|/)jquery([^.]*)\.js$`), 49 | substring.Regexp(`(^|/)jquery\-\d\.\d+(\.\d+)?\.js$`), 50 | substring.Regexp(`(^|/)jquery\-ui(\-\d\.\d+(\.\d+)?)?(\.\w+)?\.(js|css)$`), 51 | substring.Regexp(`(^|/)jquery\.(ui|effects)\.([^.]*)\.(js|css)$`), 52 | substring.Regexp(`jquery.fn.gantt.js`), 53 | substring.Regexp(`jquery.fancybox.(js|css)`), 54 | substring.Regexp(`fuelux.js`), 55 | substring.Regexp(`(^|/)jquery\.fileupload(-\w+)?\.js$`), 56 | substring.Regexp(`(^|/)slick\.\w+.js$`), 57 | substring.Regexp(`(^|/)Leaflet\.Coordinates-\d+\.\d+\.\d+\.src\.js$`), 58 | substring.Regexp(`leaflet.draw-src.js`), 59 | substring.Regexp(`leaflet.draw.css`), 60 | substring.Regexp(`Control.FullScreen.css`), 61 | substring.Regexp(`Control.FullScreen.js`), 62 | substring.Regexp(`leaflet.spin.js`), 63 | substring.Regexp(`wicket-leaflet.js`), 64 | substring.Regexp(`.sublime-project`), 65 | substring.Regexp(`.sublime-workspace`), 66 | substring.Regexp(`(^|/)prototype(.*)\.js$`), 67 | substring.Regexp(`(^|/)effects\.js$`), 68 | substring.Regexp(`(^|/)controls\.js$`), 69 | substring.Regexp(`(^|/)dragdrop\.js$`), 70 | substring.Regexp(`(.*?)\.d\.ts$`), 71 | substring.Regexp(`(^|/)mootools([^.]*)\d+\.\d+.\d+([^.]*)\.js$`), 72 | substring.Regexp(`(^|/)dojo\.js$`), 73 | substring.Regexp(`(^|/)MochiKit\.js$`), 74 | substring.Regexp(`(^|/)yahoo-([^.]*)\.js$`), 75 | substring.Regexp(`(^|/)yui([^.]*)\.js$`), 76 | substring.Regexp(`(^|/)ckeditor\.js$`), 77 | substring.Regexp(`(^|/)tiny_mce([^.]*)\.js$`), 78 | substring.Regexp(`(^|/)tiny_mce/(langs|plugins|themes|utils)`), 79 | substring.Regexp(`(^|/)ace-builds/`), 80 | substring.Regexp(`(^|/)fontello(.*?)\.css$`), 81 | substring.Regexp(`(^|/)MathJax/`), 82 | substring.Regexp(`(^|/)Chart\.js$`), 83 | substring.Regexp(`(^|/)[Cc]ode[Mm]irror/(\d+\.\d+/)?(lib|mode|theme|addon|keymap|demo)`), 84 | substring.Regexp(`(^|/)shBrush([^.]*)\.js$`), 85 | substring.Regexp(`(^|/)shCore\.js$`), 86 | substring.Regexp(`(^|/)shLegacy\.js$`), 87 | substring.Regexp(`(^|/)angular([^.]*)\.js$`), 88 | substring.Regexp(`(^|\/)d3(\.v\d+)?([^.]*)\.js$`), 89 | substring.Regexp(`(^|/)react(-[^.]*)?\.js$`), 90 | substring.Regexp(`(^|/)flow-typed/.*\.js$`), 91 | substring.Regexp(`(^|/)modernizr\-\d\.\d+(\.\d+)?\.js$`), 92 | substring.Regexp(`(^|/)modernizr\.custom\.\d+\.js$`), 93 | substring.Regexp(`(^|/)knockout-(\d+\.){3}(debug\.)?js$`), 94 | substring.Regexp(`(^|/)docs?/_?(build|themes?|templates?|static)/`), 95 | substring.Regexp(`(^|/)admin_media/`), 96 | substring.Regexp(`(^|/)env/`), 97 | substring.Regexp(`^fabfile\.py$`), 98 | substring.Regexp(`^waf$`), 99 | substring.Regexp(`^.osx$`), 100 | substring.Regexp(`\.xctemplate/`), 101 | substring.Regexp(`\.imageset/`), 102 | substring.Regexp(`^Carthage/`), 103 | substring.Regexp(`^Pods/`), 104 | substring.Regexp(`(^|/)Sparkle/`), 105 | substring.Regexp(`Crashlytics.framework/`), 106 | substring.Regexp(`Fabric.framework/`), 107 | substring.Regexp(`BuddyBuildSDK.framework/`), 108 | substring.Regexp(`Realm.framework`), 109 | substring.Regexp(`RealmSwift.framework`), 110 | substring.Regexp(`gitattributes$`), 111 | substring.Regexp(`gitignore$`), 112 | substring.Regexp(`gitmodules$`), 113 | substring.Regexp(`(^|/)gradlew$`), 114 | substring.Regexp(`(^|/)gradlew\.bat$`), 115 | substring.Regexp(`(^|/)gradle/wrapper/`), 116 | substring.Regexp(`-vsdoc\.js$`), 117 | substring.Regexp(`\.intellisense\.js$`), 118 | substring.Regexp(`(^|/)jquery([^.]*)\.validate(\.unobtrusive)?\.js$`), 119 | substring.Regexp(`(^|/)jquery([^.]*)\.unobtrusive\-ajax\.js$`), 120 | substring.Regexp(`(^|/)[Mm]icrosoft([Mm]vc)?([Aa]jax|[Vv]alidation)(\.debug)?\.js$`), 121 | substring.Regexp(`^[Pp]ackages\/.+\.\d+\/`), 122 | substring.Regexp(`(^|/)extjs/.*?\.js$`), 123 | substring.Regexp(`(^|/)extjs/.*?\.xml$`), 124 | substring.Regexp(`(^|/)extjs/.*?\.txt$`), 125 | substring.Regexp(`(^|/)extjs/.*?\.html$`), 126 | substring.Regexp(`(^|/)extjs/.*?\.properties$`), 127 | substring.Regexp(`(^|/)extjs/.sencha/`), 128 | substring.Regexp(`(^|/)extjs/docs/`), 129 | substring.Regexp(`(^|/)extjs/builds/`), 130 | substring.Regexp(`(^|/)extjs/cmd/`), 131 | substring.Regexp(`(^|/)extjs/examples/`), 132 | substring.Regexp(`(^|/)extjs/locale/`), 133 | substring.Regexp(`(^|/)extjs/packages/`), 134 | substring.Regexp(`(^|/)extjs/plugins/`), 135 | substring.Regexp(`(^|/)extjs/resources/`), 136 | substring.Regexp(`(^|/)extjs/src/`), 137 | substring.Regexp(`(^|/)extjs/welcome/`), 138 | substring.Regexp(`(^|/)html5shiv\.js$`), 139 | substring.Regexp(`^[Tt]ests?/fixtures/`), 140 | substring.Regexp(`^[Ss]pecs?/fixtures/`), 141 | substring.Regexp(`(^|/)cordova([^.]*)\.js$`), 142 | substring.Regexp(`(^|/)cordova\-\d\.\d(\.\d)?\.js$`), 143 | substring.Regexp(`foundation(\..*)?\.js$`), 144 | substring.Regexp(`^Vagrantfile$`), 145 | substring.Regexp(`.[Dd][Ss]_[Ss]tore$`), 146 | substring.Regexp(`^vignettes/`), 147 | substring.Regexp(`^inst/extdata/`), 148 | substring.Regexp(`octicons.css`), 149 | substring.Regexp(`sprockets-octicons.scss`), 150 | substring.Regexp(`(^|/)activator$`), 151 | substring.Regexp(`(^|/)activator\.bat$`), 152 | substring.Regexp(`proguard.pro`), 153 | substring.Regexp(`proguard-rules.pro`), 154 | substring.Regexp(`^puphpet/`), 155 | substring.Regexp(`(^|/)\.google_apis/`), 156 | substring.Regexp(`^Jenkinsfile$`), 157 | ) 158 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/tokenizer/tokenize.go: -------------------------------------------------------------------------------- 1 | package tokenizer 2 | 3 | import ( 4 | "bytes" 5 | "regexp" 6 | ) 7 | 8 | const byteLimit = 100000 9 | 10 | func Tokenize(content []byte) []string { 11 | if len(content) > byteLimit { 12 | content = content[:byteLimit] 13 | } 14 | 15 | tokens := make([][]byte, 0, 50) 16 | for _, extract := range extractTokens { 17 | var extractedTokens [][]byte 18 | content, extractedTokens = extract(content) 19 | tokens = append(tokens, extractedTokens...) 20 | } 21 | 22 | return toString(tokens) 23 | } 24 | 25 | func toString(tokens [][]byte) []string { 26 | stokens := make([]string, 0, len(tokens)) 27 | for _, token := range tokens { 28 | stokens = append(stokens, string(token)) 29 | } 30 | 31 | return stokens 32 | } 33 | 34 | var ( 35 | extractTokens = []func(content []byte) (replacedContent []byte, tokens [][]byte){ 36 | // The order to must be this 37 | extractAndReplaceShebang, 38 | extractAndReplaceSGML, 39 | skipCommentsAndLiterals, 40 | extractAndReplacePunctuation, 41 | extractAndReplaceRegular, 42 | extractAndReplaceOperator, 43 | extractRemainders, 44 | } 45 | 46 | // Differences between golang regexp and oniguruma: 47 | // 1. no (?s) in oniguruma - makes dot match \n 48 | // 2. no (?U) in oniguruma - ungreedy * 49 | // 3. (?m) implies dot matches \n in oniguruma 50 | // 4. oniguruma handles \w differently - impossible, but true 51 | // 52 | // Workarounds: 53 | // 1. (.|\n) 54 | // 2. replace * with *? 55 | // 3. replace . with [^\n] 56 | // 4. replace \w with [0-9A-Za-z_] 57 | // 58 | // Original golang regexps: 59 | // 60 | // reLiteralStringQuotes = regexp.MustCompile(`(?sU)(".*"|'.*')`) 61 | // reSingleLineComment = regexp.MustCompile(`(?m)(//|--|#|%|")\s(.*$)`) 62 | // reMultilineComment = regexp.MustCompile(`(?sU)(/\*.*\*/||\{-.*-\}|\(\*.*\*\)|""".*"""|'''.*''')`) 63 | // reLiteralNumber = regexp.MustCompile(`(0x[0-9A-Fa-f]([0-9A-Fa-f]|\.)*|\d(\d|\.)*)([uU][lL]{0,2}|([eE][-+]\d*)?[fFlL]*)`) 64 | // reShebang = regexp.MustCompile(`(?m)^#!(?:/\w+)*/(?:(\w+)|\w+(?:\s*\w+=\w+\s*)*\s*(\w+))(?:\s*-\w+\s*)*$`) 65 | // rePunctuation = regexp.MustCompile(`;|\{|\}|\(|\)|\[|\]`) 66 | // reSGML = regexp.MustCompile(`(?sU)(<\/?[^\s<>=\d"']+)(?:\s.*\/?>|>)`) 67 | // reSGMLComment = regexp.MustCompile(`(?sU)()`) 68 | // reSGMLAttributes = regexp.MustCompile(`\s+(\w+=)|\s+([^\s>]+)`) 69 | // reSGMLLoneAttribute = regexp.MustCompile(`(\w+)`) 70 | // reRegularToken = regexp.MustCompile(`[\w\.@#\/\*]+`) 71 | // reOperators = regexp.MustCompile(`<|\{-(.|\n)*?-\}|\(\*(.|\n)*?\*\)|"""(.|\n)*?"""|'''(.|\n)*?''')`) 78 | reLiteralNumber = regexp.MustCompile(`(0x[0-9A-Fa-f]([0-9A-Fa-f]|\.)*|\d(\d|\.)*)([uU][lL]{0,2}|([eE][-+]\d*)?[fFlL]*)`) 79 | reShebang = regexp.MustCompile(`(?m)^#!(?:/[0-9A-Za-z_]+)*/(?:([0-9A-Za-z_]+)|[0-9A-Za-z_]+(?:\s*[0-9A-Za-z_]+=[0-9A-Za-z_]+\s*)*\s*([0-9A-Za-z_]+))(?:\s*-[0-9A-Za-z_]+\s*)*$`) 80 | rePunctuation = regexp.MustCompile(`;|\{|\}|\(|\)|\[|\]`) 81 | reSGML = regexp.MustCompile(`(<\/?[^\s<>=\d"']+)(?:\s(.|\n)*?\/?>|>)`) 82 | reSGMLComment = regexp.MustCompile(`()`) 83 | reSGMLAttributes = regexp.MustCompile(`\s+([0-9A-Za-z_]+=)|\s+([^\s>]+)`) 84 | reSGMLLoneAttribute = regexp.MustCompile(`([0-9A-Za-z_]+)`) 85 | reRegularToken = regexp.MustCompile(`[0-9A-Za-z_\.@#\/\*]+`) 86 | reOperators = regexp.MustCompile(`< 0 { 118 | token = matchedShebang[i] 119 | break 120 | } 121 | } 122 | 123 | tokenShebang := append([]byte(prefix), token...) 124 | return tokenShebang 125 | } 126 | 127 | func commonExtracAndReplace(content []byte, re *regexp.Regexp) ([]byte, [][]byte) { 128 | tokens := re.FindAll(content, -1) 129 | content = re.ReplaceAll(content, []byte(` `)) 130 | return content, tokens 131 | } 132 | 133 | func extractAndReplacePunctuation(content []byte) ([]byte, [][]byte) { 134 | return commonExtracAndReplace(content, rePunctuation) 135 | } 136 | 137 | func extractAndReplaceRegular(content []byte) ([]byte, [][]byte) { 138 | return commonExtracAndReplace(content, reRegularToken) 139 | } 140 | 141 | func extractAndReplaceOperator(content []byte) ([]byte, [][]byte) { 142 | return commonExtracAndReplace(content, reOperators) 143 | } 144 | 145 | func extractAndReplaceSGML(content []byte) ([]byte, [][]byte) { 146 | var SGMLTokens [][]byte 147 | matches := reSGML.FindAllSubmatch(content, -1) 148 | if matches != nil { 149 | SGMLTokens = make([][]byte, 0, 2) 150 | for _, match := range matches { 151 | if reSGMLComment.Match(match[0]) { 152 | continue 153 | } 154 | 155 | token := append(match[1], '>') 156 | SGMLTokens = append(SGMLTokens, token) 157 | attributes := getSGMLAttributes(match[0]) 158 | SGMLTokens = append(SGMLTokens, attributes...) 159 | } 160 | 161 | content = reSGML.ReplaceAll(content, []byte(` `)) 162 | } 163 | 164 | return content, SGMLTokens 165 | } 166 | 167 | func getSGMLAttributes(SGMLTag []byte) [][]byte { 168 | var attributes [][]byte 169 | matches := reSGMLAttributes.FindAllSubmatch(SGMLTag, -1) 170 | if matches != nil { 171 | attributes = make([][]byte, 0, 5) 172 | for _, match := range matches { 173 | if len(match[1]) != 0 { 174 | attributes = append(attributes, match[1]) 175 | } 176 | 177 | if len(match[2]) != 0 { 178 | loneAttributes := reSGMLLoneAttribute.FindAll(match[2], -1) 179 | attributes = append(attributes, loneAttributes...) 180 | } 181 | } 182 | } 183 | 184 | return attributes 185 | } 186 | 187 | func skipCommentsAndLiterals(content []byte) ([]byte, [][]byte) { 188 | for _, skip := range regexToSkip { 189 | content = skip.ReplaceAll(content, []byte(` `)) 190 | } 191 | 192 | return content, nil 193 | } 194 | 195 | func extractRemainders(content []byte) ([]byte, [][]byte) { 196 | splitted := bytes.Fields(content) 197 | remainderTokens := make([][]byte, 0, len(splitted)*3) 198 | for _, remainder := range splitted { 199 | remainders := bytes.Split(remainder, nil) 200 | remainderTokens = append(remainderTokens, remainders...) 201 | } 202 | 203 | return content, remainderTokens 204 | } 205 | -------------------------------------------------------------------------------- /issues/yandex.txt: -------------------------------------------------------------------------------- 1 | checking yandex/alice-skills (1/37, made 1 requests so far) ... 2 | checking yandex/burp-molly-pack (2/37, made 7 requests so far) ... 3 | burp-molly-pack: misspell: CONTRIBUTING.md:19:267: "futher" is a misspelling of "further" 4 | checking yandex/burp-molly-scanner (3/37, made 11 requests so far) ... 5 | burp-molly-scanner: misspell: CONTRIBUTING.md:19:267: "futher" is a misspelling of "further" 6 | checking yandex/ClickHouse (4/37, made 15 requests so far) ... 7 | ClickHouse: misspell: contrib/boost-cmake/README:6:31: "arbitary" is a misspelling of "arbitrary" 8 | ClickHouse: misspell: dbms/programs/odbc-bridge/README.md:8:7: "simplier" is a misspelling of "simpler" 9 | ClickHouse: misspell: dbms/programs/odbc-bridge/README.md:9:7: "simplier" is a misspelling of "simpler" 10 | ClickHouse: misspell: libs/libmemcpy/impl/README.md:23:4: "artical" is a misspelling of "article" 11 | ClickHouse: misspell: contrib/libsparsehash/README:4:46: "particulary" is a misspelling of "particularly" 12 | checking yandex/clickhouse-jdbc (5/37, made 56 requests so far) ... 13 | checking yandex/clickhouse-odbc (6/37, made 59 requests so far) ... 14 | checking yandex/clickhouse-presentations (7/37, made 62 requests so far) ... 15 | checking yandex/csp-reporter (8/37, made 97 requests so far) ... 16 | checking yandex/csp-tester (9/37, made 100 requests so far) ... 17 | checking yandex/datasync-js (10/37, made 103 requests so far) ... 18 | checking yandex/deaf (11/37, made 106 requests so far) ... 19 | deaf: broken link: README.md: https://developer.tech.yandex.ru/: Error when reading response headers: small read buffer. Increase ReadBufferSize. Buffer size=4096, contents: "HTTP/1.1 200 OK\r\nServer: nginx\r\nDate: Sat, 13 Oct 2018 04:13:55 GMT\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 22562\r\nConnection: keep-alive\r\nKeep-Alive: timeout=120\r\nVary: Accept-Encodi"..."ub-ru.yandex.net https://img0-tub-ru.yandex.net https://img1-tub-ru.yandex.net https://img2-tub-ru.yandex.net https://img3-tub-ru.yandex.net mc.webvisor.com mc.webvisor.org; font-src 'self' data: yast" 20 | checking yandex/django_replicated (12/37, made 109 requests so far) ... 21 | checking yandex/faster-rnnlm (13/37, made 112 requests so far) ... 22 | checking yandex/gixy (14/37, made 115 requests so far) ... 23 | gixy: misspell: CONTRIBUTING.md:19:267: "futher" is a misspelling of "further" 24 | checking yandex/graphouse (15/37, made 120 requests so far) ... 25 | graphouse: broken link: README.md: https://t.me/graphouse: Read tcp4 192.168.0.4:52886->5.3.3.17:443: read: connection reset by peer 26 | checking yandex/handystats (16/37, made 123 requests so far) ... 27 | checking yandex/mapkit-android-demo (17/37, made 126 requests so far) ... 28 | checking yandex/mapkit-ios-demo (18/37, made 128 requests so far) ... 29 | checking yandex/mapsapi-area (19/37, made 130 requests so far) ... 30 | mapsapi-area: misspell: README.md:39:10: "descibed" is a misspelling of "described" 31 | checking yandex/mapsapi-examples (20/37, made 133 requests so far) ... 32 | error: get mapsapi-examples tree: GET https://api.github.com/repos/yandex/mapsapi-examples/git/trees/master?recursive=1: 404 Not Found [] 33 | checking yandex/mapsapi-heatmap (21/37, made 134 requests so far) ... 34 | mapsapi-heatmap: misspell: README.md:66:37: "descibed" is a misspelling of "described" 35 | checking yandex/mapsapi-ios (22/37, made 137 requests so far) ... 36 | mapsapi-ios: misspell: Example/Pods/Cordova/README.md:65:0: "Futher" is a misspelling of "Further" 37 | mapsapi-ios: misspell: Example/Pods/cordova-plugin-globalization/README.md:170:43: "langauge" is a misspelling of "language" 38 | mapsapi-ios: misspell: Example/Pods/cordova-plugin-file/README.md:282:4: "Permisson" is a misspelling of "Permission" 39 | mapsapi-ios: misspell: Example/Pods/cordova-plugin-file/README.md:390:101: "existant" is a misspelling of "existent" 40 | checking yandex/mapsapi-polylabeler (23/37, made 161 requests so far) ... 41 | mapsapi-polylabeler: misspell: README.md:150:42: "occured" is a misspelling of "occurred" 42 | checking yandex/odyssey (24/37, made 164 requests so far) ... 43 | checking yandex/ofd (25/37, made 170 requests so far) ... 44 | checking yandex/ozo (26/37, made 173 requests so far) ... 45 | ozo: misspell: README.md:8:27: "asyncronous" is a misspelling of "asynchronous" 46 | ozo: misspell: README.md:49:50: "folowing" is a misspelling of "following" 47 | checking yandex/pandora (27/37, made 176 requests so far) ... 48 | checking yandex/pgcheck (28/37, made 179 requests so far) ... 49 | checking yandex/pgmigrate (29/37, made 182 requests so far) ... 50 | checking yandex/pire (30/37, made 185 requests so far) ... 51 | checking yandex/porto (31/37, made 188 requests so far) ... 52 | checking yandex/speechkitcloud (32/37, made 193 requests so far) ... 53 | speechkitcloud: broken link: webspeechkit/README.md: https://developer.tech.yandex.ru: Error when reading response headers: small read buffer. Increase ReadBufferSize. Buffer size=4096, contents: "HTTP/1.1 200 OK\r\nServer: nginx\r\nDate: Sat, 13 Oct 2018 04:15:51 GMT\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 23050\r\nConnection: keep-alive\r\nKeep-Alive: timeout=120\r\nVary: Accept-Encodi"..."ub-ru.yandex.net https://img0-tub-ru.yandex.net https://img1-tub-ru.yandex.net https://img2-tub-ru.yandex.net https://img3-tub-ru.yandex.net mc.webvisor.com mc.webvisor.org; font-src 'self' data: yast" 54 | speechkitcloud: broken link: python/README.txt: https://developer.tech.yandex.ru: Error when reading response headers: small read buffer. Increase ReadBufferSize. Buffer size=4096, contents: "HTTP/1.1 200 OK\r\nServer: nginx\r\nDate: Sat, 13 Oct 2018 04:15:51 GMT\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 22647\r\nConnection: keep-alive\r\nKeep-Alive: timeout=120\r\nVary: Accept-Encodi"..."ub-ru.yandex.net https://img0-tub-ru.yandex.net https://img1-tub-ru.yandex.net https://img2-tub-ru.yandex.net https://img3-tub-ru.yandex.net mc.webvisor.com mc.webvisor.org; font-src 'self' data: yast" 55 | speechkitcloud: broken link: python/README.txt: https://developer.tech.yandex.ru/: Error when reading response headers: small read buffer. Increase ReadBufferSize. Buffer size=4096, contents: "HTTP/1.1 200 OK\r\nServer: nginx\r\nDate: Sat, 13 Oct 2018 04:15:51 GMT\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 22556\r\nConnection: keep-alive\r\nKeep-Alive: timeout=120\r\nVary: Accept-Encodi"..."ub-ru.yandex.net https://img0-tub-ru.yandex.net https://img1-tub-ru.yandex.net https://img2-tub-ru.yandex.net https://img3-tub-ru.yandex.net mc.webvisor.com mc.webvisor.org; font-src 'self' data: yast" 56 | checking yandex/tartifacts (33/37, made 198 requests so far) ... 57 | tartifacts: misspell: README.md:99:0: "Searchs" is a misspelling of "Searches" 58 | tartifacts: misspell: README.md:186:7: "specifed" is a misspelling of "specified" 59 | checking yandex/tartifacts-cli (34/37, made 201 requests so far) ... 60 | checking yandex/tcplanz (35/37, made 204 requests so far) ... 61 | checking yandex/webmaster.api (36/37, made 206 requests so far) ... 62 | webmaster.api: broken link: README.MD: https://oauth.yandex.ru/authorize?response_type=code&client_id=[yourclient_id: Error when reading response headers: small read buffer. Increase ReadBufferSize. Buffer size=4096, contents: "HTTP/1.1 200 OK\r\nServer: nginx\r\nDate: Sat, 13 Oct 2018 04:16:05 GMT\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 23638\r\nConnection: keep-alive\r\nKeep-Alive: timeout=120\r\nVary: Accept-Encodi"..."ub-ru.yandex.net https://img0-tub-ru.yandex.net https://img1-tub-ru.yandex.net https://img2-tub-ru.yandex.net https://img3-tub-ru.yandex.net mc.webvisor.com mc.webvisor.org; font-src 'self' data: yast" 63 | webmaster.api: broken link: README.MD: https://oauth.yandex.ru/client/new: Error when reading response headers: small read buffer. Increase ReadBufferSize. Buffer size=4096, contents: "HTTP/1.1 200 OK\r\nServer: nginx\r\nDate: Sat, 13 Oct 2018 04:16:05 GMT\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 22681\r\nConnection: keep-alive\r\nKeep-Alive: timeout=120\r\nVary: Accept-Encodi"..."ub-ru.yandex.net https://img0-tub-ru.yandex.net https://img1-tub-ru.yandex.net https://img2-tub-ru.yandex.net https://img3-tub-ru.yandex.net mc.webvisor.com mc.webvisor.org; font-src 'self' data: yast" 64 | checking yandex/yandex-tank (37/37, made 209 requests so far) ... 65 | -------------------------------------------------------------------------------- /vendor/gopkg.in/src-d/enry.v1/internal/code-generator/generator/generator_test.go: -------------------------------------------------------------------------------- 1 | package generator 2 | 3 | import ( 4 | "fmt" 5 | "io/ioutil" 6 | "os" 7 | "os/exec" 8 | "path/filepath" 9 | "testing" 10 | 11 | "github.com/stretchr/testify/assert" 12 | "github.com/stretchr/testify/suite" 13 | ) 14 | 15 | const ( 16 | linguistURL = "https://github.com/github/linguist.git" 17 | linguistClonedEnvVar = "ENRY_TEST_REPO" 18 | commit = "d5c8db3fb91963c4b2762ca2ea2ff7cfac109f68" 19 | samplesDir = "samples" 20 | languagesFile = "lib/linguist/languages.yml" 21 | 22 | testDir = "test_files" 23 | assetsDir = "../assets" 24 | 25 | // Extensions test 26 | extensionGold = testDir + "/extension.gold" 27 | extensionTestTmplPath = assetsDir + "/extension.go.tmpl" 28 | extensionTestTmplName = "extension.go.tmpl" 29 | 30 | // Heuristics test 31 | heuristicsTestFile = "lib/linguist/heuristics.rb" 32 | contentGold = testDir + "/content.gold" 33 | contentTestTmplPath = assetsDir + "/content.go.tmpl" 34 | contentTestTmplName = "content.go.tmpl" 35 | 36 | // Vendor test 37 | vendorTestFile = "lib/linguist/vendor.yml" 38 | vendorGold = testDir + "/vendor.gold" 39 | vendorTestTmplPath = assetsDir + "/vendor.go.tmpl" 40 | vendorTestTmplName = "vendor.go.tmpl" 41 | 42 | // Documentation test 43 | documentationTestFile = "lib/linguist/documentation.yml" 44 | documentationGold = testDir + "/documentation.gold" 45 | documentationTestTmplPath = assetsDir + "/documentation.go.tmpl" 46 | documentationTestTmplName = "documentation.go.tmpl" 47 | 48 | // Types test 49 | typeGold = testDir + "/type.gold" 50 | typeTestTmplPath = assetsDir + "/type.go.tmpl" 51 | typeTestTmplName = "type.go.tmpl" 52 | 53 | // Interpreters test 54 | interpreterGold = testDir + "/interpreter.gold" 55 | interpreterTestTmplPath = assetsDir + "/interpreter.go.tmpl" 56 | interpreterTestTmplName = "interpreter.go.tmpl" 57 | 58 | // Filenames test 59 | filenameGold = testDir + "/filename.gold" 60 | filenameTestTmplPath = assetsDir + "/filename.go.tmpl" 61 | filenameTestTmplName = "filename.go.tmpl" 62 | 63 | // Aliases test 64 | aliasGold = testDir + "/alias.gold" 65 | aliasTestTmplPath = assetsDir + "/alias.go.tmpl" 66 | aliasTestTmplName = "alias.go.tmpl" 67 | 68 | // Frequencies test 69 | frequenciesGold = testDir + "/frequencies.gold" 70 | frequenciesTestTmplPath = assetsDir + "/frequencies.go.tmpl" 71 | frequenciesTestTmplName = "frequencies.go.tmpl" 72 | 73 | // commit test 74 | commitGold = testDir + "/commit.gold" 75 | commitTestTmplPath = assetsDir + "/commit.go.tmpl" 76 | commitTestTmplName = "commit.go.tmpl" 77 | 78 | // mime test 79 | mimeTypeGold = testDir + "/mimeType.gold" 80 | mimeTypeTestTmplPath = assetsDir + "/mimeType.go.tmpl" 81 | mimeTypeTestTmplName = "mimeType.go.tmpl" 82 | ) 83 | 84 | type GeneratorTestSuite struct { 85 | suite.Suite 86 | tmpLinguist string 87 | cloned bool 88 | } 89 | 90 | func TestGeneratorTestSuite(t *testing.T) { 91 | suite.Run(t, new(GeneratorTestSuite)) 92 | } 93 | 94 | func (s *GeneratorTestSuite) SetupSuite() { 95 | var err error 96 | s.tmpLinguist = os.Getenv(linguistClonedEnvVar) 97 | s.cloned = s.tmpLinguist == "" 98 | if s.cloned { 99 | s.tmpLinguist, err = ioutil.TempDir("", "linguist-") 100 | assert.NoError(s.T(), err) 101 | cmd := exec.Command("git", "clone", linguistURL, s.tmpLinguist) 102 | err = cmd.Run() 103 | assert.NoError(s.T(), err) 104 | } 105 | 106 | cwd, err := os.Getwd() 107 | assert.NoError(s.T(), err) 108 | 109 | err = os.Chdir(s.tmpLinguist) 110 | assert.NoError(s.T(), err) 111 | 112 | cmd := exec.Command("git", "checkout", commit) 113 | err = cmd.Run() 114 | assert.NoError(s.T(), err) 115 | 116 | err = os.Chdir(cwd) 117 | assert.NoError(s.T(), err) 118 | } 119 | 120 | func (s *GeneratorTestSuite) TearDownSuite() { 121 | if s.cloned { 122 | err := os.RemoveAll(s.tmpLinguist) 123 | assert.NoError(s.T(), err) 124 | } 125 | } 126 | 127 | func (s *GeneratorTestSuite) TestGenerationFiles() { 128 | tests := []struct { 129 | name string 130 | fileToParse string 131 | samplesDir string 132 | tmplPath string 133 | tmplName string 134 | commit string 135 | generate File 136 | wantOut string 137 | }{ 138 | { 139 | name: "Extensions()", 140 | fileToParse: filepath.Join(s.tmpLinguist, languagesFile), 141 | samplesDir: "", 142 | tmplPath: extensionTestTmplPath, 143 | tmplName: extensionTestTmplName, 144 | commit: commit, 145 | generate: Extensions, 146 | wantOut: extensionGold, 147 | }, 148 | { 149 | name: "Heuristics()", 150 | fileToParse: filepath.Join(s.tmpLinguist, heuristicsTestFile), 151 | samplesDir: "", 152 | tmplPath: contentTestTmplPath, 153 | tmplName: contentTestTmplName, 154 | commit: commit, 155 | generate: Heuristics, 156 | wantOut: contentGold, 157 | }, 158 | { 159 | name: "Vendor()", 160 | fileToParse: filepath.Join(s.tmpLinguist, vendorTestFile), 161 | samplesDir: "", 162 | tmplPath: vendorTestTmplPath, 163 | tmplName: vendorTestTmplName, 164 | commit: commit, 165 | generate: Vendor, 166 | wantOut: vendorGold, 167 | }, 168 | { 169 | name: "Documentation()", 170 | fileToParse: filepath.Join(s.tmpLinguist, documentationTestFile), 171 | samplesDir: "", 172 | tmplPath: documentationTestTmplPath, 173 | tmplName: documentationTestTmplName, 174 | commit: commit, 175 | generate: Documentation, 176 | wantOut: documentationGold, 177 | }, 178 | { 179 | name: "Types()", 180 | fileToParse: filepath.Join(s.tmpLinguist, languagesFile), 181 | samplesDir: "", 182 | tmplPath: typeTestTmplPath, 183 | tmplName: typeTestTmplName, 184 | commit: commit, 185 | generate: Types, 186 | wantOut: typeGold, 187 | }, 188 | { 189 | name: "Interpreters()", 190 | fileToParse: filepath.Join(s.tmpLinguist, languagesFile), 191 | samplesDir: "", 192 | tmplPath: interpreterTestTmplPath, 193 | tmplName: interpreterTestTmplName, 194 | commit: commit, 195 | generate: Interpreters, 196 | wantOut: interpreterGold, 197 | }, 198 | { 199 | name: "Filenames()", 200 | fileToParse: filepath.Join(s.tmpLinguist, languagesFile), 201 | samplesDir: filepath.Join(s.tmpLinguist, samplesDir), 202 | tmplPath: filenameTestTmplPath, 203 | tmplName: filenameTestTmplName, 204 | commit: commit, 205 | generate: Filenames, 206 | wantOut: filenameGold, 207 | }, 208 | { 209 | name: "Aliases()", 210 | fileToParse: filepath.Join(s.tmpLinguist, languagesFile), 211 | samplesDir: "", 212 | tmplPath: aliasTestTmplPath, 213 | tmplName: aliasTestTmplName, 214 | commit: commit, 215 | generate: Aliases, 216 | wantOut: aliasGold, 217 | }, 218 | { 219 | name: "Frequencies()", 220 | samplesDir: filepath.Join(s.tmpLinguist, samplesDir), 221 | tmplPath: frequenciesTestTmplPath, 222 | tmplName: frequenciesTestTmplName, 223 | commit: commit, 224 | generate: Frequencies, 225 | wantOut: frequenciesGold, 226 | }, 227 | { 228 | name: "Commit()", 229 | samplesDir: "", 230 | tmplPath: commitTestTmplPath, 231 | tmplName: commitTestTmplName, 232 | commit: commit, 233 | generate: Commit, 234 | wantOut: commitGold, 235 | }, 236 | { 237 | name: "MimeType()", 238 | fileToParse: filepath.Join(s.tmpLinguist, languagesFile), 239 | samplesDir: "", 240 | tmplPath: mimeTypeTestTmplPath, 241 | tmplName: mimeTypeTestTmplName, 242 | commit: commit, 243 | generate: MimeType, 244 | wantOut: mimeTypeGold, 245 | }, 246 | } 247 | 248 | for _, test := range tests { 249 | gold, err := ioutil.ReadFile(test.wantOut) 250 | assert.NoError(s.T(), err) 251 | 252 | outPath, err := ioutil.TempFile("/tmp", "generator-test-") 253 | assert.NoError(s.T(), err) 254 | defer os.Remove(outPath.Name()) 255 | err = test.generate(test.fileToParse, test.samplesDir, outPath.Name(), test.tmplPath, test.tmplName, test.commit) 256 | assert.NoError(s.T(), err) 257 | out, err := ioutil.ReadFile(outPath.Name()) 258 | assert.NoError(s.T(), err) 259 | assert.EqualValues(s.T(), gold, out, fmt.Sprintf("%v: %v, expected: %v", test.name, string(out), string(gold))) 260 | } 261 | } 262 | --------------------------------------------------------------------------------