From 2e7937ea283bc1f78c02156a3ac8f078997510f5 Mon Sep 17 00:00:00 2001 From: Konrad Neitzel Date: Thu, 9 May 2024 18:00:19 +0200 Subject: [PATCH 1/2] Updated Documentation --- README.md | 6 ++- documentation/de/QuickStart.md | 3 ++ documentation/de/StaticCodeAnalysis.md | 71 ++++++++++++++++++++++++++ documentation/en/QuickStart.md | 5 ++ documentation/en/StaticCodeAnalysis.md | 65 +++++++++++++++++++++++ 5 files changed, 148 insertions(+), 2 deletions(-) create mode 100644 documentation/de/StaticCodeAnalysis.md create mode 100644 documentation/en/StaticCodeAnalysis.md diff --git a/README.md b/README.md index 71057a4..5901ebb 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,10 @@ This projects includes multiple plugins: To use this Template, all you need is a local Java Installation. My current advice is to use a long term supported (LTS) version of either Java 17 or Java 21. -**Important** All commands following should be issued in the root directoy of the project (the directory where you find the pom.xml) - **[Documentation in English](documentation/en/_Index.md)** **[Dokumentation in Deutsch](documentation/de/_Index.md)** + +**Important: ChatGPT was utilized to generate the documentation based on +predefined content specifications, as it represents the fastest way to produce +comprehensive documentation.** \ No newline at end of file diff --git a/documentation/de/QuickStart.md b/documentation/de/QuickStart.md index 3ac4291..3540565 100644 --- a/documentation/de/QuickStart.md +++ b/documentation/de/QuickStart.md @@ -8,6 +8,9 @@ Stelle Deiner Wahl auf dem Computer. angegeben. Unter Windows kannst Du am Anfang des Befehles das ./mvnw durch mvnw ersetzen. +**Hinweis**: Die Befehle müssen im Hauptverzeichnis des Projekts, in dem auch +die pom.xml ist, ausgeführt werden. + ## Wie kannst Du das Projekt nutzen ### Start der Anwendung von der Kommandozeile diff --git a/documentation/de/StaticCodeAnalysis.md b/documentation/de/StaticCodeAnalysis.md new file mode 100644 index 0000000..74e99f4 --- /dev/null +++ b/documentation/de/StaticCodeAnalysis.md @@ -0,0 +1,71 @@ +# Statische Codeanalyse + +Statische Codeanalyse ist ein unerlässliches Werkzeug im Softwareentwicklungsprozess, +das dazu dient, Codequalität zu sichern und Fehler frühzeitig zu erkennen, bevor sie in +Produktion gehen. Sie analysiert den Quellcode auf potenzielle Fehler, ohne das Programm +auszuführen. Diese Technik ist besonders nützlich, um gängige Fehler wie Syntaxfehler, +Typinkonsistenzen oder ungenutzte Variablen aufzuspüren. + +Der Hauptvorteil der statischen Codeanalyse liegt in ihrer Fähigkeit, komplexe und schwer +zu findende Fehler zu identifizieren, die während der Laufzeit schwer zu diagnostizieren +sind. Sie verbessert die Code-Sicherheit, indem sie Schwachstellen aufdeckt, die zu +Sicherheitslücken führen können, wie z.B. Buffer Overflows oder SQL-Injection. Darüber +hinaus unterstützt sie die Einhaltung von Kodierungsstandards und verbessert die Lesbarkeit +sowie Wartbarkeit des Codes. + +Die Implementierung einer statischen Analyse in den Entwicklungszyklus ermöglicht es +Entwicklerteams, effizienter zu arbeiten, da viele Fehler behoben werden können, bevor sie +überhaupt in den Testprozess gelangen. Dies spart Zeit und Ressourcen in späteren +Entwicklungsphasen und führt zu einer insgesamt höheren Softwarequalität. + +## Tools zur statischen Codeanalyse + +### Sonarlint +SonarLint ist ein leistungsstarkes Plug-in für die statische Codeanalyse, das +für eine Vielzahl der am weitesten verbreiteten Entwicklungsumgebungen +verfügbar ist, darunter IDEs wie Eclipse, Visual Studio, IntelliJ IDEA und +Visual Studio Code. Dies ermöglicht es Entwicklern, Code-Qualitätsprobleme +direkt während der Entwicklung zu identifizieren und zu beheben, unabhängig +von der verwendeten Plattform. + +Die Stärke von SonarLint liegt in seiner Fähigkeit, präzise und relevante +Ergebnisse zu liefern, was es zu einem wertvollen Werkzeug für +Softwareentwickler macht, die die Qualität ihrer Codebasis verbessern möchten. +Die Analyseergebnisse sind in der Regel sehr genau und helfen, Fehler +frühzeitig im Entwicklungsprozess zu erkennen und zu korrigieren. + +SonarLint wird von SonarSource bereitgestellt, dem Unternehmen, das auch die +beliebte Code-Qualitätsplattform SonarQube entwickelt hat. Es ist unter einer +Open-Source-Lizenz verfügbar, was bedeutet, dass es kostenlos genutzt werden +kann, sowohl in kommerziellen als auch in nicht-kommerziellen Projekten. +Diese Lizenzierung macht SonarLint besonders attraktiv für Entwickler und +Organisationen, die eine kosteneffektive Lösung zur Verbesserung ihrer +Code-Qualität suchen. + +### PMD + +PMD ist ein beliebtes Tool für die statische Codeanalyse, das speziell darauf +ausgelegt ist, im Build-Prozess automatisch integriert zu werden. Dies +ermöglicht es, PMD nahtlos in kontinuierliche Integrationsumgebungen und auf +Buildservern zu verwenden. Durch seine Integration in den Build-Prozess kann +PMD automatisch Codeanalysen durchführen, sobald der Code kompiliert wird, +was die Identifikation und Behebung von Codequalitätsproblemen effizienter +gestaltet. Dies macht es zu einem idealen Werkzeug für Entwicklerteams, die +eine kontinuierliche Überwachung und Verbesserung der Codequalität +sicherstellen möchten. + +### SpotBugs + +SpotBugs ist ein fortschrittliches Werkzeug zur statischen Codeanalyse, das +speziell für die Integration in den Build-Prozess konzipiert ist, ähnlich wie +PMD, jedoch mit erweiterten Funktionen zur Erkennung potenzieller Fehler. Ein +besonderes Merkmal von SpotBugs ist die Unterstützung von Null-Überprüfungen +durch Annotationen wie @Nullable, die PMD nicht bietet. Diese Funktionalität +ermöglicht es Entwicklern, explizit anzugeben, wo Nullwerte erwartet werden, +was die Fähigkeit des Tools erhöht, Nullzeigerausnahmen zu erkennen, bevor +der Code bereitgestellt wird. Wie PMD kann auch SpotBugs nahtlos in +kontinuierliche Integrationsumgebungen und auf Buildservern integriert werden, +was den Prozess der Qualitätskontrolle des Codes während der Kompilierung +automatisiert. Diese Integration hilft Entwicklungsteams, durch +kontinuierliche Bewertungen und Verbesserungen einen hohen Standard der +Codequalität aufrechtzuerhalten. diff --git a/documentation/en/QuickStart.md b/documentation/en/QuickStart.md index 33084ea..dff4353 100644 --- a/documentation/en/QuickStart.md +++ b/documentation/en/QuickStart.md @@ -3,6 +3,11 @@ - Simply download a zip file of this project and unzip it somewhere on your computer - open the pom.xml and change the settings at the start of the document to fit with your project +**Important** The shown commands use a syntax that is used by unix and macos. If you +are using Windows then please replace the ./mvnw with mvnw only. + +**Important** All commands shown should be issued in the root directoy of the project (the directory where you find the pom.xml) + ## How to use this project ### Start the application from commandline diff --git a/documentation/en/StaticCodeAnalysis.md b/documentation/en/StaticCodeAnalysis.md new file mode 100644 index 0000000..a410752 --- /dev/null +++ b/documentation/en/StaticCodeAnalysis.md @@ -0,0 +1,65 @@ +# Static Code Analysis + +Static code analysis is an essential tool in the software development process, +designed to ensure code quality and detect errors early before they go into +production. It examines the source code for potential mistakes without running +the program. This technique is particularly useful for identifying common +errors such as syntax errors, type inconsistencies, or unused variables. + +The main advantage of static code analysis lies in its ability to identify +complex and hard-to-find errors that are difficult to diagnose during runtime. +It enhances code security by revealing vulnerabilities that could lead to +security breaches, such as buffer overflows or SQL injection. Additionally, +it supports adherence to coding standards and improves the readability and +maintainability of the code. + +Implementing static analysis in the development cycle allows development +teams to work more efficiently, as many errors can be addressed before they +even enter the testing process. This saves time and resources in later +development stages and leads to overall higher software quality. + +## Tools for static code analysis + +### Sonarlint +SonarLint is a powerful static code analysis plugin available for a wide +range of widely-used development environments, including IDEs like Eclipse, +Visual Studio, IntelliJ IDEA, and Visual Studio Code. This enables developers +to identify and fix code quality issues directly during the development +process, regardless of the platform used. + +The strength of SonarLint lies in its ability to deliver precise and relevant +results, making it a valuable tool for software developers looking to improve +the quality of their codebase. The analysis results are typically very +accurate and help to detect and correct errors early in the development +process. + +SonarLint is provided by SonarSource, the company that also developed the +popular code quality platform SonarQube. It is available under an open-source +license, meaning it can be used free of charge in both commercial and +non-commercial projects. This licensing makes SonarLint particularly +attractive for developers and organizations seeking a cost-effective +solution to enhance their code quality. + +### PMD +PMD is a popular static code analysis tool specifically designed to be +automatically integrated into the build process. This allows PMD to be +seamlessly used in continuous integration environments and on build servers. +By being integrated into the build process, PMD can automatically perform +code analysis as soon as the code is compiled, making the identification +and resolution of code quality issues more efficient. This makes it an +ideal tool for development teams that want to ensure continuous monitoring +and improvement of code quality. + +### SpotBugs + +SpotBugs is an advanced static code analysis tool tailored for integration +into the build process, similar to PMD, but with enhanced capabilities for +identifying potential bugs. A distinctive feature of SpotBugs is its support +for null-checks using annotations such as @Nullable, which PMD does not offer. +This functionality allows developers to explicitly denote where null values +are expected, enhancing the tool’s ability to detect null pointer exceptions +before the code is deployed. Like PMD, SpotBugs can be seamlessly integrated +into continuous integration environments and on build servers, automating the +process of code quality checks during compilation. This integration aids +development teams in maintaining high standards of code quality through +continuous assessments and improvements. From 230c30bf96ca1c2c7b321daeca8cd9df4b7044b5 Mon Sep 17 00:00:00 2001 From: Konrad Neitzel Date: Thu, 9 May 2024 18:02:26 +0200 Subject: [PATCH 2/2] Updated Documentation --- documentation/de/_Index.md | 4 ++-- documentation/en/_Index.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/de/_Index.md b/documentation/de/_Index.md index 2ce6467..e246eea 100644 --- a/documentation/de/_Index.md +++ b/documentation/de/_Index.md @@ -7,9 +7,9 @@ - [Erzeugung eines Images](ImageCreation.md) - Überprüfung auf Aktualisierungen -# Statische Codeanalyse +## [Statische Codeanalyse](StaticCodeAnalysis.md) - PMD - SpotBugs -# Sonstiges +## Sonstiges - Lombok \ No newline at end of file diff --git a/documentation/en/_Index.md b/documentation/en/_Index.md index ecb0f3a..6d2456a 100644 --- a/documentation/en/_Index.md +++ b/documentation/en/_Index.md @@ -7,7 +7,7 @@ - [Image Creation](ImageCreation.md) - Checking of Updates -## Static Code Analysis +## [Static Code Analysis](StaticCodeAnalysis.md) - PMD - FindBugs