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

clang-format and clang-tidy scripts: More robust algorithm to find correct executable #6041

Merged
merged 9 commits into from
Jan 3, 2024

Conversation

clydebarrow
Copy link
Contributor

What does this implement/fix?

The scripts script/clang-format and script/clang-tidy don't work well on a Mac with executables installed by
homebrew. This PR checks for either the plain executable name that reports the correct version or a versioned name,

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Related issue or feature (if applicable): fixes

Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266
  • RP2040
  • BK72xx
  • RTL87xx

Example entry for config.yaml:

# Example config.yaml

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

@probot-esphome probot-esphome bot added the core label Dec 30, 2023
script/clang-format Outdated Show resolved Hide resolved
script/clang-tidy Outdated Show resolved Hide resolved
script/clang-tidy Outdated Show resolved Hide resolved
script/clang-format Outdated Show resolved Hide resolved
script/clang-format Outdated Show resolved Hide resolved
requirements.txt Outdated Show resolved Hide resolved
script/clang-format Outdated Show resolved Hide resolved
script/helpers.py Outdated Show resolved Hide resolved
script/helpers.py Outdated Show resolved Hide resolved
script/clang-format Outdated Show resolved Hide resolved
@bdraco
Copy link
Member

bdraco commented Jan 2, 2024

Looks good. One remaining comment and I think its good to go 👍

@bdraco
Copy link
Member

bdraco commented Jan 2, 2024

Looks good. Will test shortly

script/setup Show resolved Hide resolved
bdraco
bdraco previously approved these changes Jan 2, 2024
requirements_test.txt Outdated Show resolved Hide resolved
Copy link
Member

@kbx81 kbx81 left a comment

Choose a reason for hiding this comment

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

Tested on my M1 MacBook and confirmed working as expected.

Thanks @clydebarrow for working on this and @bdraco for your reviews & input! 🍻

@kbx81 kbx81 merged commit a2e152a into esphome:dev Jan 3, 2024
57 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 5, 2024
@clydebarrow clydebarrow deleted the clang-format branch April 24, 2024 00:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants