• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

eclipse-aascw / aas-core-codegen / 39383890623
90%

Build:
DEFAULT BRANCH: main
Ran 20 Oct 2026 07:11AM UTC
Jobs 3
Files 309
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Oct 2026 07:01AM UTC coverage: 90.184% (-0.004%) from 90.188%
39383890623

push

github

web-flow
Preserve encoded characters in Go regexes (#855)

We fix the Go renderer to preserve the literal meaning of explicitly
encoded characters in constant regex strings.

Previously, the renderer wrote these characters directly into the regex
pattern, potentially causing encoded metacharacters to be interpreted as
regex syntax.

This problem affects V3.2's `matches_reference_identifier`, which
contains the following ranges:

```regex
\x23-\x5B\x5D-\uD7FF
```

These ranges represent characters from `#` through `[` and from `]`
through U+D7FF.

The old renderer produces `#-[]-` within the pattern. Go interprets
`]` as the end of the character class rather than as a literal range
endpoint. As a result, the regex compiles successfully but rejects
valid reference identifiers.

The corrected renderer preserves explicitly encoded characters using
Go's supported `\x{...}` notation:

```regex
\x{23}-\x{5b}\x{5d}-\x{d7ff}
```

The changes also include focused renderer tests covering encoded
punctuation, bracket range endpoints, Unicode ranges, and ordinary
escaped characters. The affected Go verification output for the
existing AAS test metamodel has been regenerated.

This PR addresses the regex-escaping problem tracked in #840.

## Runtime demonstration

The metamodel explicitly documents two valid examples in
[`matches_reference_identifier`]:

[`matches_reference_identifier`]: https://github.com/eclipse-aascw/aas-core-meta/blob/560851dc9/aas_core_meta/v3_2.py#L11083

```text
$sm("https://example.com/sm")#idShort
$sme("https://example.com/sm").someProperty#value
```

The following demonstration uses the complete regexes emitted by the
old and corrected generators, without adding anchors or quantifiers.

Save the program as `main.go` and execute it with:

```shell
go run main.go
```

Both examples produce:

```text
old=false, corrected=true, metamodel=true
```

The `metamodel` value is a hardcoded expected result, independently
verifi... (continued)

1 of 1 new or added line in 1 file covered. (100.0%)

2 existing lines in 1 file now uncovered.

45908 of 50905 relevant lines covered (90.18%)

2.71 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
80.8
-0.8% aas_core_codegen/golang/common.py
Jobs
ID Job ID Ran Files Coverage
1 3.12 - 39383890623.1 20 Oct 2026 07:14AM UTC 309
90.18
GitHub Action Run
2 3.11 - 39383890623.2 20 Oct 2026 07:14AM UTC 309
90.18
GitHub Action Run
3 3.10 - 39383890623.3 20 Oct 2026 07:14AM UTC 309
90.18
GitHub Action Run
Source Files on build 39383890623
  • Tree
  • List 309
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 65f50394 on github
  • Prev Build on main (#38814276020)
  • Next Build on main (#39639444385)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc