ETSI's Bug Tracker - Part 01: TTCN-3 Core Language
View Issue Details

ID | Project | Category | View Status | Date Submitted | Last Update
0008191 | Part 01: TTCN-3 Core Language | New Feature | public | 12-01-2023 14:09 | 16-12-2024 11:49

Reporter | Matthias Simon |
Assigned To | Jens Grabowski |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | resolved | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version |  |
Target Version |  | Fixed in Version |  |
Clause Reference(s) | n/a
Source (company - Author) | Nokia - Matthias Simon

Summary | 0008191: Strict Rules

Description

Stricter TTCN-3 language rules are beneficial for avoiding code smells. For example:
* 8094: Provide a canonical style for source code layout
* 8098: Mandatory module prefix for imported module definitions
* 8099: Disallow circular imports
* xxxx: Private as default visibility for module definitions
* xxxx: Disallow references in pattern strings
* xxxx: Explicit imports
* ...
Individual rules should be optional to assure backwards compatibility. Those rule could be configured by some kind of project manifest, or file-local by pragma directives. Examples from other languages:
* Perl: use strict;
* Python: from __future__ import nested_scopes
* Visual Basic: Option Strict On
* C#: #pragma warning disable 414, CS3021

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files |

Issue History
Date Modified | Username | Field | Change
12-01-2023 14:09 | Matthias Simon | New Issue |
05-09-2023 10:50 | Jens Grabowski | Note Added: 0016521 |
05-09-2023 10:50 | Jens Grabowski | Assigned To | => Jens Grabowski
05-09-2023 10:50 | Jens Grabowski | Status | new => assigned
07-11-2023 13:40 | Jens Grabowski | Note Added: 0016535 |
26-01-2024 16:31 | Olivier Genoud | Note Added: 0016615 |
16-12-2024 11:49 | Jens Grabowski | Note Added: 0016723 |
16-12-2024 11:49 | Jens Grabowski | Status | assigned => resolved
16-12-2024 11:49 | Jens Grabowski | Resolution | open => fixed

Notes

(0016521)
Jens Grabowski
05-09-2023 10:50

TTF discussion: Interesting proposal. Recoomendations for TTCN-3 usage might be of interest for the future. List may be extended.

(0016535)
Jens Grabowski
07-11-2023 13:40

TTF discussion: Umbrella CR for new major release of TTCN-3.

(0016615)
Olivier Genoud
26-01-2024 16:31

- 8094: Core language shall not be mixed up with coding style guides and in general the coding style shall be project specific. Nevertheless, a configurable 'beautifier' tool could be helpful, e.g. to achieve a common indentation.
- 8098: The proposal is not backward compatible and would cause us to change everything (all function calls would need a module prefix)! In general naming conventions shall be project-specific with project specific tools checking them.
- 8099: There is no need to handle potential code smells at core language level, but projects may define what shall be considered as code smell and how to avoid these code smells (e.g. by appropriate tools).

(0016723)
Jens Grabowski
16-12-2024 11:49

Discussion will continue in Gitlab.