From 88527a2778cde078599308e1b0675b4fd11c2351 Mon Sep 17 00:00:00 2001 From: Shohei YOSHIDA Date: Sun, 8 Mar 2026 22:09:19 +0900 Subject: [PATCH] Fix cppcheck completion - remove duplicated options - fix file name completion --- src/_cppcheck | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/_cppcheck b/src/_cppcheck index 4ccc081..6111156 100644 --- a/src/_cppcheck +++ b/src/_cppcheck @@ -68,14 +68,13 @@ _cppcheck() { "*--disable=[Disable individual checks]:id:$check_ids" \ "--dump[Dump xml data for each translation unit]" \ "-D[Define preprocessor symbol]" \ - "-U[Undefine preprocessor symbol]" \ "-E[Print preprocessor output on stdout and don't do any further processing]" \ "--enable=[Enable additional checks]:id:$check_ids" \ "--error-exitcode=[Integer to return if errors are found]" \ "--errorlist[Print a list of all the error messages in XML format]" \ "--exitcode-suppressions=[Used when certain messages should be displayed but should not cause a non-zero exitcode]:_files" \ "*--file-filter=[Analyze only those files matching the given filter str]:filter" \ - "--file-list=[Specify the files to check in a text file]:_files" \ + "--file-list=[Specify the files to check in a text file]:file:_files" \ "(-f --force)"{-f,--force}"[Force checking of all configurations in files]" \ "(--fsigned-char --funsigned-char)--fsigned-char[Treat char type as signed]" \ "(--fsigned-char --funsigned-char)--funsigned-char[Treat char type as unsigned]" \ @@ -95,12 +94,11 @@ _cppcheck() { "--output-file=[File to save results]:file:_files" \ "--output-format=[Specify the output format]:format:(text sarif xml)" \ "--platform=[Specified platform specific types and sizes]:platform:$platforms" \ - "--plist-output=[Generate Clang-plist output files in folder]:_files" \ + "--plist-output=[Generate Clang-plist output files in folder]:file:_files" \ "--project=[Run Cppcheck on project]:file:_files" \ "--project-configuration=[Limit the configuration cppcheck should check]:configuration" \ - "--platform=[Set platform specific types and sizes]:platforms:(unix32 unix64 win32A win32W win64 avr8 elbrus-e1cp pic8 pic8-enhanced pic16 mips32 native unspecified)" \ "(-q --quiet)"{-q,--quiet}"[Do not show progress reports]" \ - {-rp,--relative-paths}"=[Use relative paths in output (separated with ;)]:_files" \ + {-rp,--relative-paths}"=[Use relative paths in output (separated with ;)]:file:_files" \ "--report-progress[Report progress messages while checking a file]" \ "--report-type=[Add guideline and classification fields for specified coding standard]:standard:$coding_standards" \ "--rule=[Match regular expression]:rule" \ @@ -108,8 +106,8 @@ _cppcheck() { "--showtime=[show timing information]:type:(none file file-total summary top5_file top5_summary top5)" \ "--std=[Set standard]:std:(c89 c99 c11 c++03 c++11 c++14 c++17 c++20)" \ "--suppress=[Suppress warnings (format: \[error id\]:\[filename\]:\[line\])]" \ - "--suppressions-list=[Suppress warnings listed in the file]:_files" \ - "--suppress-xml=[Suppress warnings listed in a xml file]:_files" \ + "--suppressions-list=[Suppress warnings listed in the file]:file:_files" \ + "--suppress-xml=[Suppress warnings listed in a xml file]:file:_files" \ "--template=[Format the error messages]" \ "--template-location=[Format the error message location]" \ "*-U[Undefine preprocessor symbol]:symbol" \