-
-
Notifications
You must be signed in to change notification settings - Fork 906
Closed
Labels
Description
Problem
Occasionally it is necessary to use -- to signify options that take an argument. When -- is used, any file arguments are ignored.
Description
I am using oclint, which identifies potential problems in c code. -- is required to specify compiler options. This is my current configuration:
[-- skipped for brevity --]
- repo: local
hooks:
- id: oclint
name: oclint
description: Find warnings/errors in C/CPP code
entry: oclint
types: [c]
pass_filenames: true
args: [
-enable-clang-static-analyzer,
-enable-global-analysis,
--,
-report-type=json,
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON,
]
language: systemWhen running on a valid c file, I get this output:
oclint...................................................................Failed
hookid: oclint
oclint: Not enough positional command line arguments specified!
Must specify at least 1 positional argument: See: /usr/local/bin/oclint -helpSolution
Looking at the code, it looks like you are appending file arguments to the end instead of infixing them before --. A pull request that fixes this will be coming in a few.