From 6cebcca87c5d276627fe22b9c53ddeb4844894b6 Mon Sep 17 00:00:00 2001 From: Tibor Blenessy Date: Thu, 31 May 2018 16:28:28 +0200 Subject: Bootstrap the plugin --- .gitignore | 39 +++++ .travis.yml | 16 ++ README.md | 16 +- pom.xml | 182 +++++++++++++++++++++ sonar-css-plugin/pom.xml | 132 +++++++++++++++ .../main/java/org/sonar/css/plugin/CssPlugin.java | 31 ++++ third-party-licenses.sh | 4 + travis.sh | 16 ++ 8 files changed, 435 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 pom.xml create mode 100644 sonar-css-plugin/pom.xml create mode 100644 sonar-css-plugin/src/main/java/org/sonar/css/plugin/CssPlugin.java create mode 100644 third-party-licenses.sh create mode 100755 travis.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..882cf0f --- /dev/null +++ b/.gitignore @@ -0,0 +1,39 @@ +# ---- Mac OS X +.DS_Store? +Icon? +# Thumbnails +._* +# Files that might appear on external disk +.Spotlight-V100 +.Trashes + +# ---- Windows +# Windows image file caches +Thumbs.db +# Folder config file +Desktop.ini + +# ---- IntelliJ IDEA +*.iws +*.iml +*.ipr +.idea/ +out/ + +# ---- Eclipse +.project +.settings/ +.classpath +bin/ + +# --- SonarQube +.sonar/ +.sonarlint/ +.scannerwork/ + +# --- Gradle +.gradle/ +build/ + +# --- Maven and Orchestrator +target/ diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..ba0ed7c --- /dev/null +++ b/.travis.yml @@ -0,0 +1,16 @@ +language: java +sudo: false +install: true +jdk: +- oraclejdk8 +script: "./travis.sh" +cache: + directories: + - "$HOME/.m2/repository" + - "$HOME/.sonar" + - "$HOME/maven" +notifications: + email: false + webhooks: + - secure: 'rLDjr1N4uet5voRzrLBoeeKvTxPJtf77ZeWSUeMAd0IQKclOW06Gnr7Xnq9ksrydUJaOnd5/Fk1vqoyutC5I0zpGRW0l8FxknWDTJKRnXWNLfq557SfACOYQEZpMTiIEGHSOfbJ4iTrImRNde8Gw1ICvrNTBvH8Kbwg2jb3D0lRJ9krpCYgUYhNX7SPrqNG8SIiPPPMm7MRxjhAsW03WK98pV+PdEfhNDJQmGyZgFSI1nMkHxJiSVKz2mFxShwnAgaTNSxT8wJqskyV2ageuYuaZ8oKNjfOO3/4uj0UbJJYu3Ki6mW9mV1HvAAlhkLl4MblAlbeJ7+PnEWuuA9QAKvTk35fvRW7Byj9tCPguSLyrbA3smbqps2CKwAwu9cSiGJ42+I6YYCQZ4mN84rnB/QySJz2QUlYXXbmi9Zgz2K7bqLM9lgQRlIbI1I9V+5MRdbMaLxptMf62PMcatYZaQ30/Uubydm8Txilm/qWTQI2q1IPlIjEKIrt0tzssBJonh2bnxXR3PSoSAeFDuCe6sQbDmICrI1koM6cnSjSmINff9VEqmYM0S2wIj9O8M/G08M7em6UuiPObC79XQ6THZqxPhUoow8YOuiea8gFN+jpZcSHZQPJczV/bABJvIxfydAQG347Hn4yqYpeBN6YVppbMcoYyT+7ubSMaKIGNDbc=' + on_start: always diff --git a/README.md b/README.md index bbffd12..d49c679 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,16 @@ -# sonar-css +# SonarCSS SonarCSS: CSS Analyzer for SonarQube + + +## Building + +```bash +mvn package +``` + + +## License + +Copyright 2018-2018 SonarSource. + +Licensed under the [GNU Lesser General Public License, Version 3.0](http://www.gnu.org/licenses/lgpl.txt) diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..a5e5901 --- /dev/null +++ b/pom.xml @@ -0,0 +1,182 @@ + + + 4.0.0 + + + org.sonarsource.parent + parent + 45 + + + org.sonarsource.css + css + 1.0.0-SNAPSHOT + pom + + SonarCSS + SonarQube CSS Analyzer + http://redirect.sonarsource.com/plugins/css.html + 2018 + + SonarSource + http://www.sonarsource.com + + + + GNU LGPL 3 + http://www.gnu.org/licenses/lgpl.txt + repo + + + + + + vilchik-elena + Elena Vilchik + SonarSource + + + saberduck + Tibor Blenessy + SonarSource + + + stylianos-agapiou-sonarsource + Stylianos Agapiou + SonarSource + + + + + sonar-css-plugin + + + + scm:git:git@github.com:SonarSource/sonar-css.git + scm:git:git@github.com:SonarSource/sonar-css.git + https://github.com/SonarSource/sonar-css + HEAD + + + GitHub + https://github.com/SonarSource/sonar-css/issues + + + Travis + https://travis-ci.org/SonarSource/sonar-css + + + + sonar-css + SonarCSS + + 1.7.25 + 3.10.0 + 4.12 + 7.2.0.11647 + 6.7 + 3.17.0.1491 + 3.1.0.1376 + 3.0.2 + 2.18.3 + 1.7.0.243 + + ${project.groupId}:sonar-css-plugin:jar + + + + + + + com.google.code.findbugs + jsr305 + ${jsr305.version} + + + org.sonarsource.analyzer-commons + sonar-analyzer-commons + ${sonar-analyzer-commons.version} + + + + + com.google.guava + guava + ${guava.version} + test + + + junit + junit + ${junit.version} + test + + + org.assertj + assertj-core + ${assertj.version} + test + + + org.sonarsource.sonarqube + sonar-testing-harness + ${sonar.version} + test + + + org.sonarsource.orchestrator + sonar-orchestrator + ${sonar-orchestrator.version} + test + + + com.oracle + ojdbc6 + + + + + org.mockito + mockito-core + ${mockito.version} + test + + + org.awaitility + awaitility + 3.1.0 + test + + + + + org.sonarsource.sonarqube + sonar-plugin-api + ${sonar.min.version} + provided + + + org.slf4j + slf4j-api + ${slf4j.version} + provided + + + + + + + + diff --git a/sonar-css-plugin/pom.xml b/sonar-css-plugin/pom.xml new file mode 100644 index 0000000..26e8477 --- /dev/null +++ b/sonar-css-plugin/pom.xml @@ -0,0 +1,132 @@ + + + 4.0.0 + + + org.sonarsource.css + css + 1.0.0-SNAPSHOT + + + sonar-css-plugin + sonar-plugin + + SonarCSS :: Plugin + + Code Analyzer for CSS + http://redirect.sonarsource.com/plugins/css.html + + + scm:git:git@github.com:SonarSource/sonar-css.git + scm:git:git@github.com:SonarSource/sonar-css.git + https://github.com/SonarSource/sonar-css + HEAD + + + + + org.slf4j + slf4j-api + + + org.sonarsource.sonarqube + sonar-plugin-api + + + org.sonarsource.analyzer-commons + sonar-analyzer-commons + + + org.sonarsource.sonarqube + sonar-testing-harness + + + junit + junit + + + org.assertj + assertj-core + + + com.google.code.findbugs + jsr305 + + + org.mockito + mockito-core + + + org.awaitility + awaitility + + + + + + + org.sonarsource.sonar-packaging-maven-plugin + sonar-packaging-maven-plugin + + + SonarCSS + org.sonar.css.plugin.CssPlugin + true + false + ${sonar.min.version} + + + + + maven-shade-plugin + + + package + + shade + + + false + true + false + + + cglib:cglib-nodep + + ** + + + + + + + + + + maven-enforcer-plugin + + + enforce-plugin-size + + enforce + + verify + + + + 10000 + 50000 + + ${project.build.directory}/${project.build.finalName}.jar + + + + + + + + + + + + diff --git a/sonar-css-plugin/src/main/java/org/sonar/css/plugin/CssPlugin.java b/sonar-css-plugin/src/main/java/org/sonar/css/plugin/CssPlugin.java new file mode 100644 index 0000000..8d2a12b --- /dev/null +++ b/sonar-css-plugin/src/main/java/org/sonar/css/plugin/CssPlugin.java @@ -0,0 +1,31 @@ +/* + * SonarCSS + * Copyright (C) 2018-2018 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * 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, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonar.css.plugin; + +import org.sonar.api.Plugin; + +public class CssPlugin implements Plugin { + + + @Override + public void define(Context context) { + + } +} diff --git a/third-party-licenses.sh b/third-party-licenses.sh new file mode 100644 index 0000000..6728f1d --- /dev/null +++ b/third-party-licenses.sh @@ -0,0 +1,4 @@ +#!/bin/sh +mvn org.codehaus.mojo:license-maven-plugin:aggregate-add-third-party -Dlicense.includedScopes=compile + +cat target/generated-sources/license/THIRD-PARTY.txt diff --git a/travis.sh b/travis.sh new file mode 100755 index 0000000..e6c9913 --- /dev/null +++ b/travis.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -euo pipefail + +function configureTravis { + mkdir -p ~/.local + curl -sSL https://github.com/SonarSource/travis-utils/tarball/v48 | tar zx --strip-components 1 -C ~/.local + source ~/.local/bin/install +} +configureTravis +. installJDK8 +. ~/.local/bin/installMaven35 + +export DEPLOY_PULL_REQUEST=true + +regular_mvn_build_deploy_analyze -- cgit v1.2.3