-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make json-compilation-database reporter working with oclint-json-compilation-database (0.9dev) #121
Conversation
…ompilation-database (0.9dev) - "directory" and "file" are consistent (compliant with http://clang.llvm.org/docs/JSONCompilationDatabase.html) - compilation command is compatible (include a pch file path correction) - handle paths containing spaces, e.g. : .../Core\ Data/... - updated specs
|
||
json_db[0]["command"].should start_with("/Applications/Xcode.app/Contents/Developer") | ||
json_db[0]["command"].should end_with(".o") | ||
json_db[0]['command'].should start_with('/Applications/Xcode.app/Contents/Developer') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [87/80]
…ompile regex with directive including space in path
@@ -41,11 +41,12 @@ module Matchers | |||
# @regex Captured groups | |||
# $1 file_path | |||
# $2 file_name (e.g. KWNull.m) | |||
COMPILE_MATCHER = /^CompileC\s.*\s(.*\/(.*\.(?:m|mm|c|cc|cpp|cxx)))\s.*/ | |||
COMPILE_MATCHER = /^CompileC\s.+?\s((?:\\.|[^ ])+\/((?:\\.|[^ ])+\.(?:m|mm|c|cc|cpp|cxx)))\s.*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [99/80]
@AliSoftware : Ruby 1.8.7 doesn't support regular expression lookbehind assertions. I missed that, sorry. Thanks for your support with lookbehind' regex.
|
@iKiKi @AliSoftware thank you guys for your work! |
Looks good to me. Nice work, @iKiKi! I'd agree that we might need to check for swift support but I'm otherwise good with the changes. |
As the actual state of the project does not support Swift yet (the RegExes were already only listing extensions for ObjC & C++ but not Swift), maybe we could merge this PR, and have a new, dedicated issue to add Swift support (which would probably need separate work with dedicated specs and reviewing every regex)? |
@AliSoftware you're actually right - we've added Swift support but only for syntax highlighting. |
Make json-compilation-database reporter working with oclint-json-compilation-database (0.9dev)
Make
json-compilation-database
reporter compatible withoclint-json-compilation-database
(0.9dev) :