sonar-swift | SonarQube iOS Plugin , Support Objective | Code Analyzer library

 by   tal-tech Java Version: v1.5.0 License: Non-SPDX

kandi X-RAY | sonar-swift Summary

kandi X-RAY | sonar-swift Summary

sonar-swift is a Java library typically used in Financial Services, Banks, Payments, Code Quality, Code Analyzer applications. sonar-swift has no bugs, it has no vulnerabilities, it has build file available and it has low support. However sonar-swift has a Non-SPDX License. You can download it from GitHub.

sonar-swift.SonarQube iOS Plugin, Support Objective-C/Swift/Java, Support import Infer Issue (SonarQube iOS 代码扫描插件,支持 Objective-C 和 Swift / Java,支持 Infer 结果导入 ) base on
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              sonar-swift has a low active ecosystem.
              It has 88 star(s) with 14 fork(s). There are 11 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 5 open issues and 0 have been closed. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of sonar-swift is v1.5.0

            kandi-Quality Quality

              sonar-swift has no bugs reported.

            kandi-Security Security

              sonar-swift has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              sonar-swift has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              sonar-swift releases are available to install and integrate.
              Build file is available. You can build the component from source.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed sonar-swift and discovered the below as its top functions. This is intended to give you an instant insight into sonar-swift implemented functionality, and help decide if they suit your requirements.
            • Main entry point
            • Assigned constant context
            • Matches a statement
            • Main expression context
            • Matches a directive
            • Parse preprocessor expression
            • Matches a directive text
            • Defines new rule
            • Initialize rules
            • Define rules
            • Overrides method definition
            • Define new rule
            • Get the keyword values of all available keywords
            • Defines a built - in quality profile
            • Parse the report
            • Get the keyword values
            • Process the Tailor report
            • Parse SwiftLint report
            • Define new rules
            • Records the issue
            • Records an issue
            • Define the Objective - Code profiling
            • Does the actual scanning of the files
            • Gets the lines from the given input stream
            • Perform the actual analysis
            • Performs actual scanning
            Get all kandi verified functions for this library.

            sonar-swift Key Features

            No Key Features are available at this moment for sonar-swift.

            sonar-swift Examples and Code Snippets

            No Code Snippets are available at this moment for sonar-swift.

            Community Discussions

            QUESTION

            Sonar-runner: Command not found
            Asked 2019-Oct-29 at 12:17
            -n Running Tailor...
            -n Running Lizard..
            ++ sonar-runner
            ./run-sonar-swift.sh: line 82: sonar-runner: command not found
            ++ returnValue=127
            ++ set +x
            ERROR - Command 'sonar-runner ' failed with error code: 127
            
            ...

            ANSWER

            Answered 2019-Oct-29 at 12:17

            I finally resolved it, sonar-runner is deprecated now instead we have to use sonar-scanner but my project was built on sonar-runner if I want to make it as sonar-runner then I have to edit all the files which I can't, so instead of updating all the files I downloaded the old sonar-runner binaries and placed it in the same directory as sonar-scanner;also added the PATH to bash_profile.

            Then I triggered the job then it worked...!!!

            Source https://stackoverflow.com/questions/58483995

            QUESTION

            Can not make script 'run-sonar-swift' works
            Asked 2018-Nov-12 at 21:24

            I am trying to run sonar swift. I have already sonarQube with the plugin and I can access it locally using this url http://localhost:9000 . I have installed all prerequisites that you can find here :

            https://github.com/Backelite/sonar-swift

            But I can't figure out what is this error when i launch run-sonar-swift.sh.

            If anyone can bring me the light I would be very grateful.

            Here the logs when I run in terminal command ./run-sonar-swift.sh -v :

            MacBook-Air:streamus-phoenix-ios oboujaouane$ ./run-sonar-swift.sh -v

            Running run-sonar-swift.sh...

            Project count is [1]

            Xcode project file is: Streamus.xcodeproj

            Xcode workspace file is: Streamus.xcworkspace

            Xcode application scheme is: Streamus Alpha

            Destination simulator is: platform=iOS Simulator,name=iPhone 6,OS=11.3

            Excluded paths from coverage are: .Tests.

            Creating directory sonar-reports/

            Running tests + xcodebuild clean build test -workspace Streamus.xcworkspace -scheme 'Streamus Alpha' -configuration Debug -enableCodeCoverage YES -destination 'platform=iOS Simulator,name=iPhone 6,OS=11.3' -destination-timeout 60

            2018-05-12 10:34:14.031 xcodebuild[32149:775290] IDETestOperationsObserverDebug: Writing diagnostic log for test session to: /var/folders/9v/vdbbf4j96hxgcxmtpntznytr0000gn/T/com.apple.dt.XCTest/IDETestRunSession-9A7EF764-6391-4C7D-9F34-066A9DFEC5E9/StreamusUITests-87E838E0-4F8F-4C19-B2AC-C2C0A274E8EC/Session-StreamusUITests-2018-05-12_103414-jhm3wz.log

            2018-05-12 10:34:14.032 xcodebuild[32149:769805] [MT] IDETestOperationsObserverDebug: (98FB295E-FE60-46AA-8589-015B0DD2E617) Beginning test session StreamusUITests-98FB295E-FE60-46AA-8589-015B0DD2E617 at 2018-05-12 10:34:14.031 with Xcode 9E145 on target { SimDevice: iPhone 6 (672DE879-E48B-45DA-BFD9-D0412F51A706, iOS 11.3, Booted) } (11.3 (15E217))

            2018-05-12 10:34:14.061 xcodebuild[32149:769805] [MT] IDETestOperationsObserverDebug: (458F86F6-1492-40F1-9F72-A88FC23BD985) Beginning test session StreamusTests-458F86F6-1492-40F1-9F72-A88FC23BD985 at

            2018-05-12 10:34:14.061 with Xcode 9E145 on target { SimDevice: iPhone 6 (672DE879-E48B-45DA-BFD9-D0412F51A706, iOS 11.3, Booted) } (11.3 (15E217))

            2018-05-12 10:34:14.061 xcodebuild[32149:770075] IDETestOperationsObserverDebug: Writing diagnostic log for test session to: /var/folders/9v/vdbbf4j96hxgcxmtpntznytr0000gn/T/com.apple.dt.XCTest/IDETestRunSession-9A7EF764-6391-4C7D-9F34-066A9DFEC5E9/StreamusTests-4F203461-1372-49B7-A806-F130F168079E/Session-StreamusTests-2018-05-12_103414-MfIreE.log 2018-05-12 10:34:30.016 xcodebuild[32149:769805]

            Error Domain=IDETestOperationsObserverErrorDomain Code=14 "Test operation was canceled. If you believe this error represents a bug, please attach the log file at /var/folders/9v/vdbbf4j96hxgcxmtpntznytr0000gn/T/com.apple.dt.XCTest/IDETestRunSession-9A7EF764-6391-4C7D-9F34-066A9DFEC5E9/StreamusUITests-87E838E0-4F8F-4C19-B2AC-C2C0A274E8EC/Session-StreamusUITests-2018-05-12_103414-jhm3wz.log"

            UserInfo={NSLocalizedDescription=Test operation was canceled. If you believe this error represents a bug, please attach the log file at /var/folders/9v/vdbbf4j96hxgcxmtpntznytr0000gn/T/com.apple.dt.XCTest/IDETestRunSession-9A7EF764-6391-4C7D-9F34-066A9DFEC5E9/StreamusUITests-87E838E0-4F8F-4C19-B2AC-C2C0A274E8EC/Session-StreamusUITests-2018-05-12_103414-jhm3wz.log}

            2018-05-12 10:34:30.016 xcodebuild[32149:769805] Error Domain=IDETestOperationsObserverErrorDomain Code=14 "Test operation was canceled. If you believe this error represents a bug, please attach the log file at /var/folders/9v/vdbbf4j96hxgcxmtpntznytr0000gn/T/com.apple.dt.XCTest/IDETestRunSession-9A7EF764-6391-4C7D-9F34-066A9DFEC5E9/StreamusTests-4F203461-1372-49B7-A806-F130F168079E/Session-StreamusTests-2018-05-12_103414-MfIreE.log" UserInfo={NSLocalizedDescription=Test operation was canceled. If you believe this error represents a bug, please attach the log file at /var/folders/9v/vdbbf4j96hxgcxmtpntznytr0000gn/T/com.apple.dt.XCTest/IDETestRunSession-9A7EF764-6391-4C7D-9F34-066A9DFEC5E9/StreamusTests-4F203461-1372-49B7-A806-F130F168079E/Session-StreamusTests-2018-05-12_103414-MfIreE.log}

            Testing failed: Linker command failed with exit code 1 (use -v to see invocation) ** TEST FAILED **

            The following build commands failed:

            Ld /Users/oboujaouane/Library/Developer/Xcode/DerivedData/Streamus-gwtdwpbaxrfgafdtejzjtpxyhhhq/Build/Intermediates.noindex/Streamus.build/Alpha-iphonesimulator/StreamusTests.build/Objects-normal/x86_64/StreamusTests normal x86_64

            Ld /Users/oboujaouane/Library/Developer/Xcode/DerivedData/Streamus-gwtdwpbaxrfgafdtejzjtpxyhhhq/Build/Intermediates.noindex/Streamus.build/Alpha-iphonesimulator/StreamusTests.build/Objects-normal/i386/StreamusTests normal i386

            (2 failures)

            • returnValue=65

            • set +x

            ERROR - Command 'xcodebuild clean build test -workspace Streamus.xcworkspace -scheme Streamus Alpha -configuration Debug -enableCodeCoverage YES -destination platform=iOS Simulator,name=iPhone 6,OS=11.3 -destination-timeout 60' failed with error code: 65

            In advance thank you,

            ...

            ANSWER

            Answered 2018-May-15 at 17:13
            1. It seems that error was due to provisioning profile. When I added my Provisioning Profile and try it again the problem was resolved.


            2. Then I had another problem with MessageKit:“Segmentation fault: 11” It was a CocoaPods Podfile config issue. So I had to switch compilation mode for Debug from "Single File" to "Whole Module” by click on Pods in Xcode project navigator then select MessageKit in targets of pods then Builds settings tab then in searcher tap ‘compilation mode’ and switch “Single File” to “Whole Module” and re-run script run-sonar-swift.sh

            ⚠️ each time you make a pod install / update or something that can change pods you have to switch compilation mode for Debug from "Single File" to "Whole Module” for the pod which give you an error when you launch run-sonar.swift.sh with -v for verbose.


            1. After that it was not yet the end of my problems! In fact I had a last problem which was an error with SwipeCellKit pod:
“No such module SwipeCellKit”.
To resolve this problem follow instructions given here https://stackoverflow.com/a/37732248/6188918

            2. Then I tried again and the rest of the script started (SwiftLint, Tailor & Lizard) and I thought this time it was finally good but an error occurred once again a new error message at the end of the script concerning Lizard which was:

            ERROR: Error during SonarQube Scanner execution

            ERROR: File MyprojectName/Domains/Repositories/Local/cacheManager.swift can't be indexed twice. Please check that inclusion/exclusion patterns produce disjoint sets for main and test files

            ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.

            To resolve this inclusion/exclusion I followed the answer given here: https://stackoverflow.com/a/40150551/6188918 by adding these to line in sonar-project.properties file below sonar.swift.excludedPathsFromCoverage line:

            sonar.test.inclusions=**/*Test*/**

            sonar.exclusions=**/*Test*/**

            I tried again but with parameter -notailor(run script and skip Tailor):

            ./run-sonar-swift.sh -notailor -v

            just to save a little time because tailor take time

            1. And after launch the script... Boom a new error... But it was a known issue:

            Error: Caused by: org.sonar.api.measures.PersistenceMode

            And the issue is explained here https://github.com/Backelite/sonar-swift/issues/118

            So I downloaded this .jar file “backelite-sonar-swift-plugin-0.4-sonar-7-quick-fix.jar” found here https://github.com/Hugal31/sonar-swift/releases/tag/0.4-sonar-7-quick-fix and replace it in plugins of my local SonarQube and try again.

            …and this time after an umpteenth launch I finally saw the light

            Hope this answer will help and if you have a question don’t hesitate. 

Good luck & have fun :)

            PS: You’ll find here some options to run script with parameters:

            ./run-sonar-swift.sh -noswiftlint -v (run script with verbose option and skip SwiftLint)

            ./run-sonar-swift.sh -notailor -v (run script with verbose option and skip Tailor)

            ./run-sonar-swift.sh -nounittests -v (if your project does not have scheme configured to be tested launch with this parameter)

            If you want more info check in run-sonar-swift.sh script and check around lines 125 ## COMMAND LINE OPTIONS

            PS2: I have also opened an issue in sonar-swift GitHub if it can help: https://github.com/Backelite/sonar-swift/issues/138

            Source https://stackoverflow.com/questions/50304493

            QUESTION

            Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar (default-cli) on project jraft: No license for governance
            Asked 2017-Oct-25 at 15:11

            I'm trying to setup SonarQube.com on travis for a maven project, but I see the following exception on build:

            ...

            ANSWER

            Answered 2017-Apr-03 at 14:02

            sonar-governance plugin is commercial plugin. check here

            Source https://stackoverflow.com/questions/43184018

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install sonar-swift

            You can download it from GitHub.
            You can use sonar-swift like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the sonar-swift component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/tal-tech/sonar-swift.git

          • CLI

            gh repo clone tal-tech/sonar-swift

          • sshUrl

            git@github.com:tal-tech/sonar-swift.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Code Analyzer Libraries

            javascript

            by airbnb

            standard

            by standard

            eslint

            by eslint

            tools

            by rome

            mypy

            by python

            Try Top Libraries by tal-tech

            go-zero

            by tal-techGo

            electron-playground

            by tal-techTypeScript

            conan

            by tal-techJava

            cds

            by tal-techGo

            fend

            by tal-techPHP