Skip to content
This repository has been archived by the owner on Dec 28, 2021. It is now read-only.

Update code style to use rust fmt. #1823

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

MichaelMauderer
Copy link
Contributor

@MichaelMauderer MichaelMauderer commented Aug 27, 2021

Pull Request Description

Updates the codebase/CI to use rust fmt style and updates the style guide.

[ci no changelog needed]

Important Notes

Check the different commits for better overview of the changes.

Checklist

Please include the following checklist in your PR:

  • The CHANGELOG.md was updated with the changes introduced in this PR.
  • The documentation has been updated if necessary.
  • All code conforms to the Rust style guide.
  • All code has automatic tests where possible.
  • All code has been profiled where possible.
  • All code has been manually tested in the IDE.
  • All code has been manually tested in the "debug/interface" scene.
  • All code has been manually tested by the PR owner against our test scenarios.
  • All code has been manually tested by at least one reviewer against our test scenarios.

@MichaelMauderer MichaelMauderer self-assigned this Aug 27, 2021
@MichaelMauderer MichaelMauderer marked this pull request as ready for review August 27, 2021 11:27
@MichaelMauderer MichaelMauderer force-pushed the wip/mm/apply_rust_fmt_requirement branch from 5b94c33 to 684ece4 Compare August 30, 2021 09:54
@MichaelMauderer MichaelMauderer force-pushed the wip/mm/apply_rust_fmt_requirement branch 4 times, most recently from 25c7639 to 5772d39 Compare August 30, 2021 11:11
docs/contributing/style-guide.md Outdated Show resolved Hide resolved
Comment on lines 183 to 188
### Multiline Expressions
Most (preferably all) expressions should be single line. Multiline expressions
are hard to read and introduce noise in the code. Often, it is also an indicator
of code that is not properly refactored. Try to refactor parts of multiline
expressions to well-named variables, and divide them to several single-line
expressions.
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should consider keeping the requirement of "Try to refactor parts of multiline
expressions to well-named variables", however I'm not very fond of hard "one-line" restriction.

Copy link
Member

@wdanilo wdanilo left a comment

Choose a reason for hiding this comment

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

The formatter is not configured. For example, it folds lines < 100 chars.

@MichaelMauderer MichaelMauderer force-pushed the wip/mm/apply_rust_fmt_requirement branch from 79ef476 to 571227a Compare September 19, 2021 21:22
@MichaelMauderer MichaelMauderer force-pushed the wip/mm/apply_rust_fmt_requirement branch 4 times, most recently from 4b6f170 to b06f06a Compare September 30, 2021 20:07
@MichaelMauderer MichaelMauderer force-pushed the wip/mm/apply_rust_fmt_requirement branch from b06f06a to adceeec Compare October 19, 2021 21:27
@MichaelMauderer MichaelMauderer force-pushed the wip/mm/apply_rust_fmt_requirement branch from adceeec to e278399 Compare October 26, 2021 20:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants