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

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

Build:
DEFAULT BRANCH: main
Ran 28 Sep 2026 08:57AM UTC
Jobs 3
Files 301
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

28 Sep 2026 08:52AM UTC coverage: 88.527% (+0.005%) from 88.522%
36399939998

push

github

web-flow
Transpile general if statements (#788)

We transpile the chains of ``if``, ``elif`` and ``else`` in the bodies
of transpilable functions which can not be mapped to a switch, *e.g.*:

    if number < 0 and len(text) > 0:
        return False
    elif number == 13:
        return False

The parse tree gets an ``If`` statement with a sequence of branches and
an optional default. The detection of switches stays greedy: a chain
whose first test compares a subject against constants is still
a switch, and a non-matching ``elif`` becomes an if-statement in its
default.

The type inference refuses the conditions which are not booleans, as
the targets do not share Python's truthiness, and treats the branches
as block scopes, analogous to the switches. We deliberately do not
narrow the types by the conditions yet, *e.g.*, ``x`` stays optional in
the body of ``if x is not None:``.

All the targets transpile to native chains of ``if`` and ``else if``.
Java and C++ share the writing of the chains with their fallback for
the switches on ``long`` and strings, respectively.

Along the way, we fix the line break of the long assignments in Go,
which ended with a stray parenthesis, ``x :=\n\tvalue)``.

The new common meta-model ``if_statements`` covers the variants,
including a ``continue`` in a branch nested in a for-loop.

349 of 402 new or added lines in 13 files covered. (86.82%)

2 existing lines in 2 files now uncovered.

41589 of 46979 relevant lines covered (88.53%)

2.66 hits per line

Uncovered Changes

Lines Coverage ∆ File
8
73.88
0.5% aas_core_codegen/cpp/transpilation.py
8
77.26
0.15% aas_core_codegen/java/transpilation.py
5
79.69
0.29% aas_core_codegen/csharp/transpilation.py
5
78.54
0.53% aas_core_codegen/golang/transpilation.py
5
75.12
0.81% aas_core_codegen/python/transpilation.py
5
78.92
0.66% aas_core_codegen/typescript/transpilation.py
3
75.79
0.1% aas_core_codegen/cpp/optionaling.py
3
76.54
0.07% aas_core_codegen/golang/pointering.py
3
82.55
0.15% aas_core_codegen/intermediate/type_inference.py
3
75.39
0.12% aas_core_codegen/java/optional.py
3
87.86
0.05% aas_core_codegen/parse/_rules.py
2
89.09
0.66% aas_core_codegen/parse/tree.py

Coverage Regressions

Lines Coverage ∆ File
1
77.26
0.15% aas_core_codegen/java/transpilation.py
1
87.86
0.05% aas_core_codegen/parse/_rules.py
Jobs
ID Job ID Ran Files Coverage
1 3.11 - 36399939998.1 28 Sep 2026 09:00AM UTC 301
88.53
GitHub Action Run
2 3.10 - 36399939998.2 28 Sep 2026 09:00AM UTC 301
88.53
GitHub Action Run
3 3.12 - 36399939998.3 28 Sep 2026 09:00AM UTC 301
88.53
GitHub Action Run
Source Files on build 36399939998
  • Tree
  • List 301
  • Changed 14
  • Source Changed 0
  • Coverage Changed 14
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 73a92a9a on github
  • Prev Build on main (#36397783076)
  • Next Build on main (#36436599983)
  • 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