Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add VB.NET project sample

  • Loading branch information...
commit 1127805a94aa7fdef1ad280d74f9199921036362 1 parent 9e5ad5d
David RACODON authored
View
20 projects/languages/vbnet/vbnet-sonar-runner/MySolution.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VBLib", "VBLib\VBLib.vbproj", "{D37F0B9F-CEAE-4EA8-AF19-B6AD38D199D4}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {BAD9AC5B-A602-4865-B46B-726B4D759F0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BAD9AC5B-A602-4865-B46B-726B4D759F0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BAD9AC5B-A602-4865-B46B-726B4D759F0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BAD9AC5B-A602-4865-B46B-726B4D759F0B}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
View
13 projects/languages/vbnet/vbnet-sonar-runner/README.md
@@ -0,0 +1,13 @@
+This example demonstrates how to analyze a simple VB.NET project with the Sonar Runner.
+
+Prerequisites
+=============
+* [Sonar](http://www.sonarsource.org/downloads/) 3.0 or higher
+* [Sonar Runner](http://docs.codehaus.org/display/SONAR/Installing+and+Configuring+Sonar+Runner) 2.0 or higher
+* [Sonar VB.NET Plugin](http://www.sonarsource.com/products/plugins/languages/vbnet/) 1.0 or higher
+
+Usage
+=====
+* Analyze the project with Sonar using the Sonar Runner:
+
+ sonar-runner
View
28 projects/languages/vbnet/vbnet-sonar-runner/VBLib/VBLib.vbproj
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>
+ </ProductVersion>
+ <SchemaVersion>
+ </SchemaVersion>
+ <ProjectGuid>{D37F0B9F-CEAE-4EA8-AF19-B6AD38D199D4}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <RootNamespace>VBLib</RootNamespace>
+ <AssemblyName>VBLib</AssemblyName>
+ <FileAlignment>512</FileAlignment>
+ <MyType>Windows</MyType>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ </PropertyGroup>
+
+ <!-- ====================================================== -->
+ <!-- Part to edit to add VB.NET files that must be analysed -->
+ <ItemGroup>
+ <Compile Include="bar\Module1.vb" />
+ <Compile Include="foo\Module1.vb" />
+ <Compile Include="foo\Module1_copy.vb" />
+ </ItemGroup>
+ <!-- ====================================================== -->
+
+</Project>
View
19 projects/languages/vbnet/vbnet-sonar-runner/VBLib/bar/Module1.vb
@@ -0,0 +1,19 @@
+Imports System, System.IO
+
+REM This is a comment!
+
+Friend Module Module1
+ Public Class MyClazz
+ Public ReadOnly Property MyProperty As Integer
+ Get
+ Return 42
+ End Get
+ End Property
+ End Class
+
+ Sub Main()
+ Dim myClazz As New MyClazz
+ Console.WriteLine("Hello, world! " & myClazz.MyProperty)
+ Console.ReadLine()
+ End Sub
+End Module
View
19 projects/languages/vbnet/vbnet-sonar-runner/VBLib/foo/Module1.vb
@@ -0,0 +1,19 @@
+Imports System, System.IO
+
+REM This is a comment!
+
+Friend Module Module1
+ Public Class MyClazz
+ Public ReadOnly Property MyProperty As Integer
+ Get
+ Return 42
+ End Get
+ End Property
+ End Class
+
+ Sub Main()
+ Dim myClazz As New MyClazz
+ Console.WriteLine("Hello, world! " & myClazz.MyProperty)
+ Console.ReadLine()
+ End Sub
+End Module
View
19 projects/languages/vbnet/vbnet-sonar-runner/VBLib/foo/Module1_copy.vb
@@ -0,0 +1,19 @@
+Imports System, System.IO
+
+REM This is a comment!
+
+Friend Module Module1
+ Public Class MyClazz
+ Public ReadOnly Property MyProperty As Integer
+ Get
+ Return 42
+ End Get
+ End Property
+ End Class
+
+ Sub Main()
+ Dim myClazz As New MyClazz
+ Console.WriteLine("Hello, world! " & myClazz.MyProperty)
+ Console.ReadLine()
+ End Sub
+End Module
View
13 projects/languages/vbnet/vbnet-sonar-runner/sonar-project.properties
@@ -0,0 +1,13 @@
+# Required metadata
+sonar.projectKey=org.codehaus.sonar:vbnet-sonar-runner
+sonar.projectName=VB.NET project analyzed with the Sonar Runner
+sonar.projectVersion=1.0
+
+# Path to the source directories (required)
+sonar.sources=.
+
+# Language
+sonar.language=vbnet
+
+# Encoding of sources files
+sonar.sourceEncoding=UTF-8
Please sign in to comment.
Something went wrong with that request. Please try again.