Can it used for c++ check?
sunwuyan opened this issue · 2 comments
sunwuyan commented
Hi,igcommit is great,but can it be used for c++ check?
kofrezo commented
Hey @sunwuyan,
There is currently no support for C++ linters/checks. However it is simple to add them. One would have to the following:
- Adjust the list of file type extensions to match cpp files at https://github.com/innogames/igcommit/blob/master/igcommit/config.py#L45
file_extensions = {
'coffee': re_compile('^coffee'),
'php': re_compile('^php'),
'pp': re_compile('^puppet'),
'py': re_compile('^python'),
'rb': re_compile('^ruby'),
'sh': re_compile('sh$'),
'js': re_compile('js$'),
'cpp': re_compile('cpp$'),
}
- Configure a linter of check program you would want to execute at https://github.com/innogames/igcommit/blob/master/igcommit/config.py#L45
# C++
checks.append(CheckCommand(
args=['your-cpp-lintern', '/dev/stdin'],
extension='cpp',
))
I am not very firm with C++ so I don't know what linters or checks should be chosen but if you have a suggestion for a configuration that would be great.
Hint: You can at any time adjust your igcommit installations configuration to test configuration for your setup and maybe then come up with a general suggestion for C++ here ?
sunwuyan commented
Thank you very much!It' great!