Skip to content
This repository has been archived by the owner on Aug 24, 2019. It is now read-only.

Commit

Permalink
Develop merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Gilles Grousset committed Dec 5, 2017
2 parents 5883e8f + c933413 commit 446b27c
Show file tree
Hide file tree
Showing 70 changed files with 1,829 additions and 1,332 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ Binary packages are available in the release section.

### Release history

### 0.6.2
- SonarQube 6.5 support
- FauxPas 1.7.2 support (4 new rules added)
- OCLint 0.13 support (1 new rule added)
- Update run-sonar.sh : xcodebuild optimization (see https://github.com/Backelite/sonar-objective-c/pull/26 thanks to [davidy4ng](https://github.com/davidy4ng)).
- Fix for properties with space (see https://github.com/Backelite/sonar-objective-c/pull/29 thanks to [Branlute](https://github.com/Branlute))


### 0.6.1
- Replaced oclint-xcodebuild by xcpretty (see https://github.com/Backelite/sonar-objective-c/pull/25 thanks to [davidy4ng](https://github.com/davidy4ng)).
- Added -nounittests and -usesonarscanner parameters to run-sonar.sh script (see https://github.com/Backelite/sonar-objective-c/pull/23 thanks to [davidy4ng](https://github.com/davidy4ng)).
Expand Down Expand Up @@ -91,9 +99,9 @@ Binary packages are available in the release section.
- [SonarQube](http://docs.codehaus.org/display/SONAR/Setup+and+Upgrade) and [SonarQube Runner](http://docs.codehaus.org/display/SONAR/Installing+and+Configuring+SonarQube+Runner) installed ([HomeBrew](http://brew.sh) installed and ```brew install sonar-runner```)
- [xcpretty](https://github.com/supermarin/xcpretty) (see instructions below)
- [xctool](https://github.com/facebook/xctool) ([HomeBrew](http://brew.sh) installed and ```brew install xctool```). If you are using Xcode 6, make sure to update xctool (```brew upgrade xctool```) to a version > 0.2.2.
- [OCLint](http://oclint-docs.readthedocs.io/en/stable/) installed. Version 0.11.0 recommended.
- [OCLint](http://oclint-docs.readthedocs.io/en/stable/) installed. Version 0.11.0 recommended (0.13.0 since Xcode 9).
- [gcovr](http://gcovr.com) installed for legacy (pre Xcode 7 coverage)
- [slather](https://github.com/SlatherOrg/slather) (```gem install slather```). Version 2.1.0 or above.
- [slather](https://github.com/SlatherOrg/slather) (```gem install slather```). Version 2.1.0 or above (2.4.4 since Xcode 9).
- [lizard](https://github.com/terryyin/lizard) ([PIP](https://pip.pypa.io/en/stable/installing/) installed and ```sudo pip install lizard```)
- [Faux Pas](http://fauxpasapp.com/) command line tools installed (optional)

Expand Down
2 changes: 1 addition & 1 deletion build-and-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fi

# Deploy new verion of plugin in Sonar dir
rm -rf $SONARQUBE_HOME/extensions/plugins/*sonar-objective-c-*
cp target/*.jar $SONARQUBE_HOME/extensions/plugins
cp sonar-objective-c-plugin/target/*.jar $SONARQUBE_HOME/extensions/plugins
rm $SONARQUBE_HOME/extensions/plugins/*sources.jar

# Stop/start Sonar
Expand Down
257 changes: 199 additions & 58 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Sonar Objective-C Plugin
Copyright (C) 2012 OCTO Technology, Backelite
dev@sonar.codehaus.org
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<modules>
<module>sonar-objective-c-plugin</module>
</modules>

<repositories>
<repository>
Expand All @@ -16,17 +40,11 @@
</pluginRepository>
</pluginRepositories>

<parent>
<groupId>org.codehaus.sonar-plugins</groupId>
<artifactId>parent</artifactId>
<version>18</version>
</parent>

<groupId>org.codehaus.sonar-plugin.objectivec</groupId>
<artifactId>backelite-sonar-objective-c-plugin</artifactId>
<version>0.6.1</version>
<groupId>com.backelite.sonarqube</groupId>
<artifactId>backelite-objective-c</artifactId>
<version>0.6.2</version>

<packaging>sonar-plugin</packaging>
<packaging>pom</packaging>

<name>Objective-C Sonar Plugin</name>
<description>Enables analysis of Objective-C projects into SonarQube.</description>
Expand Down Expand Up @@ -60,7 +78,7 @@
<id>zippy1978</id>
<name>Gilles Grousset</name>
<organization>Backelite</organization>
</developer>
</developer>
<developer>
<id>fhelg</id>
<name>François Helg</name>
Expand Down Expand Up @@ -91,65 +109,99 @@

<properties>
<license.owner>OCTO Technology, Backelite</license.owner>
<license.email>contact@backelite.com</license.email>
<license.title>Sonar Objective-C Plugin</license.title>

<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>

<sonar.version>5.0</sonar.version>
<sslr.version>1.20</sslr.version>
<sonarQubeMinVersion>5.6</sonarQubeMinVersion>

<!-- Configuration for sonar-packaging-maven-plugin -->
<sonar.pluginClass>org.sonar.plugins.objectivec.ObjectiveCPlugin</sonar.pluginClass>
<sonar.pluginName>ObjectiveC</sonar.pluginName>
<assertj.version>3.5.2</assertj.version>
<commons-io.version>2.5</commons-io.version>
<commons-lang.version>2.6</commons-lang.version>
<guava.version>17.0</guava.version>
<junit.version>4.10</junit.version>
<logback.version>1.0.13</logback.version>
<mockito.version>1.9.0</mockito.version>
<slf4j.version>1.7.21</slf4j.version>
<sonar.version>5.6</sonar.version>
<sonar-orchestrator.version>3.13</sonar-orchestrator.version>
<sonarlint.version>2.5.0.36</sonarlint.version>
<sslr.version>1.22</sslr.version>
<sslr-squid-bridge.version>2.6.1</sslr-squid-bridge.version>
<gson.version>2.6.2</gson.version>
<ant.version>1.6</ant.version>

</properties>

<dependencies>

<!-- Default dependencies (compile) -->
<dependency>
<groupId>org.codehaus.sonar</groupId>
<artifactId>sonar-plugin-api</artifactId>
<version>${sonar.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.sonar</groupId>
<artifactId>sonar-testing-harness</artifactId>
<version>${sonar.version}</version>
<groupId>org.sonarsource.sslr</groupId>
<artifactId>sslr-core</artifactId>
<version>${sslr.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.sonar</groupId>
<artifactId>sonar-deprecated</artifactId>
<version>${sonar.version}</version>
<groupId>org.sonarsource.sslr-squid-bridge</groupId>
<artifactId>sslr-squid-bridge</artifactId>
<version>${sslr-squid-bridge.version}</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.sonar.sslr</groupId>
<artifactId>sslr-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.sonar.sslr</groupId>
<artifactId>sslr-xpath</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.sonar</groupId>
<artifactId>sonar-plugin-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.picocontainer</groupId>
<artifactId>picocontainer</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.codehaus.sonar.sslr</groupId>
<artifactId>sslr-core</artifactId>
<version>${sslr.version}</version>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>${commons-lang.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.sonar.sslr</groupId>
<artifactId>sslr-xpath</artifactId>
<version>${sslr.version}</version>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons-io.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.sonar.sslr</groupId>
<artifactId>sslr-toolkit</artifactId>
<version>${sslr.version}</version>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.sonar.sslr</groupId>
<artifactId>sslr-testing-harness</artifactId>
<version>${sslr.version}</version>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.sonar.sslr-squid-bridge</groupId>
<artifactId>sslr-squid-bridge</artifactId>
<version>2.5.3</version>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson.version}</version>
</dependency>
<dependency>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
<version>1.6</version>
<version>${ant.version}</version>
</dependency>

<dependency>
Expand All @@ -158,37 +210,126 @@
<version>1.1.1</version>
</dependency>

<!-- Test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.0</version>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.1</version>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easytesting</groupId>
<artifactId>fest-assert</artifactId>
<version>1.4</version>
<groupId>org.sonarsource.sonarqube</groupId>
<artifactId>sonar-testing-harness</artifactId>
<version>${sonar.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>0.9.30</version>
<groupId>org.sonarsource.sslr</groupId>
<artifactId>sslr-testing-harness</artifactId>
<version>${sslr.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.sonar.plugins</groupId>
<artifactId>sonar-surefire-plugin</artifactId>
<version>2.7</version>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-core</artifactId>
<version>${sonarlint.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.sonarsource.orchestrator</groupId>
<artifactId>sonar-orchestrator</artifactId>
<version>${sonar-orchestrator.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- Provided dependencies -->
<dependency>
<groupId>org.sonarsource.sonarqube</groupId>
<artifactId>sonar-plugin-api</artifactId>
<version>${sonar.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
<scope>provided</scope>
</dependency>

</dependencies>


<build>
<plugins>
<plugin>
<groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
<artifactId>sonar-packaging-maven-plugin</artifactId>
<version>1.16</version>
<extensions>true</extensions>
<configuration>
<pluginClass>org.sonar.plugins.objectivec.ObjectiveCPlugin</pluginClass>
<pluginName>ObjectiveC (Backelite)</pluginName>
</configuration>
</plugin>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>3.0</version>
<configuration>
<header>com/mycila/maven/plugin/license/templates/LGPL-3.txt</header>
<properties>
<owner>${license.owner}</owner>
<title>${license.email}</title>
<title>${license.title}</title>
</properties>
<excludes>
<exclude>**/README</exclude>
<exclude>**/*/sh</exclude>
<exclude>src/test/resources/**</exclude>
<exclude>src/test/shell/**</exclude>
<exclude>src/main/resources/**</exclude>
<exclude>*.groovy</exclude>
<exclude>*.sh</exclude>
<exclude>**/*.properties</exclude>
<exclude>**/pom.xml</exclude>
</excludes>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>

</project>
6 changes: 3 additions & 3 deletions sample/sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ sonar.tests=testSrcDir
# If not set : defaults to profdata
#sonar.objectivec.coverageType=profdata

# Destination Simulator to run tests
# Destination Simulator to run surefire
# As string expected in destination argument of xcodebuild command
# Example = sonar.swift.simulator=platform=iOS Simulator,name=iPhone 6,OS=9.2
sonar.objectivec.simulator=platform=iOS Simulator,name=iPhone 6,OS=9.2
Expand All @@ -35,7 +35,7 @@ sonar.objectivec.project=myApplication.xcodeproj

# Scheme to build your application
sonar.objectivec.appScheme=myApplication
# Scheme to build and run your tests (comment following line of you don't have any tests)
# Scheme to build and run your surefire (comment following line of you don't have any surefire)
sonar.objectivec.testScheme=myApplicationTests

##########################
Expand All @@ -62,7 +62,7 @@ sonar.sourceEncoding=UTF-8
# Change it only if you generate the file on your own
# sonar.objectivec.fauxpas.report=sonar-reports/fauxpas.json

# Paths to exclude from coverage report (tests, 3rd party libraries etc.)
# Paths to exclude from coverage report (surefire, 3rd party libraries etc.)
# sonar.objectivec.excludedPathsFromCoverage=pattern1,pattern2
sonar.objectivec.excludedPathsFromCoverage=.*Tests.*,.*Specs.*

Expand Down
Loading

0 comments on commit 446b27c

Please sign in to comment.