Skip to content

Hide code from coverage#851

Open
cbmarini wants to merge 2 commits into
form-dev:masterfrom
cbmarini:lcov-excl
Open

Hide code from coverage#851
cbmarini wants to merge 2 commits into
form-dev:masterfrom
cbmarini:lcov-excl

Conversation

@cbmarini

@cbmarini cbmarini commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

This PR wraps unfinished features into LCO_EXCL_START and LCOV_EXCL_STOP to hide them from coverage statistics. At the moment I hid the (unfinished) code for

  • #namespace,
  • #setflag,
  • MultiBracket,
  • the complete diagrams.c file.

What else could be hidden because it is not active at the moment? For example the code in checkpoint.c?

@coveralls

coveralls commented Jun 24, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 64.406% (+1.3%) from 63.145% — cbmarini:lcov-excl into form-dev:master

@tueda

tueda commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

SkipName and ConstructName are called when reading a model for the diagram generator.

Undocumented user-flag feature is working, except for the clearflag statement:

Local F = 1;

#procedure PrintFlag(i,F)
  #if flag(1,F)
    #message flag(1,F) is true
  #else
    #message flag(1,F) is false
  #endif
#endprocedure

#call PrintFlag(1,F)
#setflag 2,F
#call PrintFlag(1,F)
#setflag 1,F
#call PrintFlag(1,F)
#clearflag 1,F
#call PrintFlag(1,F)
setflag 1;
.sort
#call PrintFlag(1,F)
clearflag 1;
.sort
#call PrintFlag(1,F)

.end
~~~flag(1,F) is false
~~~flag(1,F) is false
~~~flag(1,F) is true
~~~flag(1,F) is false
~~~flag(1,F) is true
~~~flag(1,F) is true
    .end

One would expect the last one to be false.

GPT-5.5 suspects that Add3Com(TYPECLEARUSERFLAG,x) in CoClearUserFlag:

Add3Com(TYPECLEARUSERFLAG,x);

should be Add3Com(TYPECLEARUSERFLAG,x-1) as in CoSetUserFlag.

cbmarini added 2 commits June 30, 2026 13:16
…, see the new .lcovrc, to hide them from coverage statistics.

This commit hides the following:
- #namespace
- #setflag
- MultiBracket
- Complete checkpoint.c file
- Complete diagrams.c file
- This should go together with the lcov exclusion markers INTERNAL_ERROR_EXCL_START etc.

fix: don't allow MesPrint error markers `@` and `#` in the regular Print statement, similar as already implemented for `&`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants