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

Code style #381

Merged
merged 38 commits into from
Nov 30, 2023
Merged

Code style #381

merged 38 commits into from
Nov 30, 2023

Conversation

iainfogg
Copy link
Collaborator

@iainfogg iainfogg commented Nov 27, 2023

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 the code-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 in this_format instead of thatformat (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 run pre-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 running git 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.

iainfogg and others added 7 commits November 27, 2023 21:00
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.
@iainfogg
Copy link
Collaborator Author

@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.

@iainfogg iainfogg changed the title DRAFT: Code style Code style Nov 27, 2023
"unit": "%",
"icon": "mdi:percent",
'default' : 4.0
"default": 0.0,
Copy link
Owner

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?

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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

Copy link
Collaborator Author

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.

@springfall2008 springfall2008 merged commit c51fdcd into main Nov 30, 2023
1 check failed
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