Giter VIP home page Giter VIP logo

cargo-toml-format's Introduction

Hi There ๐Ÿ‘‹

LinkedIn Medium Website

C# Rust C++ Python HTML5 CSS3 JavaScript Java PHP Elixir Lua

Unreal Engine Unity Vulkan Opengl Godot

cargo-toml-format's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

jayvdb

cargo-toml-format's Issues

taplo-cli

Not sure if you're aware of, but a general purpose toml formatter exists. It's rather flexible and I use it for CI already. Might be worth a look :)

fn main is empty

It is a bit misleading to have a main.rs with a fn main , which lets Rust believe the git repo can be installed as a binary, but it does nothing.

It shouldnt be too hard to fill in this function with a simple routine to load Cargo.toml from the current directory, apply whatever formatting routines are at alpha quality, and write it back out to disk or stdout.

Feature idea: lint workspace dependencies

Hi Timon, big fan of your crates, had this idea:

  1. In cargo_fmt_manifest.toml:

    workspace-only-dependencies = [
        "clap",
        "crossterm",
        "tokio",
    ]
  2. This should now be an error:

    [dependencies]
    clap = "4.1"

    e.g.:

    Error: clap is defined at the workspace level, yet its version is specified as "4.1". Please specify it
    as clap = { workspace = true }. See:

    https://doc.rust-lang.org/cargo/reference/workspaces.html#the-dependencies-table

    Hmm, the error message should probably also mention the workspace-only-dependencies array.

What do you think?

tests fail to build

Using stable:

error[E0423]: expected value, found crate `toml`
  --> tests/sandbox.rs:44:44
   |
44 |     let mut cargo = CargoToml::from_config(toml.to_string(), config).unwrap();
   |                                            ^^^^- help: use the path separator to refer to an item: `::`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.