Parse a bunch of files from bash-it on CI

This commit is contained in:
Max Brunsfeld 2018-03-01 11:10:20 -08:00
parent 51b212b207
commit c92b80e807
6 changed files with 80 additions and 1 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "examples/bash-it"]
path = examples/bash-it
url = https://github.com/Bash-it/bash-it.git

View File

@ -1,3 +1,4 @@
corpus corpus
build build
examples examples
script

1
examples/bash-it vendored Submodule

@ -0,0 +1 @@
Subproject commit c3d9c46ef832f808c929a22b36c8ef6dd45cb98a

View File

@ -17,6 +17,6 @@
}, },
"scripts": { "scripts": {
"build": "tree-sitter generate && node-gyp build", "build": "tree-sitter generate && node-gyp build",
"test": "tree-sitter test && tree-sitter parse examples/* --quiet --time" "test": "tree-sitter test && script/parse-examples.sh"
} }
} }

59
script/known-failures.txt Normal file
View File

@ -0,0 +1,59 @@
examples/bash-it/plugins/available/git.plugin.bash
examples/bash-it/plugins/available/fasd.plugin.bash
examples/bash-it/plugins/available/fzf.plugin.bash
examples/bash-it/plugins/available/z.plugin.bash
examples/bash-it/plugins/available/extract.plugin.bash
examples/bash-it/plugins/available/less-pretty-cat.plugin.bash
examples/bash-it/plugins/available/z_autoenv.plugin.bash
examples/bash-it/plugins/available/sshagent.plugin.bash
examples/bash-it/plugins/available/gif.plugin.bash
examples/bash-it/plugins/available/go.plugin.bash
examples/bash-it/plugins/available/proxy.plugin.bash
examples/bash-it/plugins/available/browser.plugin.bash
examples/bash-it/install.sh
examples/bash-it/completion/available/terraform.completion.bash
examples/bash-it/completion/available/go.completion.bash
examples/bash-it/completion/available/maven.completion.bash
examples/bash-it/completion/available/svn.completion.bash
examples/bash-it/completion/available/docker-compose.completion.bash
examples/bash-it/completion/available/jboss7.completion.bash
examples/bash-it/completion/available/todo.completion.bash
examples/bash-it/completion/available/gh.completion.bash
examples/bash-it/completion/available/bundler.completion.bash
examples/bash-it/completion/available/gradle.completion.bash
examples/bash-it/completion/available/drush.completion.bash
examples/bash-it/completion/available/test_kitchen.completion.bash
examples/bash-it/completion/available/hub.completion.bash
examples/bash-it/completion/available/docker-machine.completion.bash
examples/bash-it/completion/available/fabric-completion.bash
examples/bash-it/completion/available/git.completion.bash
examples/bash-it/completion/available/vagrant.completion.bash
examples/bash-it/completion/available/defaults.completion.bash
examples/bash-it/completion/available/packer.completion.bash
examples/bash-it/completion/available/salt.completion.bash
examples/bash-it/completion/available/vault.completion.bash
examples/bash-it/completion/available/docker.completion.bash
examples/bash-it/completion/available/tmux.completion.bash
examples/bash-it/completion/available/projects.completion.bash
examples/bash-it/completion/available/virsh.completion.bash
examples/bash-it/completion/available/apm.completion.bash
examples/bash-it/completion/available/git_flow.completion.bash
examples/bash-it/lib/helpers.bash
examples/bash-it/lib/preexec.bash
examples/bash-it/lib/composure.bash
examples/bash-it/lib/search.bash
examples/bash-it/themes/hawaii50/hawaii50.theme.bash
examples/bash-it/themes/iterate/iterate.theme.bash
examples/bash-it/themes/dulcie/dulcie.theme.bash
examples/bash-it/themes/colors.theme.bash
examples/bash-it/themes/rana/rana.theme.bash
examples/bash-it/themes/morris/morris.theme.bash
examples/bash-it/themes/atomic/atomic.theme.bash
examples/bash-it/themes/powerline/powerline.base.bash
examples/bash-it/themes/base.theme.bash
examples/bash-it/themes/brainy/brainy.theme.bash
examples/bash-it/themes/nwinkler_random_colors/nwinkler_random_colors.theme.bash
examples/bash-it/themes/mbriggs/mbriggs.theme.bash
examples/bash-it/themes/kitsune/kitsune.theme.bash
examples/bash-it/themes/doubletime/doubletime.theme.bash
examples/bash-it/themes/duru/duru.theme.bash

15
script/parse-examples.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
known_failures=$(cat script/known-failures.txt)
example_files=$(find examples -name '*.sh' -or -name '*.bash')
examples_to_parse=$(
for example in $example_files; do
if [[ ! $known_failures == *$example* ]]; then
echo $example
fi
done
)
tree-sitter parse $examples_to_parse -q -t