Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve pretty-printing to support invalid bitflags #3

Merged
merged 3 commits into from
Oct 1, 2021
Merged

Conversation

jmert
Copy link
Owner

@jmert jmert commented Oct 1, 2021

This may occur when values are reinterpreted from raw integers.
Rather than printing a chain of ORs which do not sum to the explicit
value (or worse yet, print nothing for a disjoint bitset), just tack
on to the end of the chain the explicit numerical value of all
unhandled bits.

We can even represent this in the non-compact case as a reinterpret
expression which is copy-pastable to re-form the given value.

This may occur when values are reinterpreted from raw integers.
Rather than printing a chain of ORs which do not sum to the explicit
value (or worse yet, print nothing for a disjoint bitset), just tack
on to the end of the chain the explicit numerical value of all
unhandled bits.

We can even represent this in the non-compact case as a reinterpret
expression which is copy-pastable to re-form the given value.
@codecov
Copy link

codecov bot commented Oct 1, 2021

Codecov Report

Merging #3 (51eb396) into master (15ef92a) will increase coverage by 1.44%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #3      +/-   ##
==========================================
+ Coverage   95.61%   97.05%   +1.44%     
==========================================
  Files           1        1              
  Lines         114      136      +22     
==========================================
+ Hits          109      132      +23     
+ Misses          5        4       -1     
Impacted Files Coverage Δ
src/BitFlags.jl 97.05% <100.00%> (+1.44%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 15ef92a...51eb396. Read the comment docs.

@jmert jmert merged commit 6bd82b3 into master Oct 1, 2021
@jmert jmert deleted the prettyprint branch October 1, 2021 00:23
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.

1 participant