Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Several enhancements and grammer fixes #1

Merged
merged 28 commits into from
Mar 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7005557
Changed version to 1.0.6
joachimmarder Feb 10, 2021
5ce3727
Grammar-fixes:
joachimmarder Feb 10, 2021
9650636
Added support for syntax:
joachimmarder Feb 10, 2021
35bfa4a
TypeAnalyzer.canAnalyze() now handles record helper like classes and …
joachimmarder Feb 10, 2021
0c8ed2a
TypePropertyAnalyzer.doAnalyze(): Extend exception with information o…
joachimmarder Feb 10, 2021
398a8a5
Fixed errors due to invalid javadoc
joachimmarder Feb 10, 2021
f88c1d3
Fixed errors due to invalid javadoc
joachimmarder Feb 10, 2021
db4e3a3
Fixed errors due to invalid javadoc
joachimmarder Feb 10, 2021
f9f14b2
Field names now also accept "f" at the beginning (fix).
joachimmarder Feb 10, 2021
4bc3098
Activated unit test parseInterfaceMethodResolutionClause() which mena…
joachimmarder Feb 10, 2021
7bc572e
Latest generated grammer for V1.0.6
joachimmarder Feb 10, 2021
888e7ac
Update README.md
joachimmarder Feb 10, 2021
ed786b2
Create maven.yml
joachimmarder Feb 10, 2021
172fafd
Delete .travis.yml
joachimmarder Feb 10, 2021
c011448
Increased priority of CatchingGeneralExceptionRule and RaisingGeneral…
joachimmarder Feb 10, 2021
65b2325
Slightlty decreased priority of ConstructorWithoutInheritedStatementR…
joachimmarder Feb 10, 2021
e28d57b
Update README.md
joachimmarder Feb 10, 2021
cafa100
Update pom.xml
joachimmarder Feb 10, 2021
a64ea86
Update README.md
joachimmarder Feb 10, 2021
e2aadec
Update README.md
joachimmarder Feb 10, 2021
9261999
Update README.md
joachimmarder Feb 10, 2021
ebfb73c
Update pom.xml
joachimmarder Feb 11, 2021
7856aa3
Do not apply FieldNameRule for public or pubnlished members, the "F" …
joachimmarder Feb 12, 2021
61f7d9e
Update maven.yml
joachimmarder Feb 13, 2021
8b5da45
Provide build artifact
joachimmarder Feb 15, 2021
6ab6333
Issue #6: Provide download of latest build
joachimmarder Feb 15, 2021
d435833
Trying to fix wildcard syntax. Issue #6
joachimmarder Feb 15, 2021
fbe8e6b
Reverted previous chnage: Wildcards do not work. Issue #6
joachimmarder Feb 15, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven

on:
push:
branches: [ master ]
paths-ignore:
- 'README.md'
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: upload JAR file
uses: actions/upload-artifact@v1
with:
name: sonar-delphi-plugin.jar
path: target/sonar-delphi-plugin-1.0.7.jar
4 changes: 0 additions & 4 deletions .travis.yml

This file was deleted.

18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[![Build Status](https://travis-ci.org/ekot1/SonarDelphi.svg?branch=master)](https://travis-ci.org/ekot1/SonarDelphi)
![Java CI with Maven](https://github.com/JAM-Software/SonarDelphi/workflows/Java%20CI%20with%20Maven/badge.svg)

# SonarQube Delphi

Is a SonarQube (http://www.sonarqube.org/) plugin and provides
* 49 Rules for Delphi
* TestCoverage using DelphiCodeCoverage or AQtime (license needed)
* TestCoverage using [DelphiCodeCoverage](https://sourceforge.net/projects/delphicodecoverage/) or AQtime (license needed)
* Optional .html output for TestCoverage
* Unittests results using DUnitX

This is Plugin-Version 1.0 SonarQube 7.9(LTS) or higher is needed (tested with SonarQube 7.9.3 and 8.2.0)
It is is mainly an updated version of https://github.com/fabriciocolombo/sonar-delphi all credit goes to them.
I have hosted it here since the orignal developer isn't active anymore.
It is is mainly an updated version of https://github.com/fabriciocolombo/sonar-delphi and https://github.com/mendrix/SonarDelphi, all credit goes to them.
JAM Software has created its own fork in order to fix issues seen with our Delphi code.

This plugin was originally a [Sabre Airline Solutions](http://www.sabreairlinesolutions.com/home/) donation.

Expand Down Expand Up @@ -57,11 +57,10 @@ requests. If you want to raise an issue, please follow the recommendations below

# Steps to Analyze a Delphi Project

1. Install SonarQube Server (see [Setup and Upgrade](http://docs.sonarqube.org/display/SONAR/Setup+and+Upgrade) for more details). Check supported versions of the [latest release](https://github.com/fabriciocolombo/sonar-delphi/releases/latest) of the plugin.
1. Install SonarQube Server (see [Setup and Upgrade](http://docs.sonarqube.org/display/SONAR/Setup+and+Upgrade) for more details). Check supported versions of the [latest release](https://github.com/JAM-Software/sonar-delphi/releases/latest) of the plugin.
2. Install one of the supported [Runners](#supported-runners) (see below) and be sure you can call it from the directory where you have your source code
3. Install [Delphi Plugin](https://github.com/mendrix/SonarDelphi/releases) (see [Installing a Plugin](http://docs.sonarqube.org/display/SONAR/Installing+a+Plugin) for more details).
NOTE: This only applies to SonarQube 7.9(LTS) and heigher. For older versions see [Delphi Plugin](https://github.com/fabriciocolombo/sonar-delphi/releases)
4. Check the sample project corresponding to your Runner to know which config file you need to create. You can find the samples in [sonar-delphi/samples](https://github.com/fabriciocolombo/sonar-delphi/tree/master/samples).
3. Install [Delphi Plugin](https://github.com/JAM-Software/SonarDelphi/releases) (see [Installing a Plugin](http://docs.sonarqube.org/display/SONAR/Installing+a+Plugin) for more details).
4. Check the sample project corresponding to your Runner to know which config file you need to create. You can find the samples in [sonar-delphi/samples](https://github.com/JAM-Software/sonar-delphi/tree/master/samples).
5. Run your Analyzer command from the project root dir
6. Follow the link provided at the end of the analysis to browse your project's quality in SonarQube UI (see: [Browsing SonarQube](http://docs.sonarqube.org/display/SONAR/Browsing+SonarQube))

Expand All @@ -70,7 +69,6 @@ requests. If you want to raise an issue, please follow the recommendations below
To run an analysis of your Java project, you can use the following Runners:

* [SonarQube Scanner](http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner): recommended for all projects
* See https://github.com/fabriciocolombo/sonar-delphi for diffrent approacheds which have not been tested yet with 0.3.4

## Code Assumptions

Expand Down Expand Up @@ -179,4 +177,4 @@ The plugin uses an ANTLR3 grammar to parse the Delphi language. The grammar defi

After successfully changing and testing the Delphi.g grammar you have to generate the new parser code (menu Generate, option Generate Code). Now copy the files **DelphiLexer.java** and **DelphiParser.java** from **/src/main/antlr3/org/sonar/plugins/delphi/antlr/output/** to **/src/main/java/org/sonar/plugins/delphi/antlr/** and (re)build the plugin.

Note: it is important to make sure your new grammar changes are also tested. If you only have to make sure that they can be parsed without errors, you can add your new language features to one of the existing grammar files in **/src/main/java/org/sonar/plugins/delphi/antlr** (the newest is **GrammarTest2020.pas**).
Note: it is important to make sure your new grammar changes are also tested. If you only have to make sure that they can be parsed without errors, you can add your new language features to one of the existing grammar files in **/src/main/java/org/sonar/plugins/delphi/antlr** (the newest is **GrammarTest2020.pas**).
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


<artifactId>sonar-delphi-plugin</artifactId>
<version>1.0.3</version>
<version>1.0.7</version>
<groupId>org.delphi.plugin</groupId>
<name>Sonar Delphi Plugin</name>
<description>Enables analysis of Delphi projects.</description>
Expand Down Expand Up @@ -69,11 +69,11 @@

<issueManagement>
<system>GitHub</system>
<url>https://github.com/fabriciocolombo/sonar-delphi/issues</url>
<url>https://github.com/JAM-Software/sonar-delphi/issues</url>
</issueManagement>
<ciManagement>
<system>Travis</system>
<url>https://travis-ci.org/fabriciocolombo/sonar-delphi</url>
<system>GitHub</system>
<url>https://github.com/JAM-Software/SonarDelphi/actions</url>
</ciManagement>

<properties>
Expand Down Expand Up @@ -260,4 +260,4 @@
</plugins>
</build>

</project>
</project>
Loading