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

Issue with Xcode 11: many "error generated" and oclint.xml not generated #547

Closed
egr-ext opened this issue Sep 24, 2019 · 22 comments
Closed

Comments

@egr-ext
Copy link

egr-ext commented Sep 24, 2019

Issue Summary

After I upgraded to Xcode 11, oclint is crashing:

  • Many warning with "N error generated"
  • crash on "oclint: error: cannot open report output file /Users/***/sonar-reports/oclint.xml"

The report is not generated.

Environment

  • Operation system name and version:
    macOS Mojave 10.14.6 and Xcode 11.0

  • OCLint version:
    LLVM (http://llvm.org/):
    LLVM version 5.0.1
    Optimized build.
    Default target: x86_64-apple-darwin18.7.0
    Host CPU: skylake
    OCLint (http://oclint.org/):
    OCLint version 0.13.1.
    Built Feb 6 2018 (09:25:36).

  • How OCLint is installed: local build? prebuilt binary downloaded from github? homebrew install? others?
    Manually installed after being downloaded from github (also tested with homebrew installation too)

Reproduction Steps

Launch following command line:

$ oclint -report-type=pmd -o=sonar-reports/oclint.xml -rc=LONG_LINE=200 -rc=LONG_METHOD=200 -max-priority-1=9999 -max-priority-2=9999 -max-priority-3=9999 -allow-duplicated-violations -p sonar-reports -extra-arg -Wno-everything "* all source code files"

@deimian86
Copy link

Same here since XCode 11 update.

@egr-ext
Copy link
Author

egr-ext commented Oct 4, 2019

It seems it does not compile ?
I am surprised there is no more discussions about that ?

@skywancen
Copy link

skywancen commented Oct 22, 2019

You can upgrade llvm9.0 to oclint, I just resolved this issue.
This is my commit: #548
You can try it!Good luck!

@egr-ext
Copy link
Author

egr-ext commented Oct 22, 2019

Hi Skywancen,

Thanks a lot !

So I checkout your code and I have to build oclint ? I tryed to build oclint but it seems to be very difficult and takes a long time.

What script or command line I have to perform exactly ?

Regards

@skywancen
Copy link

skywancen commented Oct 22, 2019

You should do this

  1. $ cd oclint-scripts
  2. $ ./make
    this should be a long time about an hour.
    if execute successfully, you can find "oclint-release" folder in build folder

If you want to use build cache, you can find oclint/oclint-scripts/ci , delete the "rm_f" lines corresponding.

@ryuichis
Copy link
Contributor

I just made the 0.15 release, and that would resolve the Xcode incompatibility issue.

@egr-ext
Copy link
Author

egr-ext commented Oct 25, 2019

Hi @ryuichis,

I just dowloaded the 0.15 zip archive.
I build it with the script: ./make but the oclint binary return 0.14 version ? there is no oclint-0.15 generated.

@ryuichis
Copy link
Contributor

@egr-ext I updated the tag just now, would you please try it again?

@egr-ext
Copy link
Author

egr-ext commented Oct 28, 2019

OK I test, have you updated also the symlink oclint ~> oclint-0.15 ?

@egr-ext
Copy link
Author

egr-ext commented Oct 28, 2019

So I built this morning your last zip with sources with ./make

  • I generated a binairy file named: oclint-0.14
  • ./oclint-0.14 -version returns 0.15 (see screenshot)
  • The symlink points to a file that does not exists (oclint-0.15)

My guess is the oclint-0.14 is wrong it should be named oclint-0.15.

Here is a screenshot of my build directory:

oclint

@skywancen
Copy link

Now, you can use https://github.com/oclint/oclint, checkout the branch to master, then build with ./make, the version number will be 0.15!

@ryuichis
Copy link
Contributor

@egr-ext Thank you for your patience and letting us know the issue. I have identified one more piece that needs to be updated. Could you please give it another try, and let us know if it works for you this time?

@egr-ext
Copy link
Author

egr-ext commented Oct 28, 2019

OK I build it again.

@egr-ext
Copy link
Author

egr-ext commented Oct 29, 2019

I confirm it is fixed

@ryuichis
Copy link
Contributor

@egr-ext that's very good to know. Thanks again for testing this along with us.

@LionWY
Copy link

LionWY commented Dec 18, 2019

Now, you can use https://github.com/oclint/oclint, checkout the branch to master, then build with ./make, the version number will be 0.15!

@skywancen can you upload brew, so we can brew install oclint, to get the version 0.15, ./make takes long long long time, and often error, I am almost crazy, please help me

@LionWY
Copy link

LionWY commented Dec 20, 2019

I confirm it is fixed

@egr-ext egr-ext can you upload brew, so we can brew install oclint, to get the version 0.15, ./make takes long long long time, and often error, I am almost crazy, please help me

@hafiz-mohsin-confiz
Copy link

hafiz-mohsin-confiz commented Jan 29, 2020

@egr-ext Please upload oclint0.15 to brew so that we can incorporate the latest changes otherwise its give following warning when you run a command on terminal.
brew upgrade oclint
Warning: oclint/formulae/oclint 0.13 already installed
Thanks,

@hafiz-mohsin-confiz
Copy link

any update on this?

@cocoay
Copy link

cocoay commented May 25, 2020

@hafiz-mohsin-confiz
Copy link

@cocoay
Thanks for sharing the Oclint0.15 binary file.

@ShenYj
Copy link

ShenYj commented Sep 3, 2020

It's work! thks

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

No branches or pull requests

8 participants