Mục Lục
1. Overview
This article is written to resolve “compilation contains multiple jobs” issue of OCLint 22.0.
Currently, OClint 22.0 cannot fix this issue. Fortunately, Lianghuajian released a an unofficial release OCLint 23.0 to fix this issue.
https://github.com/Lianghuajian/oclint/tree/support_xcode14
2. Build and Install OCLint 23.0
3. Using a workaround to remove unexpected text
Add 2 line below to your command line to remove unexpected text in code analysis result. The 2 lines must be above oclint-json-compilation-database command line.
sed 's/-ivfsstatcache [^ ]*//g' < compile_commands.json > icompile_commands.json
mv icompile_commands.json compile_commands.json
oclint-json-compilation-database -e path/to/excluded/files -v -rc=LONG_LINE=120 -max-priority-1=100 -max-priority-2=504. XCode 15.2
Please note that this workaround works with XCode 15.2 and does not work with 15.3.
Thank you and good luck!