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

cabana(DBCFile): handle escaped quotes #31889

Merged
merged 12 commits into from
Apr 4, 2024

Conversation

incognitojam
Copy link
Contributor

@incognitojam incognitojam commented Mar 16, 2024

Description
Add support for escaped quotemarks inside comments

Verification

  • Added test case
  • try opening/editing/saving with cabana

Copy link
Contributor

github-actions bot commented Mar 16, 2024

Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:

  • Convert your PR to a draft unless it's ready to review
  • Read the contributing docs
  • Before marking as "ready for review", ensure:
    • the goal is clearly stated in the description
    • all the tests are passing
    • the change is something we merge
    • include a route or your device' dongle ID if relevant

@github-actions github-actions bot added the tools label Mar 16, 2024
@incognitojam incognitojam marked this pull request as ready for review March 16, 2024 11:37
@incognitojam incognitojam changed the title cabana(DBCFile): handle escaped quotes and empty descriptions cabana(DBCFile): handle escaped quotes, empty descriptions and preserve header Mar 16, 2024
@incognitojam incognitojam marked this pull request as draft March 17, 2024 14:53
@incognitojam incognitojam marked this pull request as ready for review March 17, 2024 15:04
@incognitojam incognitojam changed the title cabana(DBCFile): handle escaped quotes, empty descriptions and preserve header cabana(DBCFile): handle escaped quotes, empty descriptions Mar 17, 2024
@incognitojam
Copy link
Contributor Author

I tried to add more things but split them out into seperate PRs

@incognitojam
Copy link
Contributor Author

CANParser doesn't like the empty val descriptions

@incognitojam incognitojam changed the title cabana(DBCFile): handle escaped quotes, empty descriptions cabana(DBCFile): handle escaped quotes Mar 19, 2024
@incognitojam incognitojam marked this pull request as ready for review March 19, 2024 12:45
@incognitojam
Copy link
Contributor Author

Removed the empty val stuff, should be good to go

@adeebshihadeh adeebshihadeh merged commit d09e77d into commaai:master Apr 4, 2024
27 checks passed
@incognitojam incognitojam deleted the cabana-dbc-fixes branch April 4, 2024 14:40
cydia2020 pushed a commit to cydia2020/dodgypilot that referenced this pull request May 14, 2024
* cabana(DBCFile): VAL_ allow empty description

Even though this doesn't make much sense, we should still be able to
parse it.

* cabana(DBCFile): allow escaped quotemarks in signal comment

* also message comments

* escape/unescape quotes

* test empty val desc

* test generating DBC with escaped quotes in comment

* seperate test case

* fix trailing space

* remove empty val

* trailing whitespace again
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants