Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: yasman on January 29, 2012, 01:49:11 pm

Title: Add Command Line Argument to plugin?
Post by: yasman on January 29, 2012, 01:49:11 pm
I've searched, but can't seem to find..

Short of re-compiling the source of course, is there a way to change the arguments of a specific plugin?

In this code I would like to add --force to cppcheck?

Thanks for any advice!
Title: Re: Add Command Line Argument to plugin?
Post by: oBFusCATed on January 29, 2012, 02:06:28 pm
No, you can't, you have to change the code and them compile it.
Title: Re: Add Command Line Argument to plugin?
Post by: stahta01 on January 29, 2012, 04:49:08 pm
In theory yes, create a script file with same name as exec the CB program calls the script file.
And, the script file calls the exec. Note, in this exact instance it might not work.

NOTE: This is NOT for adding a command line argument to the plugin; but, adding a command line argument to the exe called by the plugin.

Tim S.
Title: Re: Add Command Line Argument to plugin?
Post by: MortenMacFly on January 29, 2012, 05:20:50 pm
No, you can't, you have to change the code and them compile it.
True, but it should be very easy to patch. E.g. prompting for additional parameter before running cppcheck should be a 3-5 liner. Patches are welcome.
Title: Re: Add Command Line Argument to plugin?
Post by: yasman on January 29, 2012, 10:48:57 pm
Thanks for the replies, and yes it should be an easy patch..

After looking at the code, I found this dirty workaround...

I added the following include path (although I'm sure it will break my build...):

 
Quote
./" --force "./

Worked good to add the argument I wanted.  Thanks to all.