Skip to content

Conversation

@Guelakais
Copy link
Contributor

  • This commit fixes mistakes introduced in the previous "Refactoring Of Dependency usage" pull request (Refactoring Of Dependency usage #387).
  • I apologize for any inconvenience caused.
  • The main addition remains the .rustfmt.toml file, which is now correctly included in all cargo projects. This enables streamlined code formatting using cargo-fmt inside a cargo project.
    The Changes inside the .rustfmt.toml are:
imports_granularity = "Crate"
array_width = 60
attr_fn_like_width = 70
brace_style = "SameLineWhere"
combine_control_expr = false
comment_width = 80
wrap_comments = true

GueLaKais added 30 commits April 9, 2024 11:48
* Set import granularity to 'Crate' for better organization.
* Adjusted array width to 60 characters for readability.
* Increased attribute function-like width to 70 characters.
* Enabled 'SameLineWhere' brace style for consistency.
* Disabled combining control expressions for clarity.
* Set comment width to 80 characters.
* Enabled comment wrapping to improve readability on narrow screens.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
GueLaKais added 11 commits April 9, 2024 11:54
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
* Set import granularity to 'Crate' for better organization.
* Adjusted array width to 60 characters for readability.
* Increased attribute function-like width to 70 characters.
* Enabled 'SameLineWhere' brace style for consistency.
* Disabled combining control expressions for clarity.
* Set comment width to 80 characters.
* Enabled comment wrapping to improve readability on narrow screens.
* Set import granularity to 'Crate' for better organization.
* Adjusted array width to 60 characters for readability.
* Increased attribute function-like width to 70 characters.
* Enabled 'SameLineWhere' brace style for consistency.
* Disabled combining control expressions for clarity.
* Set comment width to 80 characters.
* Enabled comment wrapping to improve readability on narrow screens.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
* Set import granularity to 'Crate' for better organization.
* Adjusted array width to 60 characters for readability.
* Increased attribute function-like width to 70 characters.
* Enabled 'SameLineWhere' brace style for consistency.
* Disabled combining control expressions for clarity.
* Set comment width to 80 characters.
* Enabled comment wrapping to improve readability on narrow screens.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
This commit updates the code formatting configuration for this project.

Refer to the project-specific `.rustfmt.toml` file (located alongside
Cargo.toml) for details on the specific formatting changes made.
@Guelakais
Copy link
Contributor Author

By the way, watching the test process is quite exciting. How can you do the same thing that your test process does locally?

@mxgrey
Copy link
Collaborator

mxgrey commented Apr 9, 2024

Sorry to be picky, but I have a few concerns to consider:

  • rustfmt will search recursively through parent directories to find a .rustfmt.toml file, so we don't need to add the file to each package. We can just have one .rustfmt.toml file at the root of the repository. I just checked locally that this works as expected. We should prefer one style configuration file for the whole project so that if there is ever a decision to modify the style in the future, we can do that easily in one file.
  • In the working group there was a consensus on merging imports, but that was the only style change discussed. I don't think it's a good idea to introduce other style changes without checking on how the group feels. It will be a month until the next meeting, but we could drop a message in the matrix chat.
  • After testing locally, I discovered that almost all of the style settings are currently unstable, which means they require the nightly channel in order for rustfmt to actually use them. This means we won't actually be able to enforce these style settings through CI for now, which is disappointing. There's nothing we can do about this point, I'm just stating an observation.

@Guelakais Guelakais closed this by deleting the head repository Apr 9, 2024
@esteve
Copy link
Collaborator

esteve commented Apr 9, 2024

Superseded by #389

@esteve esteve mentioned this pull request Apr 9, 2024
esteve pushed a commit that referenced this pull request Apr 9, 2024
* adde .rustfmt.toml to main repository folder

* added rust_formatter.sh

* added content to the rust_formatter.sh

* removed rust_formatter.sh for better performance

* modechange

* Run rustfmt

Signed-off-by: Michael X. Grey <mxgrey@intrinsic.ai>

* Run rustfmt

Does change the things described in the newly added `.rustfmt.toml`

* Run rustfmt

Does change the things described in the newly added `.rustfmt.toml`

* Run rustfmt

Does change the things described in the newly added `.rustfmt.toml`

* Run rustfmt

Does change the things described in the newly added `.rustfmt.toml`

* Run rustfmt

Does change the things described in the newly added `.rustfmt.toml`

* Run rustfmt

Does change the things described in the newly added `.rustfmt.toml`

* Run rustfmt

Does change the things described in the newly added `.rustfmt.toml`

* Run rustfmt

Does change the things described in the newly added `.rustfmt.toml`

* Run rustfmt

Does change the things described in the newly added `.rustfmt.toml`

* Run rustfmt

Does change the things described in the newly added `.rustfmt.toml`

* Run rustfmt

Does change the things described in the newly added `.rustfmt.toml`

* Run rustfmt

Does change the things described in the newly added `.rustfmt.toml`

* Run rustfmt

Does change the things described in the newly added `.rustfmt.toml`

* Run rustfmt

Does change the things described in the newly added `.rustfmt.toml`

* Run rustfmt

Does change the things described in the newly added `.rustfmt.toml`

* Run rustfmt

Does change the things described in the newly added `.rustfmt.toml`

* Run rustfmt

Does change the things described in the newly added `.rustfmt.toml`

* Run rustfmt

Does change the things described in the newly added `.rustfmt.toml`

* Run rustfmt

Does change the things described in the newly added `.rustfmt.toml`

* Run rustfmt

Does change the things described in the newly added `.rustfmt.toml`

* Run rustfmt

Does change the things described in the newly added `.rustfmt.toml`

* Run rustfmt

Does change the things described in the newly added `.rustfmt.toml`

* Run rustfmt

Does change the things described in the newly added `.rustfmt.toml`

* Run rustfmt

Does change the things described in the newly added `.rustfmt.toml`

* Run rustfmt

Does change the things described in the newly added `.rustfmt.toml`

---------

Signed-off-by: Michael X. Grey <mxgrey@intrinsic.ai>
Co-authored-by: GueLaKais <koroyeldores@gmail.com>
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.

3 participants