-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Code style #381
Code style #381
Conversation
This is mostly a placeholder.
DRAFT Code style automation PLEASE DO NOT MERGE
This is because of a complicated list in installation_summary, a mix of ordered and unordered lists. If we can ignore specific lines, this rule could be enabled on the project and ignored just on that one list.
@springfall2008 this PR is ready for review and merging, see the comments in the PR description, plus also there's one change I made where I think I fixed a spelling mistake but wanted you to confirm above. Make sure you're happy with what this is doing before merging, message me if you want to chat it through more or drop your questions here. |
"unit": "%", | ||
"icon": "mdi:percent", | ||
'default' : 4.0 | ||
"default": 0.0, |
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.
Was the change here to 0 a typo?
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.
That's Git or GitHub doing a bad matching of lines removed / added, and giving the impression the number changed when it hasn't really. Line 309 in green should be matched with 207 in red. And line 311 in green replaces 209-220 in red.
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.
Just to add, the reformatting in here was all automated, so it should be correct, but I'm glad you asked - it worried me when I saw your comment too @springfall2008
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.
PS the only reformatting that has been manual was me shortening some of the lines in the Markdown files by breaking long lines into more shorter lines.
This is applying the coding standards enforcement work done originally in a branch in my repo into
main
on your repo after first pulling it into thecode-style
branch on your repo. You originally reviewed it at #312 .This PR also contains all the fixes needed to
main
to fix spellings, whitespace issues etc.The files in the diff that relate to the actual coding standards verification are the ones in PR #312 that you approved already. They may be slightly modified in this branch (specifically the custom dictionary has more words in it, and one Markdown verification rule has been disabled).
The other files in here are ones changed to fix existing problems in
main
.You can see the commit history has a commit 3400de8 which was automatically done by
pre-commit
, this shows that the permissions you set up have worked correctly.This is now ready to go.
Before you merge it, please make sure you look at the docs I've updated in
developing.md
so you understand how to resolve spelling issues, the importance of using variables inthis_format
instead ofthatformat
(the underscore helps the spell check to check individual words in a variable name), how to run checks locally if you want to. Note, if you do runpre-commit
locally and fix things before pushing, you'll avoid having it do its own auto commits to fix things (although it'll still do it on other people's PRs where they've not run it locally).Also, remember that
pre-commit
will now do commits itself against your branches to fix things. This means that if you're working locally, you'll need to be pulling in those commits onto your local branch, typically by runninggit pull
, so the commits line up properly. Otherwise, you may not be able to push until you've first pulled automatically added commits.Happy to explain any of that further.