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

Remove empty comments from code #62

Merged
merged 2 commits into from
Nov 20, 2024

Conversation

lorenzschmid
Copy link
Contributor

With the changes from #61, descriptions were removed from being printed in the code. If the field contains no comment, the string (missing comment) gets printed. Having very little comments in our cheby maps, we have now the (missing comment) all over without adding much information to the code.

This pull request improves #61 by printing the name of the field if no comment is present or skipping to print anything altogether. See the regenerated testfiles for a comparison.

@tgingold-cern
Copy link
Owner

Yes, I understand your point. But I fear this could be improved:

For

/* (comment missing) */
#define SAME_LABEL_REG_NO_FIELDS 0x0UL

I would emit as a comment:

/* register no_fields */
#define SAME_LABEL_REG_NO_FIELDS 0x0UL

as the name of the element is not that immediate to see (just /* no_fields */ would also be ok).

However, for:
``
struct b2 {

  • /* [0x0]: REG (rw) (comment missing) */
  • /* [0x0]: REG (rw) r3 */
    uint32_t r3;
    } b2;
I am not sure it is worth printing again the name of the register in the comment (but that's ok too).

@lorenzschmid
Copy link
Contributor Author

Both proposals are fine with me. I changed them in 799a491 and updated the pull request.

@tgingold-cern tgingold-cern merged commit 8a244e4 into tgingold-cern:master Nov 20, 2024
2 checks passed
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.

2 participants