[libvirt-rust] change in coding style to follow rustfmt
jtomko at redhat.com
Wed Jan 29 11:40:10 UTC 2020
On Wed, Jan 29, 2020 at 11:05:35AM +0100, Sahid Orentino Ferdjaoui wrote:
>I'm proposing to merge a change  so the CI would check whether the
>source code is well-formatted using rustfmt .
>The aim is to add an easy convention to follow regarding the coding
>For contributors the natural thing to do before to submit any patches
>is to verify the format using:
>`cargo fmt -v -- --check`
>The support of rustfmt via cargo can be added using:
>`rustup component add rustfmt`
>I did not want to pollute the mailing list with such big change which
>doesn't bring anything.
>Please let me know if you have any objections.
>Author: Sahid Orentino Ferdjaoui <sahid.ferdjaoui at canonical.com>
>Date: Tue Jan 28 15:05:44 2020 +0100
> ensure that the code is well formatted using rustfmt.
> In this commit we add CI rule so travis would check whether the code
> is well formatted using rustfmt.
> Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui at canonical.com>
> .travis.yml | 4 +
> diff --git a/.travis.yml b/.travis.yml
> index fc2c8f4..2e88aec 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -39,9 +39,13 @@ install:
> - sudo chmod a+rwx /var/run/libvirt/libvirt-sock*
> - echo "pass" | sudo saslpasswd2 -p -a libvirt user
> + - rustup component add rustfmt
> + - cargo fmt -v -- --check;
Why the semicolon at the end of this command?
> - cargo test --verbose
> # Due to an issue fixed in master we should not consider running
> # integration tests in parallel.
> # see: https://www.redhat.com/archives/libvir-list/2019-July/msg00287.html
> - cargo test --verbose -- --ignored --test-threads=1
Reviewed-by: Ján Tomko <jtomko at redhat.com>
to commit 851296786626d61ebec985a9caeb515514955dd8
(and all its hash collision that pass the CI :))
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 488 bytes
Desc: not available
More information about the libvir-list