Skip to content

Rust formatting in CI#633

Merged
jreidinger merged 12 commits intomasterfrom
formatting_ci
Jun 23, 2023
Merged

Rust formatting in CI#633
jreidinger merged 12 commits intomasterfrom
formatting_ci

Conversation

@jreidinger
Copy link
Copy Markdown
Contributor

@jreidinger jreidinger commented Jun 16, 2023

Problem

Often we have formatting issue with rust code

Solution

Try to add to ci running of rustfmt.

Testing

CI should pass ( does not work yet )

@imobachgs maybe you have idea how to handle it as stable rustfmt is ancient 0.10.0 that cannot do 'check' and nightly uses features from non stable channel.

@coveralls
Copy link
Copy Markdown

coveralls commented Jun 16, 2023

Coverage Status

Changes unknown
when pulling b9a27a1 on formatting_ci
into ** on master**.

@imobachgs
Copy link
Copy Markdown
Contributor

I use rustup to set up my Rust environment (actually, rustup is available as an openSUSE package). Running rustup component add rustfmt should do the trick.

$ rustup component add rustfmt
info: downloading component 'rustfmt'
info: installing component 'rustfmt'
$ rustfmt --version
rustfmt 1.5.2-stable (90c5418 2023-05-31)

@jreidinger jreidinger marked this pull request as ready for review June 22, 2023 13:39

- name: Configure and refresh repositories
# disable unused repositories to have faster refresh
run: zypper modifyrepo -d repo-non-oss repo-openh264 repo-update && ( zypper ref || zypper ref || zypper ref )
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please comment which monster from another dimension is invoked by speaking zypper ref three times ! ! !

Copy link
Copy Markdown
Contributor

@mvidner mvidner Jun 22, 2023

Choose a reason for hiding this comment

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

OK, I see it is copied from other jobs, but still it would be nice to know. I prefer Cth*lhu to Candym*an. @lslezak ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I would say that @lslezak do it to prevent ref failures

@mvidner
Copy link
Copy Markdown
Contributor

mvidner commented Jun 22, 2023

Finally the CI is failing in a good way, complaining about code formatting, yay!! 😭 🤣

@jreidinger
Copy link
Copy Markdown
Contributor Author

I push formatting fix to this branch.
@imobachgs I think it is from your changes. I think your editor does not catch it somehow.

@imobachgs imobachgs changed the title Formatting ci Rust formatting in CI Jun 23, 2023
@imobachgs
Copy link
Copy Markdown
Contributor

I push formatting fix to this branch. @imobachgs I think it is from your changes. I think your editor does not catch it somehow.

I do not know why. I opened the file, made a modification, and everything got properly formatted. Perhaps the formatting was not enabled when I wrote that code.

The good thing is that, now, we will get those problems during CI. 😄

@jreidinger jreidinger merged commit 5c29657 into master Jun 23, 2023
@jreidinger jreidinger deleted the formatting_ci branch June 23, 2023 08:45
@imobachgs imobachgs mentioned this pull request Aug 2, 2023
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.

4 participants