kandi background
Explore Kits

sonar-xml | This SonarSource project is a code analyzer for XML files

 by   SonarSource Java Version: 2.5.0.3376 License: Non-SPDX

 by   SonarSource Java Version: 2.5.0.3376 License: Non-SPDX

Download this library from

kandi X-RAY | sonar-xml Summary

sonar-xml is a Java library typically used in Utilities applications. sonar-xml has build file available and it has low support. However sonar-xml has 51 bugs, it has 35 vulnerabilities and it has a Non-SPDX License. You can download it from GitHub, Maven.
Code Quality and Security for XML [![Build Status](https://api.cirrus-ci.com/github/SonarSource/sonar-xml.svg?branch=master)](https://cirrus-ci.com/github/SonarSource/sonar-xml) [![Quality Gate Status](https://next.sonarqube.com/sonarqube/api/project_badges/measure?project=org.sonarsource.xml%3Axml&metric=alert_status)](https://next.sonarqube.com/sonarqube/dashboard?id=org.sonarsource.xml%3Axml) [![Coverage](https://next.sonarqube.com/sonarqube/api/project_badges/measure?project=org.sonarsource.xml%3Axml&metric=coverage)](https://next.sonarqube.com/sonarqube/dashboard?id=org.sonarsource.xml%3Axml).
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • sonar-xml has a low active ecosystem.
  • It has 26 star(s) with 33 fork(s). There are 25 watchers for this library.
  • There were 1 major release(s) in the last 12 months.
  • sonar-xml has no issues reported. There are 2 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of sonar-xml is 2.5.0.3376
sonar-xml Support
Best in #Java
Average in #Java
sonar-xml Support
Best in #Java
Average in #Java

quality kandi Quality

  • sonar-xml has 51 bugs (2 blocker, 31 critical, 18 major, 0 minor) and 220 code smells.
sonar-xml Quality
Best in #Java
Average in #Java
sonar-xml Quality
Best in #Java
Average in #Java

securitySecurity

  • sonar-xml has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • sonar-xml code analysis shows 35 unresolved vulnerabilities (9 blocker, 8 critical, 16 major, 2 minor).
  • There are 159 security hotspots that need review.
sonar-xml Security
Best in #Java
Average in #Java
sonar-xml Security
Best in #Java
Average in #Java

license License

  • sonar-xml 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.
sonar-xml License
Best in #Java
Average in #Java
sonar-xml License
Best in #Java
Average in #Java

buildReuse

  • sonar-xml 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 are not available. Examples and code snippets are available.
  • sonar-xml saves you 13731 person hours of effort in developing the same functionality from scratch.
  • It has 50969 lines of code, 395 functions and 1377 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
sonar-xml Reuse
Best in #Java
Average in #Java
sonar-xml Reuse
Best in #Java
Average in #Java
Top functions reviewed by kandi - BETA

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

  • List the check classes .
    • Checks for errors in the project .
      • Highlights an element node .
        • Validates the indentation of a node .
          • Perform the scan .
            • Checks if the current line contains the line line number .
              • Visits a node .
                • Checks that a dependency is present in the scope .
                  • Checks the existence of a node .
                    • Returns the siblings of the given comment .

                      Get all kandi verified functions for this library.

                      Get all kandi verified functions for this library.

                      sonar-xml Key Features

                      default

                      copy iconCopydownload iconDownload
                      Copyright 2010-2021 SonarSource.
                      
                      Licensed under the [GNU Lesser General Public License, Version 3.0](http://www.gnu.org/licenses/lgpl.txt)

                      docker container directory gets overwritten by persistent volume (claim)

                      copy iconCopydownload iconDownload
                            volumeMounts:
                            - mountPath: "/opt/sonarqube/data"
                              name: sonarqube-data
                              subPath: data
                            - mountPath: "/opt/sonarqube/extensions"
                              name: sonarqube-extensions
                              subPath: extensions 
                      
                              volumeMounts:
                                  - mountPath: /var/lib/postgresql/data
                                    name: sonarqubedb
                                    subPath: data
                      
                            volumeMounts:
                            - mountPath: "/opt/sonarqube/data"
                              name: sonarqube-data
                              subPath: data
                            - mountPath: "/opt/sonarqube/extensions"
                              name: sonarqube-extensions
                              subPath: extensions 
                      
                              volumeMounts:
                                  - mountPath: /var/lib/postgresql/data
                                    name: sonarqubedb
                                    subPath: data
                      

                      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

                      copy iconCopydownload iconDownload
                      .....
                      [INFO] Download sonar-governance-plugin-2.0.0.1789.jar
                      ......
                      
                      mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar
                      
                      node{
                         stage 'Code Quality'
                         sh "mvn sonar:sonar -Dsonar.host.url=http://<hostname>:9000"
                      }
                      

                      SonarQube plug-in not scanning C# files during TFS Build

                      copy iconCopydownload iconDownload
                      SonarQube.Scanner.MSBuild.exe begin /k:"org.sonarqube:sonarqube-scanner-msbuild" /n:"Project Name" /v:"1.0"
                      MSBuild.exe /t:Rebuild
                      SonarQube.Scanner.MSBuild.exe end
                      

                      Community Discussions

                      Trending Discussions on sonar-xml
                      • docker container directory gets overwritten by persistent volume (claim)
                      • Unable to Run Sonar Scan
                      • Sonarqube unable to load component
                      • 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
                      • SonarQube plug-in not scanning C# files during TFS Build
                      Trending Discussions on sonar-xml

                      QUESTION

                      docker container directory gets overwritten by persistent volume (claim)

                      Asked 2019-Apr-08 at 14:10

                      I'm deploying locally in docker-for-desktop. So that I can migrate to a kubernetes cluster in the future.

                      However I face a problem. Directories in the docker container/pod are over written, when persistent volumes are used.

                      I'm pulling the latest SonarQube image. A lot of plugins and quality profiles are pre-installed. Which is exactly what I want. If I don't use persistent volumes. Everything works as expected. When I use a pv all the data in the image is overwritten. I use helm.

                      In my deployment.yaml I use this:

                       {{- if (eq .Values.volumes.usePersistent "true") }}
                                volumeMounts:
                                - mountPath: "/opt/sonarqube/data"
                                  name: sonarqube-data
                                - mountPath: "/opt/sonarqube/extensions"
                                  name: sonarqube-extensions
                            volumes:
                            - name: sonarqube-data
                              persistentVolumeClaim:
                                claimName: sonarqube-data-pv-claim
                            - name: sonarqube-extensions
                              persistentVolumeClaim:
                                claimName: sonarqube-extensions-pv-claim
                      {{- end }}
                      

                      In my storage.yaml I use this:

                      {{- if (eq .Values.volumes.usePersistent "true") }}
                      kind: PersistentVolume
                      apiVersion: v1
                      metadata:
                        name: sonarqube-data-pv-volume
                        labels:
                          type: local
                          app: sonarqube-data
                      spec:
                        storageClassName: manual
                        capacity:
                          storage: 2Gi
                        accessModes:
                          - ReadWriteMany
                        hostPath:
                          path: "/tmp/toolbox/sonarqube/data"
                      ---
                      kind: PersistentVolume
                      apiVersion: v1
                      metadata:
                        name: sonarqube-extensions-pv-volume
                        labels:
                          type: local
                          app: sonarqube-extensions
                      spec:
                        storageClassName: manual
                        capacity:
                          storage: 2Gi
                        accessModes:
                          - ReadWriteMany
                        hostPath:
                          path: "/tmp/toolbox/sonarqube/extensions"
                      ---
                      apiVersion: v1
                      kind: PersistentVolumeClaim
                      metadata:
                        name: sonarqube-data-pv-claim
                        labels:
                          app: sonarqube-data
                      spec:
                        storageClassName: manual
                        accessModes:
                          - ReadWriteMany
                        resources:
                          requests:
                            storage: 2Gi
                      ---
                      apiVersion: v1
                      kind: PersistentVolumeClaim
                      metadata:
                        name: sonarqube-extensions-pv-claim
                        labels:
                          app: sonarqube-extensions
                      spec:
                        storageClassName: manual
                        accessModes:
                          - ReadWriteMany
                        resources:
                          requests:
                            storage: 2Gi
                      {{- end }}
                      

                      The pvc are bounded and working. All the data that I need are in de 'data' and 'extensions' folder in the container, coming from the image. For example in the extensions folder:

                      sonarqube@sonarqube-deployment-6b8bdfb766-klnwh:/opt/sonarqube/extensions/plugins$ ls
                      README.txt               sonar-java-plugin-5.11.0.17289.jar      sonar-scala-plugin-1.5.0.315.jar
                      sonar-csharp-plugin-7.11.0.8083.jar  sonar-javascript-plugin-5.1.1.7506.jar  sonar-scm-git-plugin-1.8.0.1574.jar
                      sonar-css-plugin-1.0.3.724.jar       sonar-kotlin-plugin-1.5.0.315.jar       sonar-scm-svn-plugin-1.9.0.1295.jar
                      sonar-flex-plugin-2.4.0.1222.jar     sonar-ldap-plugin-2.2.0.608.jar         sonar-typescript-plugin-1.9.0.3766.jar
                      sonar-go-plugin-1.1.0.1612.jar       sonar-php-plugin-3.0.0.4537.jar         sonar-vbnet-plugin-7.11.0.8083.jar
                      sonar-html-plugin-3.1.0.1615.jar     sonar-python-plugin-1.13.0.2922.jar     sonar-xml-plugin-2.0.1.2020.jar
                      sonar-jacoco-plugin-1.0.1.143.jar    sonar-ruby-plugin-1.5.0.315.jar
                      

                      I have made the following directories in my /tmp folder:

                      - data
                      - extensions
                         - downloads
                         - jdbc-driver
                         - plugins
                      

                      I know I must specify the same folders in my pv as in my container. I checked, all the folders are there in my /tmp folder. But are empty. They plugins folder is empty, all the plugin.jar files are gone.

                      BTW I did not include this in the initial post, but I'm using a PostgresDB also with pvc. pg-deploy.yaml:

                      {{- if (eq .Values.volumes.usePersistent "true") }} volumeMounts: - mountPath: /var/lib/postgresql/data name: sonarqubedb volumes: - name: sonarqubedb persistentVolumeClaim: claimName: postgres-sq-pv-claim {{- end }}

                      storage.yaml:

                      {{- if (eq .Values.volumes.usePersistent "true") }}
                      kind: PersistentVolume
                      apiVersion: v1
                      metadata:
                        name: postgres-sq-pv-volume
                        labels:
                          type: local
                          app: postgres-sonarqube
                      spec:
                        storageClassName: manual
                        capacity:
                          storage: 2Gi
                        accessModes:
                          - ReadWriteMany
                        hostPath:
                          path: "/tmp/toolbox/postgres-sonarqube"
                      ---
                      kind: PersistentVolumeClaim
                      apiVersion: v1
                      metadata:
                        name: postgres-sq-pv-claim
                        labels:
                          app: postgres-sonarqube
                      spec:
                        storageClassName: manual
                        accessModes:
                          - ReadWriteMany
                        resources:
                          requests:
                            storage: 2Gi
                      {{- end }}
                      

                      ANSWER

                      Answered 2019-Apr-08 at 14:10

                      to avoid overwriting data to the the existing files/content inside the same Directory, you can use subpath to mount the data and extensions directory (In the example below) in the existing Container file system. for further detail sub-path

                            volumeMounts:
                            - mountPath: "/opt/sonarqube/data"
                              name: sonarqube-data
                              subPath: data
                            - mountPath: "/opt/sonarqube/extensions"
                              name: sonarqube-extensions
                              subPath: extensions 
                      

                      This works. However it didn't work until I did the same for the database that sonarqube is using:

                              volumeMounts:
                                  - mountPath: /var/lib/postgresql/data
                                    name: sonarqubedb
                                    subPath: data
                      

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

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

                      Vulnerabilities

                      No vulnerabilities reported

                      Install sonar-xml

                      You can download it from GitHub, Maven.
                      You can use sonar-xml 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-xml 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 .

                      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
                      Explore Kits

                      Save this library and start creating your kit

                      Explore Related Topics

                      Share this Page

                      share link
                      Consider Popular Java Libraries
                      Try Top Libraries by SonarSource
                      Compare Java Libraries with Highest Support
                      Compare Java Libraries with Highest Quality
                      Compare Java Libraries with Highest Security
                      Compare Java Libraries with Permissive License
                      Compare Java Libraries with Highest Reuse
                      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
                      Explore Kits

                      Save this library and start creating your kit

                      • © 2022 Open Weaver Inc.