Skip to content

Include rustfmt and clippy components by default #37

Closed
@tyranron

Description

@tyranron

I know this issue has been raised already a couple of times (#16, #36, even by me). But with latest stable 1.31 release and 2018 edition landing, the clippy and rustfmt components are part of stable toolchain (so no versions mess). Maybe they worth to be included into rust image by default as are widely used in comparing to other rustup components?

The current situation with CI is relatively OK:

fmt:rust:
  stage: test
  dependencies: []
  image: rust:1.31
  services: []
  before_script:
    - rustup component add rustfmt
  script:
    - cargo fmt --check

But is trickier when it comes to CLI Docker usage:

docker run --rm -v "$(pwd)":/app -w /app rust:1.31 cargo fmt
error: 'cargo-fmt' is not installed for the toolchain '1.31.0-x86_64-unknown-linux-gnu'
To install, run `rustup component add rustfmt`

Having them baked into the image already will make its usage smoother for almost any project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions