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

Update pre-commit config to run formatting check on all files (IEC-268) #135

Merged

Conversation

Dazza0
Copy link
Contributor

@Dazza0 Dazza0 commented Feb 18, 2025

Description

Currently, .pre-commit-config.yaml formatting checks (e.g., trailing whitespace and line endings) will only run on C/C++ source files. This has caused some formatting issues to slip through in other files types (e.g., .md and .txt).

This PR updates .pre-commit-config.yaml so that formatting checks are run on all file types, and also fixes formatting issues caught by pre-commit run --all-files.

Related

Testing

Checklist

Before submitting a Pull Request, please ensure the following:

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

@espressif-bot espressif-bot added the Status: Opened Issue is new label Feb 18, 2025
@github-actions github-actions bot changed the title Update pre-commit config to run formatting check on all files Update pre-commit config to run formatting check on all files (IEC-268) Feb 18, 2025
@tomassebestik tomassebestik requested review from tore-espressif and peter-marcisovsky and removed request for tore-espressif February 18, 2025 11:45
@espressif-bot espressif-bot added Status: Selected for Development Issue is selected for development and removed Status: Opened Issue is new labels Feb 18, 2025
@roma-jam roma-jam self-requested a review February 18, 2025 15:56
@tore-espressif
Copy link
Collaborator

@Dazza0 Thank you very much for the PR!

Could you please add exclusion for *.uxf files? We plan to migrate them to Blockdiag, but until then, Umlet keeps reformating these file back ... :/

Copy link
Collaborator

@peter-marcisovsky peter-marcisovsky left a comment

Choose a reason for hiding this comment

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

Thank you for the update. I checked all the modified files, just to make sure we did not delete more than we should. LGTM

Update .pre-commit-config.yaml so that formatting checks (e.g., trailing
whitespaces and line endings) run on all files, instead of only C/C++ files.
Fixes formatting issues (e.g., trailing whitespaces, line endings) caught by
pre-commit when running "pre-commit run --all-files".
@Dazza0 Dazza0 force-pushed the feat/pre_commit_format_checks_all_files branch from b7a41eb to 214b815 Compare February 19, 2025 09:30
@Dazza0
Copy link
Contributor Author

Dazza0 commented Feb 19, 2025

@tore-espressif @peter-marcisovsky Thanks for the quick review. Have added .uxf files as exceptions.

Copy link
Collaborator

@roma-jam roma-jam left a comment

Choose a reason for hiding this comment

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

Thanks for the prompt adding the excluding.
LGTM!

@roma-jam roma-jam merged commit aef6153 into espressif:master Feb 19, 2025
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Selected for Development Issue is selected for development
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants