kandi background
Explore Kits

sonar-php | : elephant : SonarPHP : PHP static analyzer for SonarQube | Code Analyzer library

 by   SonarSource Java Version: 3.23.1.8766 License: LGPL-3.0

 by   SonarSource Java Version: 3.23.1.8766 License: LGPL-3.0

Download this library from

kandi X-RAY | sonar-php Summary

sonar-php is a Java library typically used in Code Quality, Code Analyzer applications. sonar-php has no bugs, it has no vulnerabilities, it has build file available, it has a Weak Copyleft License and it has low support. You can download it from GitHub, Maven.
This SonarSource project is a static code analyser for PHP language used as an extension for the SonarQube platform. It will allow you to produce stable and easily supported code by helping you find and correct bugs, vulnerabilities and smells in your code.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • sonar-php has a low active ecosystem.
  • It has 320 star(s) with 92 fork(s). There are 41 watchers for this library.
  • There were 1 major release(s) in the last 6 months.
  • sonar-php has no issues reported. There are no pull requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of sonar-php is 3.23.1.8766
sonar-php Support
Best in #Code Analyzer
Average in #Code Analyzer
sonar-php Support
Best in #Code Analyzer
Average in #Code Analyzer

quality kandi Quality

  • sonar-php has 0 bugs and 0 code smells.
sonar-php Quality
Best in #Code Analyzer
Average in #Code Analyzer
sonar-php Quality
Best in #Code Analyzer
Average in #Code Analyzer

securitySecurity

  • sonar-php has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • sonar-php code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
sonar-php Security
Best in #Code Analyzer
Average in #Code Analyzer
sonar-php Security
Best in #Code Analyzer
Average in #Code Analyzer

license License

  • sonar-php is licensed under the LGPL-3.0 License. This license is Weak Copyleft.
  • Weak Copyleft licenses have some restrictions, but you can use them in commercial projects.
sonar-php License
Best in #Code Analyzer
Average in #Code Analyzer
sonar-php License
Best in #Code Analyzer
Average in #Code Analyzer

buildReuse

  • sonar-php releases are available to install and integrate.
  • Deployable package is available in Maven.
  • Build file is available. You can build the component from source.
  • Installation instructions, examples and code snippets are available.
  • It has 81661 lines of code, 7689 functions and 2018 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
sonar-php Reuse
Best in #Code Analyzer
Average in #Code Analyzer
sonar-php Reuse
Best in #Code Analyzer
Average in #Code Analyzer
Top functions reviewed by kandi - BETA

kandi has reviewed sonar-php and discovered the below as its top functions. This is intended to give you an instant insight into sonar-php implemented functionality, and help decide if they suit your requirements.

  • List of checks .
  • Creates a map of assertions .
  • Saves issues .
  • Checks that the given function tree is valid .
  • Returns a list of statements in the given tree .
  • Determine the replacement assertion .
  • Check file size .
  • Process test suite .
  • Returns true if the method is overridden .
  • Recursively builds the control flow graph .

sonar-php Key Features

200+ rules

Supports up to PHP 8

Metrics (complexity, number of lines etc.)

Import of unit test and coverage results

Support of custom rules

Build the Project and Run Unit Tests

copy iconCopydownload iconDownload
mvn clean install

Integration Tests

copy iconCopydownload iconDownload
# version of SonarQube server
sonar.runtimeVersion=8.9

Change kubernetes stroge class mounted value from another pod

copy iconCopydownload iconDownload
FROM alpine:3.11

RUN apk --no-cache add --repository http://dl-cdn.alpinelinux.org/alpine/edge/community wget ca-certificates

WORKDIR /opt/sonarqube/plugins

RUN wget https://github.com/gabrie-allaigre/sonar-gitlab-plugin/releases/download/4.1.0-SNAPSHOT/sonar-gitlab-plugin-4.1.0-SNAPSHOT.jar &&\
    wget https://binaries.sonarsource.com/Distribution/sonar-java-plugin/sonar-java-plugin-6.3.0.21585.jar &&\
    wget https://github.com/SonarSource/sonar-php/releases/download/3.4.0.5461/sonar-php-plugin-3.4.0.5461.jar
apiVersion: v1
kind: Pod
metadata:
  creationTimestamp: null
  labels:
    run: sonarqube
  name: sonarqube
spec:
  containers:
  - image: harik8/demo:latest
    name: sonarqube
    resources: {}
    lifecycle:
      postStart:
        exec:
          command: ["/bin/sh","-c", "mv /opt/sonarqube/plugins/*.jar /opt/sonarqube/extensions/plugins"]
    command: ["cat"]
    tty: true
    volumeMounts:
    - name: data-sonar-extensions
      mountPath: /opt/sonarqube/extensions/plugins
  dnsPolicy: ClusterFirst
  restartPolicy: Never
  volumes:
  - name: data-sonar-extensions
    emptyDir: {}
status: {}
$ kubectl exec -it sonarqube sh
/opt/sonarqube/extensions/plugins # pwd
/opt/sonarqube/extensions/plugins
/opt/sonarqube/extensions/plugins # ls -la
total 33320
drwxrwxrwx    2 root     root          4096 May 31 20:59 .
drwxr-xr-x    3 root     root          4096 May 31 20:59 ..
-rw-r--r--    1 root     root      10280677 Mar 28  2019 sonar-gitlab-plugin-4.1.0-SNAPSHOT.jar
-rw-r--r--    1 root     root      18712457 Apr  8 13:26 sonar-java-plugin-6.3.0.21585.jar
-rw-r--r--    1 root     root       5114341 May 11 15:24 sonar-php-plugin-3.4.0.5461.jar
/opt/sonarqube/extensions/plugins
-----------------------
FROM alpine:3.11

RUN apk --no-cache add --repository http://dl-cdn.alpinelinux.org/alpine/edge/community wget ca-certificates

WORKDIR /opt/sonarqube/plugins

RUN wget https://github.com/gabrie-allaigre/sonar-gitlab-plugin/releases/download/4.1.0-SNAPSHOT/sonar-gitlab-plugin-4.1.0-SNAPSHOT.jar &&\
    wget https://binaries.sonarsource.com/Distribution/sonar-java-plugin/sonar-java-plugin-6.3.0.21585.jar &&\
    wget https://github.com/SonarSource/sonar-php/releases/download/3.4.0.5461/sonar-php-plugin-3.4.0.5461.jar
apiVersion: v1
kind: Pod
metadata:
  creationTimestamp: null
  labels:
    run: sonarqube
  name: sonarqube
spec:
  containers:
  - image: harik8/demo:latest
    name: sonarqube
    resources: {}
    lifecycle:
      postStart:
        exec:
          command: ["/bin/sh","-c", "mv /opt/sonarqube/plugins/*.jar /opt/sonarqube/extensions/plugins"]
    command: ["cat"]
    tty: true
    volumeMounts:
    - name: data-sonar-extensions
      mountPath: /opt/sonarqube/extensions/plugins
  dnsPolicy: ClusterFirst
  restartPolicy: Never
  volumes:
  - name: data-sonar-extensions
    emptyDir: {}
status: {}
$ kubectl exec -it sonarqube sh
/opt/sonarqube/extensions/plugins # pwd
/opt/sonarqube/extensions/plugins
/opt/sonarqube/extensions/plugins # ls -la
total 33320
drwxrwxrwx    2 root     root          4096 May 31 20:59 .
drwxr-xr-x    3 root     root          4096 May 31 20:59 ..
-rw-r--r--    1 root     root      10280677 Mar 28  2019 sonar-gitlab-plugin-4.1.0-SNAPSHOT.jar
-rw-r--r--    1 root     root      18712457 Apr  8 13:26 sonar-java-plugin-6.3.0.21585.jar
-rw-r--r--    1 root     root       5114341 May 11 15:24 sonar-php-plugin-3.4.0.5461.jar
/opt/sonarqube/extensions/plugins
-----------------------
FROM alpine:3.11

RUN apk --no-cache add --repository http://dl-cdn.alpinelinux.org/alpine/edge/community wget ca-certificates

WORKDIR /opt/sonarqube/plugins

RUN wget https://github.com/gabrie-allaigre/sonar-gitlab-plugin/releases/download/4.1.0-SNAPSHOT/sonar-gitlab-plugin-4.1.0-SNAPSHOT.jar &&\
    wget https://binaries.sonarsource.com/Distribution/sonar-java-plugin/sonar-java-plugin-6.3.0.21585.jar &&\
    wget https://github.com/SonarSource/sonar-php/releases/download/3.4.0.5461/sonar-php-plugin-3.4.0.5461.jar
apiVersion: v1
kind: Pod
metadata:
  creationTimestamp: null
  labels:
    run: sonarqube
  name: sonarqube
spec:
  containers:
  - image: harik8/demo:latest
    name: sonarqube
    resources: {}
    lifecycle:
      postStart:
        exec:
          command: ["/bin/sh","-c", "mv /opt/sonarqube/plugins/*.jar /opt/sonarqube/extensions/plugins"]
    command: ["cat"]
    tty: true
    volumeMounts:
    - name: data-sonar-extensions
      mountPath: /opt/sonarqube/extensions/plugins
  dnsPolicy: ClusterFirst
  restartPolicy: Never
  volumes:
  - name: data-sonar-extensions
    emptyDir: {}
status: {}
$ kubectl exec -it sonarqube sh
/opt/sonarqube/extensions/plugins # pwd
/opt/sonarqube/extensions/plugins
/opt/sonarqube/extensions/plugins # ls -la
total 33320
drwxrwxrwx    2 root     root          4096 May 31 20:59 .
drwxr-xr-x    3 root     root          4096 May 31 20:59 ..
-rw-r--r--    1 root     root      10280677 Mar 28  2019 sonar-gitlab-plugin-4.1.0-SNAPSHOT.jar
-rw-r--r--    1 root     root      18712457 Apr  8 13:26 sonar-java-plugin-6.3.0.21585.jar
-rw-r--r--    1 root     root       5114341 May 11 15:24 sonar-php-plugin-3.4.0.5461.jar
/opt/sonarqube/extensions/plugins

Community Discussions

Trending Discussions on sonar-php
  • Issue in analyzing files using sonar lint in eclipse
  • Change kubernetes stroge class mounted value from another pod
Trending Discussions on sonar-php

QUESTION

Issue in analyzing files using sonar lint in eclipse

Asked 2022-Jan-27 at 13:36

I installed sonar lint (version 7.2) in STS (version - 4.13.0), installation was completely fine. But while analyzing the files using sonar lint, I am getting 0 issues with following logs in console -

Starting SonarLint for Eclipse 7.2.0.42510
Started security hotspot handler on port 64120
SonarLint analysis of project master-data-service (250 files processed)...
Starting standalone SonarLint engine 7.2.0.42510...
Unable to load plugin bundleentry://602.fwk900588128/plugins/sonar-python-plugin-3.9.0.9230.jar
Unable to load plugin bundleentry://602.fwk900588128/plugins/sonar-python-plugin-3.9.0.9230.jar
java.nio.file.FileSystemNotFoundException
    at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getFileSystem(ZipFileSystemProvider.java:156)
    at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getPath(ZipFileSystemProvider.java:142)
    at java.base/java.nio.file.Path.of(Path.java:208)
    at java.base/java.nio.file.Paths.get(Paths.java:98)
    at org.sonarlint.eclipse.core.internal.engine.StandaloneEngineFacade.toPath(StandaloneEngineFacade.java:96)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
    at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
    at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
    at org.sonarlint.eclipse.core.internal.engine.StandaloneEngineFacade.getOrCreateEngine(StandaloneEngineFacade.java:64)
    at org.sonarlint.eclipse.core.internal.engine.StandaloneEngineFacade.withEngine(StandaloneEngineFacade.java:104)
    at org.sonarlint.eclipse.core.internal.engine.StandaloneEngineFacade.runAnalysis(StandaloneEngineFacade.java:115)
    at org.sonarlint.eclipse.core.internal.jobs.AnalyzeStandaloneProjectJob.runAnalysis(AnalyzeStandaloneProjectJob.java:62)
    at org.sonarlint.eclipse.core.internal.jobs.AnalyzeStandaloneProjectJob.runAnalysis(AnalyzeStandaloneProjectJob.java:1)
    at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.run(AbstractAnalyzeProjectJob.java:393)
    at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.runAnalysisAndUpdateMarkers(AbstractAnalyzeProjectJob.java:201)
    at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.doRun(AbstractAnalyzeProjectJob.java:157)
    at org.sonarlint.eclipse.core.internal.jobs.AbstractSonarProjectJob.run(AbstractSonarProjectJob.java:45)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Unable to load plugin bundleentry://602.fwk900588128/plugins/sonar-php-plugin-3.22.1.8626.jar
Unable to load plugin bundleentry://602.fwk900588128/plugins/sonar-php-plugin-3.22.1.8626.jar
java.nio.file.FileSystemNotFoundException
    at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getFileSystem(ZipFileSystemProvider.java:156)
    at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getPath(ZipFileSystemProvider.java:142)
    at java.base/java.nio.file.Path.of(Path.java:208)
    at java.base/java.nio.file.Paths.get(Paths.java:98)
    at org.sonarlint.eclipse.core.internal.engine.StandaloneEngineFacade.toPath(StandaloneEngineFacade.java:96)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
    at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
    at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
    at org.sonarlint.eclipse.core.internal.engine.StandaloneEngineFacade.getOrCreateEngine(StandaloneEngineFacade.java:64)
    at org.sonarlint.eclipse.core.internal.engine.StandaloneEngineFacade.withEngine(StandaloneEngineFacade.java:104)
    at org.sonarlint.eclipse.core.internal.engine.StandaloneEngineFacade.runAnalysis(StandaloneEngineFacade.java:115)
    at org.sonarlint.eclipse.core.internal.jobs.AnalyzeStandaloneProjectJob.runAnalysis(AnalyzeStandaloneProjectJob.java:62)
    at org.sonarlint.eclipse.core.internal.jobs.AnalyzeStandaloneProjectJob.runAnalysis(AnalyzeStandaloneProjectJob.java:1)
    at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.run(AbstractAnalyzeProjectJob.java:393)
    at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.runAnalysisAndUpdateMarkers(AbstractAnalyzeProjectJob.java:201)
    at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.doRun(AbstractAnalyzeProjectJob.java:157)
    at org.sonarlint.eclipse.core.internal.jobs.AbstractSonarProjectJob.run(AbstractSonarProjectJob.java:45)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Please help here. Thanks in advance.

ANSWER

Answered 2022-Jan-27 at 13:36

Same problem here upgrading from 7.1 to 7.2.0. Rolling back to 7.1 resolved the issues at moment.

Uncheck "show only latest version..." to install previous version. screenshot

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

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

Vulnerabilities

No vulnerabilities reported

Install sonar-php

To build the plugin and run its unit tests, execute this command from the project's root directory (you will need Maven):.

Support

Project homepageDocumentationIssue trackingAvailable rulesSonarSource Community ForumDemo project analysis

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Explore Related Topics

Share this Page

share link
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.