Compare commits
No commits in common. "4b23ecd62a9ad79ddf2ac03c0bd8a7b43266508c" and "3287c3dd30f79a76f1543d7902502def8be20992" have entirely different histories.
4b23ecd62a
...
3287c3dd30
|
|
@ -1,4 +1,4 @@
|
||||||
#compdef cppcheck cppcheck-htmlreport
|
#compdef cppcheck
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Copyright (c) 2019 Github zsh-users - https://github.com/zsh-users
|
# Copyright (c) 2019 Github zsh-users - https://github.com/zsh-users
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
|
|
@ -48,36 +48,18 @@ _cppcheck_files() {
|
||||||
_path_files -/ -g "*.(c|cpp|cxx|h|hpp|C)"
|
_path_files -/ -g "*.(c|cpp|cxx|h|hpp|C)"
|
||||||
}
|
}
|
||||||
|
|
||||||
_cppcheck_author_information() {
|
_cppcheck() {
|
||||||
local -a info=(name email date)
|
local -a check_ids=(
|
||||||
_values -s ',' 'info' $info
|
|
||||||
}
|
|
||||||
|
|
||||||
local -a check_ids=(
|
|
||||||
all warning style performance portability information unusedFunction missingInclude
|
all warning style performance portability information unusedFunction missingInclude
|
||||||
)
|
)
|
||||||
local -a platforms=(
|
local -a platforms=(
|
||||||
unix32 unix64 win32A win32W win64 avr8 elbrus-e1cp pic8 pic8-enhanced pic16 mips32 native unspecified
|
unix32 unix64 win32A win32W win64 avr8 elbrus-e1cp pic8 pic8-enhanced pic16 mips32 native unspecified
|
||||||
)
|
)
|
||||||
local -a coding_standards=(
|
local -a coding_standards=(
|
||||||
normal autosar cert-c-2016 cert-cpp-2016 misra-c-2012 misra-c-2023 misra-c-2025
|
normal autosar cert-c-2016 cert-cpp-2016 misra-c-2012 misra-c-2023 misra-c-2025
|
||||||
misra-cpp-2008 misra-cpp-2023
|
misra-cpp-2008 misra-cpp-2023
|
||||||
)
|
)
|
||||||
|
|
||||||
case $service in
|
|
||||||
(cppcheck-htmlreport)
|
|
||||||
_arguments \
|
|
||||||
'(- *)'{-h,--help}'[show help message and exit]' \
|
|
||||||
'--title[Title of the project]:title' \
|
|
||||||
'*--file[cppcheck xml output file to read defects from(default stdin)]:file:_files' \
|
|
||||||
'--checkers-report-file[cppcheck checkers report file]:file:_files' \
|
|
||||||
'--report-dir[Directory where the HTML report content is written]:dir:_files -/' \
|
|
||||||
'--source-dir[Base directory where source code files can be found or a URL to a remote]:dir:_files -/' \
|
|
||||||
'--add-author-information[Blame information to include(default "name,email,date")]:info:_cppcheck_author_information' \
|
|
||||||
'--source-encoding[Encoding of source code]:encoding' \
|
|
||||||
'--blame-options[Blame options which you can use to get author and author mail]:options'
|
|
||||||
;;
|
|
||||||
(cppcheck)
|
|
||||||
_arguments \
|
_arguments \
|
||||||
"--addon=[Execute addon]" \
|
"--addon=[Execute addon]" \
|
||||||
"--addon-python=[Specify the python interpreter]: :_files" \
|
"--addon-python=[Specify the python interpreter]: :_files" \
|
||||||
|
|
@ -140,8 +122,9 @@ case $service in
|
||||||
"--version[Print out version number]" \
|
"--version[Print out version number]" \
|
||||||
"--xml[Write results in xml format to stderr]" \
|
"--xml[Write results in xml format to stderr]" \
|
||||||
"*: :_cppcheck_files"
|
"*: :_cppcheck_files"
|
||||||
;;
|
}
|
||||||
esac
|
|
||||||
|
_cppcheck "$@"
|
||||||
|
|
||||||
# Local Variables:
|
# Local Variables:
|
||||||
# mode: Shell-Script
|
# mode: Shell-Script
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue