-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathspec-checker.conf
48 lines (41 loc) · 2 KB
/
spec-checker.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#########################################################################
# spec-checker configuration file for validating MVF-BU specifications.
# NOTE:
# This file is run using Python exec() method.
# Python expressions are valid, but anything except simple definition
# assignments is discouraged.
#########################################################################
PROJECT_ID = "BU" # a tag to identify the project spec
# prefix for identifiers
REQUIREMENT_PREFIX = 'MVHF' + '-' + PROJECT_ID
#########################################################################
# these are unlikely to require modification if following standard
# conventions
# tags identifying requirement types
USER_REQ_TAG = '-USER-REQ-'
SYS_REQ_TAG = '-SYS-REQ-'
SW_REQ_TAG = '-SW-REQ-'
# regular expression to find requirements in req file
REQUIREMENT_PATTERN = '^\s*Requirement:\s*([\w-]+)\s*$'
REQUIREMENT_TRACEABILITY_START = '^\s*Traceability:\s*(' \
+ REQUIREMENT_PREFIX + '-.*)\s*$'
REQUIREMENT_TRACEABILITY_CONT = '^\s*(' + REQUIREMENT_PREFIX \
+ '-[\w-]*[,;]\s*)*(' + REQUIREMENT_PREFIX \
+ '-[\w-]*)[,;]*\s*$'
# regular expression to find design elements in des file
DESIGN_PREFIX = REQUIREMENT_PREFIX
DESIGN_PATTERN = '^[\s]*Design[\s]*:\s*([\w-])\s*$'
DES_TAG = '-DES-'
# design elements are introduced by their ids in parenthesis at end of a
# section heading line in the markdown text
# e.g.
#### some heading: brief element description (ELEMENT-ID)
DESIGN_ELEMENT_INTRODUCTION = '\#.*\((' + DESIGN_PREFIX + '.*)\)\s*$'
REQ_TO_DES_SECTION_START = '#.*Requirements -> design\s*$'
REQ_TO_DES_TABLE_START = '^--- | ---$'
REQ_TO_DES_ENTRY = '^\s*(' + REQUIREMENT_PREFIX + '.*)\s*\|\s*(' \
+ DESIGN_PREFIX + '.*)\s*$'
DES_TO_REQ_SECTION_START = '#.*Design -> requirements\s*$'
DES_TO_REQ_TABLE_START = '^--- | ---$'
DES_TO_REQ_ENTRY = '^\s*(' + DESIGN_PREFIX + '.*)\s*\|\s*(' \
+ REQUIREMENT_PREFIX + '.*)\s*$'