summaryrefslogtreecommitdiff
path: root/dot-oh-my-zsh/plugins/codeclimate/_codeclimate
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2024-07-06 18:09:04 +0800
committerlittleblack111 <littleblack11111@gmail.com>2024-07-06 18:09:04 +0800
commit18666e3475d3a4180d9becc03cb105fcaa6c6801 (patch)
treee80c0968dc91258afdbe5337c1478efd2f43a006 /dot-oh-my-zsh/plugins/codeclimate/_codeclimate
parentbb533a817ed9449942905e0c5c8164f4474fbf0c (diff)
added submodule
Diffstat (limited to 'dot-oh-my-zsh/plugins/codeclimate/_codeclimate')
m---------dot-oh-my-zsh0
-rw-r--r--dot-oh-my-zsh/plugins/codeclimate/_codeclimate82
2 files changed, 0 insertions, 82 deletions
diff --git a/dot-oh-my-zsh b/dot-oh-my-zsh
new file mode 160000
+Subproject 6fe84bf5c82da7b1f6d7c5ec3e5c447721ac8ce
diff --git a/dot-oh-my-zsh/plugins/codeclimate/_codeclimate b/dot-oh-my-zsh/plugins/codeclimate/_codeclimate
deleted file mode 100644
index fd2536a3..00000000
--- a/dot-oh-my-zsh/plugins/codeclimate/_codeclimate
+++ /dev/null
@@ -1,82 +0,0 @@
-#compdef codeclimate
-
-_codeclimate_all_engines() {
- engines_all=(`codeclimate engines:list | tail -n +2 | gawk '{ print $2 }' | gawk -F: '{ print $1 }'`)
-}
-
-_codeclimate_installed_engines() {
- _codeclimate_all_engines
-
- engines_installed=()
-
- if [ -e .codeclimate.yml ]
- then
- for engine in $engines_all
- do
- if grep -q $engine ".codeclimate.yml"
- then
- engines_installed+=$engine
- fi
- done
- fi
-}
-
-_codeclimate_not_installed_engines() {
- _codeclimate_all_engines
-
- engines_not_installed=()
-
- if [ -e .codeclimate.yml ]
- then
- for engine in $engines_all
- do
- if ! grep -q $engine ".codeclimate.yml"
- then
- engines_not_installed+=$engine
- fi
- done
- fi
-}
-
-local curcontext="$curcontext" state line ret=1
-local expl
-local -a engines_all engines_installed engines_not_installed
-
-_arguments \
- '1: :->cmds' \
- '*:: :->args' && ret=0
-
-case $state in
- cmds)
- _values "bundle command" \
- "analyze[Analyze all relevant files in the current working directory]" \
- "console[Start an interactive session providing access to the classes within the CLI]" \
- "engines\:disable[Prevents the engine from being used in this project]" \
- "engines\:enable[This engine will be run the next time your project is analyzed]" \
- "engines\:install[Compares the list of engines in your .codeclimate.yml file to those that are currently installed, then installs any missing engines]" \
- "engines\:list[Lists all available engines in the Code Climate Docker Hub]" \
- "engines\:remove[Removes an engine from your .codeclimate.yml file]" \
- "help[Displays a list of commands that can be passed to the Code Climate CLI]" \
- "init[Generates a new .codeclimate.yml file in the current working directory]" \
- "validate-config[Validates the .codeclimate.yml file in the current working directory]" \
- "version[Displays the current version of the Code Climate CLI]"
- ret=0
- ;;
- args)
- case $line[1] in
- engines:enable)
- _codeclimate_not_installed_engines
- _wanted engines_not_installed expl 'not installed engines' compadd -a engines_not_installed ;;
- engines:disable|engines:remove)
- _codeclimate_installed_engines
- _wanted engines_installed expl 'installed engines' compadd -a engines_installed ;;
- analyze)
- _arguments \
- '-f:Output Format:(text json)'
- ret=0
- ;;
- esac
- ;;
-esac
-
-return ret