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

#296, #294: Support PlantUML and Go with TagImporter #297

Merged
merged 1 commit into from
Aug 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 7 additions & 1 deletion doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- [Go](https://golang.org/) support for Tag Importer [#294](https://github.com/itsallcode/openfasttrace/issues/294)
- [PlantUML](https://plantuml.com) support for Tag Importer [#296](https://github.com/itsallcode/openfasttrace/issues/296)

### Fixed

- Support building, testing and running with Java 16 [#287](https://github.com/itsallcode/openfasttrace/issues/287) / [#288](https://github.com/itsallcode/openfasttrace/issues/288)

## [3.2.1] - 2021-07-19

### Upgrade dependencies:
### Upgraded dependencies

- Test dependencies
- [JUnit](https://github.com/itsallcode/openfasttrace/pull/275)
- [mockito-junit-jupiter](https://github.com/itsallcode/openfasttrace/pull/284)
Expand Down
48 changes: 41 additions & 7 deletions doc/user_guide.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
<head><link href="oft_spec.css" rel="stylesheet"></link></head>

![oft-logo](../openfasttrace-core/src/main/resources/openfasttrace_logo.svg)
![oft-logo](../core/src/main/resources/openfasttrace_logo.svg)

# OpenFastTrace (OFT) User Guide

## In a Nutshell

OFT is a requirement tracing tool. It helps you make sure that all defined requirements are covered in your code. It
also helps finding outdated code passages.

1. Create requirement and specification documents in Markdown including OFT-readable specification items
1. Put tags into your source code that mark the coverage of items from the specification
1. Use OFT to trace the requirements from the source to the final implementation

## Introduction

### Who Should Read This Document?
Expand Down Expand Up @@ -418,15 +423,37 @@ Defaults to the platform standard if not given.

### Input Format Support

#### Tags in Programming Language Files
#### Tags in Programming Language or Markup Files

The Tag Importer is the most basic importer OFT offers. While it supports a wide variety of source formats, it does not
really understand the surrounding format, but instead looks for certain patterns that define specification items.

To avoid conflict with the formats actual contents, you embed these definitions in comments usually.

Tags have the following format:

OFT's Tag importer by default supports embedding tags into the source files of the following programming or markup languages:
```
[ <covered-artifact-type> -> <specification-object-id> ]
```

Spaces above were only added for readability. They are optional. In fact usually people prefer a more compact form.
Here is an example of a tag embedded into a Java comment:

```java
// [impl->dsn~validate-authentication-request~1]
```

The Tag Importer recognizes the supported format by the file extension. The following list shows the standard set of
recognized file types:

**Programming languages**

* C (`.c`, `.h`)
* C++ (`.C`, `.cpp`, `.c++`, `.cc`, `.H`, `.hpp`, `.h++`, `.hh`)
* C# (`.c#`)
* Database related (`.sql`, `.pls`)
* Configuration files (`.cfg`, `.conf`, `.ini`)
* [Go](https://golang.org/) (`.go`)
* Groovy (`.groovy`)
* Java (`.java`)
* JavaScript (`.js`)
Expand All @@ -440,11 +467,18 @@ OFT's Tag importer by default supports embedding tags into the source files of t
* Rust (`.rs`)
* Shell programming (`.sh`, `.bash`, `.zsh`)
* Swift (`.swift`)
* HTML (`.html`, `.htm`, `.xhtml`)
* Windows batch files (`.bat`)
* YAML (`.yaml`)
* Z-Shell (`.zsh`)

**Markup languages**

* HTML (`.html`, `.htm`, `.xhtml`)
* YAML (`.yaml`)

**Modeling languages**

* [PlantUML](https://plantuml.com) (`.pu`, `.puml`, `.plantuml`

Note that XML is at the moment not yet supported by the Tag Importer, because it would collide with the SpecObj Importer. Once import fallback is implemented, XML will be supported too.

#### Markdown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public class TagImporterFactory extends ImporterFactory
"c", "C", "cc", "cpp", "c++", "h", "H", "h++", "hh", "hpp", // C/C++
"c#", // C#
"cfg", "conf", "ini", // configuration files
"go", // Go
"groovy", // Groovy
"json", "htm", "html", "xhtml", "yaml", // markup languages
"java", // Java
Expand All @@ -55,6 +56,7 @@ public class TagImporterFactory extends ImporterFactory
"php", // PHP
"pl", "pm", // Perl
"py", // Python
"pu", "puml", "plantuml", // PlantUML
"r", // R Language
"rs", // Rust
"sh", "bash", "zsh", // Shell programming
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ protected List<String> getSupportedFilenames()
"foo.conf", "foo.cpp", "foo.groovy", "foo.h", "foo.H", "foo.hh", "foo.h++",
"foo.htm", "foo.html", "foo.ini", "foo.js", "foo.json", "foo.lua", "foo.m",
"foo.mm", "foo.php", "foo.pl", "foo.pls", "foo.pm", "foo.py", "foo.sql", "foo.r",
"foo.rs", "foo.sh", "foo.yaml", "foo.xhtml", "foo.zsh", "foo.clj", "foo.kt", "foo.scala");
"foo.rs", "foo.sh", "foo.yaml", "foo.xhtml", "foo.zsh", "foo.clj", "foo.kt", "foo.scala",
"foo.pu", "foo.puml", "foo.plantuml", "foo.go");
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<description>Free requirement tracking suite</description>
<url>https://github.com/itsallcode/openfasttrace</url>
<properties>
<revision>3.2.1</revision>
<revision>3.3.0</revision>
<java.version>11</java.version>
<junit.version>5.8.0-M1</junit.version>
<maven.surefire.version>3.0.0-M5</maven.surefire.version>
Expand Down