Skip to content
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

Merged
merged 3 commits into from
Feb 4, 2015
Merged

Conversation

iKiKi
Copy link
Contributor

@iKiKi iKiKi commented Jan 23, 2015

Make json-compilation-database reporter compatible with oclint-json-compilation-database (0.9dev) :

  • "directory" and "file" are consistent (compliant with the format spec)
  • compilation command is compatible (include a pch file path correction)
  • handle paths containing spaces, e.g. : .../Core\ Data/...
  • updated specs

…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')
Copy link
Collaborator

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]

Killian THORON added 2 commits January 23, 2015 10:57
@@ -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.*/
Copy link
Collaborator

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]

@iKiKi
Copy link
Contributor Author

iKiKi commented Jan 24, 2015

@AliSoftware : Ruby 1.8.7 doesn't support regular expression lookbehind assertions. I missed that, sorry. Thanks for your support with lookbehind' regex.
commit cd1bcd3 reviews regex with lookbehind assertions and add some specs to test compile directive including spaces in paths.
I also relaunched in my terminal xcpretty and oclint analysis... still wortking with:

OCLint version 0.9dev.
Built Jun 17 2014 (03:37:13)

@supermarin
Copy link
Contributor

@iKiKi @AliSoftware thank you guys for your work!
I've skimmed over the changes, and it seems ok except the Swift comment.
Pinging @kattrali in case I've missed something

@kattrali
Copy link
Contributor

kattrali commented Feb 4, 2015

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.

@AliSoftware
Copy link

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)?

@supermarin
Copy link
Contributor

@AliSoftware you're actually right - we've added Swift support but only for syntax highlighting.
Thanks for your thoughts!

supermarin added a commit that referenced this pull request Feb 4, 2015
Make json-compilation-database reporter working with oclint-json-compilation-database (0.9dev)
@supermarin supermarin merged commit 7e1a84d into xcpretty:master Feb 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants