-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Enforce - as word separator in devicetree property names
#53502
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
Enforce - as word separator in devicetree property names
#53502
Conversation
aa2ff1a to
66dc9b6
Compare
04e7331 to
f39e62b
Compare
- as word separator in devicetree property names
f39e62b to
6a0cfb7
Compare
00ce810 to
2ced0c3
Compare
That's a relief. And what do you know, the offending properties (which appeared as part of the rebase) are legitimate. I added a configuration file we can use to override the check on a property-by-property basis, with initial contents set to allow existing OK properties. |
|
|
||
| logger = None | ||
|
|
||
| # This ends up using the current repository if ZEPHYR_BASE is unset. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But we already have a default for ZEPHYR_BASE:
zephyr/scripts/ci/check_compliance.py
Lines 1110 to 1118 in ee99030
| global ZEPHYR_BASE | |
| ZEPHYR_BASE = os.environ.get('ZEPHYR_BASE') | |
| if not ZEPHYR_BASE: | |
| # Let the user run this script as ./scripts/ci/check_compliance.py without | |
| # making them set ZEPHYR_BASE. | |
| ZEPHYR_BASE = str(Path(__file__).resolve().parents[2]) | |
| # Propagate this decision to child processes. | |
| os.environ['ZEPHYR_BASE'] = ZEPHYR_BASE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But we already have a default for ZEPHYR_BASE:
Oh, I didn't see that this function was changing global variables. That's fun.
I still need this at module level so that check_compliance: re-work DevicetreeBindingsCheck later on in the PR works, so I'll just refactor this patch to remove the lines you mention as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But you did not remove those lines, did you?
|
You wrote:
But that's only true upstream. Downstream this is run from the root of the repo that the checks need to be run on. |
You're saying that we are running the zephyr/.github/workflows/compliance.yml file from non-zephyr repositories in downstreams? If so, I'm having trouble understanding if you're asking for a change, though. The documented and this PR is making the implementation match this documentation, so I don't see any changes that need doing, except maybe removing the "just informative" part. Am I missing something? |
|
@carlescufi ping, can you please explain what the changes you are requesting are? See my previous comment. |
|
@carlescufi ping? It'd be cool to move forward with this. |
|
This needs rebasing. |
|
@mbolivar-nordic - please rebase and resolve conflicts. I'll approve again |
|
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
|
Removing the |
|
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
|
@mbolivar-nordic apologies for the huge delay. Your patches make sense, in general, I will add a comment in the code itself. |
No, not the same exact workflow, but a very similar one. See here: |
|
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
|
This would be a good thing to redo before lts3 |
Agreed. Would love to see this happen. |
Fixes: #53506
This tree-wide change cleans up existing property names which use
_instead of-, and adds a CI check to avoid new ones from creeping in. This requires a little bit of prep work to add a helper function to edtlib to make the check easier to write.I found a few issues in check_compliance.py while I was adding this that I took the time to fix while I was here.