You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a bugfix release. It addresses the problem that ReqM2 uses a generic `.xml` file suffix which led OpenFastTrace to treat any XML file as a ReqM2 file based solely on the extension. To avoid false detections, this version adds a peek function to the file type detection so that we no longer rely only on the file type/extension (#429).
8
+
9
+
## Bugfixes
10
+
11
+
*#429: Add content peek to file type detection so `.xml` no longer implies ReqM2; prevents misclassification of arbitrary XML files
Copy file name to clipboardExpand all lines: doc/spec/design.md
+19-3Lines changed: 19 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
8
8
## Acknowledgments
9
9
10
-
This documents structure is derived from the "[arc42][bib.arc42]" architectural template by Dr. Gernot Starke, Dr. Peter Hruschka.
10
+
This document's structure is derived from the "[arc42][bib.arc42]" architectural template by Dr. Gernot Starke, Dr. Peter Hruschka.
11
11
12
12
If you build your own modifications based on this document, please keep the attrbiutions.
13
13
@@ -174,9 +174,25 @@ Needs: impl, itest
174
174
175
175
## Import
176
176
177
-
Depending on the source format a variety of [importers](#importers) takes care of reading the input [specification items](#specification-item). Each importer emits events which an [import event listener](#import-event-listener) consumes.
177
+
Depending on the source format, a variety of [importers](#importers) takes care of reading the input [specification items](#specification-item). Each importer emits events which an [import event listener](#import-event-listener) consumes.
178
178
179
-
Common parts of the import like filtering out unnecessary items or attributes are handled by the listener.
179
+
The listener handles Common parts of the import like filtering out unnecessary items or attributes.
180
+
181
+
A factory for importers decides which importer to use. Usually, by file extension.
182
+
183
+
### ReqM2 File Detection
184
+
`dsn~import.reqm2-file-detection~1`
185
+
186
+
The `SpecobjectImporterFactory` detects ReqM2 files either
187
+
188
+
1. via the file extension `.oreqm` or
189
+
2. via the file extension `.xml` and the presence of the string `<specdocument` within the first 4096 bytes of the file.
Copy file name to clipboardExpand all lines: doc/spec/system_requirements.md
+24-6Lines changed: 24 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -255,7 +255,7 @@ Needs: dsn
255
255
256
256
#### Common Requirements for Lightweight Markup Import
257
257
258
-
Typical OFT specification are written in a lightweight markup language like [Markdown](#markdown-import) or [ReStructured Text](#restructured-text-rst-import). Before we go into the specifics, this section discusses the common requirements.
258
+
Typical OFT specifications are written in a lightweight markup language like [Markdown](#markdown-import) or [ReStructured Text](#restructured-text-rst-import). Before we go into the specifics, this section discusses the common requirements.
259
259
260
260
##### Disabling OFT Parsing for Parts of a Markup File
@@ -295,7 +295,7 @@ Markdown focuses on content over formatting by giving the document structure lik
295
295
296
296
OFT defines a Markdown format that we call "Requirement-Enhanced Markdown" which is a superset of the regular Markdown. Any Markdown renderer can render this format without understanding it. The additional structural definitions tell OFT which part of the text is a specification item.
297
297
298
-
For backward compatibility OFT supports a variant of this format that was introduced at Elektrobit. This format is a little bit closer to ReqM2, the predecessor that sparked the OFT idea. We recommend using standard OFT Markdown format in new documents though since this format is cleaner.
298
+
For backward compatibility OFT supports a variant of this format that was introduced at Elektrobit. This format is a little bit closer to ReqM2, the predecessor that sparked the OFT idea. We recommend using the standard OFT Markdown format in new documents, though, since this format is cleaner.
299
299
300
300
##### Markdown Standard Syntax
301
301
`req~markdown-standard-syntax~1`
@@ -319,7 +319,7 @@ The Markdown outline -- a table of contents created from the heading structure b
319
319
320
320
Rationale:
321
321
322
-
In long specification document the outline is the primary means of navigating the document. Only if the outline can be read easily, it is useful for authoring specification documents.
322
+
In long specification documents the outline is the primary means of navigating the document. Only if the outline can be read easily, it is useful for authoring specification documents.
323
323
324
324
Covers:
325
325
@@ -368,6 +368,24 @@ Covers:
368
368
369
369
Needs: dsn
370
370
371
+
#### ReqM2 Format
372
+
373
+
ReqM2 is a markup format developed at Elektrobit. ReqM2 files traditionally use the `.xml` file extension, a better way is to use `.oreqm` instead since that identifies the files uniquely.
374
+
375
+
##### ReqM2 File Detection
376
+
`req~import.reqm2-file-detection~1`
377
+
378
+
OFT considers a file to be a ReqM2 file if it either
379
+
380
+
1. has a the `.oreqm` extension or
381
+
2. has a the `.xml` extension and the header indicates that it is a ReqM2 file.
382
+
383
+
Covers:
384
+
385
+
*[feat~reqm2-import~1](#reqm2-import)
386
+
387
+
Needs: dsn
388
+
371
389
### Tracing
372
390
373
391
#### Outgoing Coverage Link Status
@@ -467,13 +485,13 @@ Usually the responsibility of document authors or coders when it comes to tracin
467
485
468
486
If the users try to run a regular trace without feeding in the artifacts all the way to the bottom level of the tracing chain, the coverage check will always report errors because of missing lower level coverage.
469
487
470
-
To mitigate the situation OFT allows users to ignore required coverage for selected artifact types.
488
+
To mitigate the situation, OFT allows users to ignore required coverage for selected artifact types.
471
489
472
490
Example:
473
491
474
-
Kim is a software architect and it is her job to cover the system requirements coming from Steve in her software architecture. Kim wants to make sure she did not forget to cover a system requirement and uses OFT to trace the two documents. The system requirement specification uses the artifact types `feat` and `req` where `req` covers the `feat` artifacts in the same document. Kim's architecture uses the artifact type `sysarch` which covers `req` and requires a detailed design `dsn`.
492
+
Kim is a software architect, and it is her job to cover the system requirements coming from Steve in her software architecture. Kim wants to make sure she did not forget to cover a system requirement and uses OFT to trace the two documents. The system requirement specification uses the artifact types `feat` and `req` where `req` covers the `feat` artifacts in the same document. Kim's architecture uses the artifact type `sysarch` which covers `req` and requires a detailed design `dsn`.
475
493
476
-
Obviously the detailed design is missing at the point when Kim runs the trace. To mitigate this situation Kim configures OFT to ignore all artifacts of type `dsn`, including the needed coverage. This allows Kim to validate coverage towards the system requirement without needing the detailed design document.
494
+
Obviously, the detailed design is missing at the point when Kim runs the trace. To mitigate this situation, Kim configures OFT to ignore all artifacts of type `dsn`, including the needed coverage. This allows Kim to validate coverage towards the system requirement without needing the detailed design document.
Copy file name to clipboardExpand all lines: importer/specobject/src/main/java/org/itsallcode/openfasttrace/importer/specobject/SpecobjectImporterFactory.java
Copy file name to clipboardExpand all lines: importer/specobject/src/test/java/org/itsallcode/openfasttrace/importer/specobject/TestSpecobjectImporterFactory.java
0 commit comments