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

cantool/generate: handle mux bool types correctly + skip overflow values #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

d4l3k
Copy link
Contributor

@d4l3k d4l3k commented Dec 28, 2021

This PR does two things:

  1. Handles mux bool types correctly (true/false instead of 0)
  2. Skips values that will overflow the type of the constant to still allow generating code with bad dbc files

Fixes #39.

@codecov-commenter
Copy link

codecov-commenter commented Dec 28, 2021

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 29 lines in your changes missing coverage. Please review.

Project coverage is 54.80%. Comparing base (436134b) to head (cef29e3).
Report is 163 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #52      +/-   ##
==========================================
- Coverage   55.20%   54.80%   -0.41%     
==========================================
  Files          62       62              
  Lines        3556     3582      +26     
==========================================
  Hits         1963     1963              
- Misses       1484     1510      +26     
  Partials      109      109              
Files Coverage Δ
internal/generate/file.go 0.00% <0.00%> (ø)

Copy link

@hashemmm96 hashemmm96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, thanks for your contribution! Sorry for the late review 🙇

I think this looks good, but there's been some changes to the CI for this project, so let's rebase on master first and see if there's fixes to be made.

@odsod odsod requested review from a team and removed request for odsod and alethenorio February 28, 2024 07:37
@Jassob Jassob self-requested a review May 16, 2024 15:32
@Jassob
Copy link
Member

Jassob commented May 16, 2024

Hello @d4l3k, if this is still relevant please rebase on master and we'll review it again.

Otherwise we will close it in 14 days.

@Jassob Jassob added stale Stale codegen Changes to the generated code labels May 16, 2024
@Edholm Edholm requested review from maxekman and removed request for a team September 11, 2024 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codegen Changes to the generated code stale Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bool mux types handling: cannot use 0 (type untyped int) as type bool
4 participants