GithubHelp home page GithubHelp logo

deglobber's Introduction

deglobber's People

Contributors

nrc avatar

Watchers

 avatar  avatar  avatar

deglobber's Issues

take a filename filter argument

The deglobber should take an argument which filters by filename. E.g., deglob -f foo.rs would only modify files called foo.rs.

Use save-analysis rather than running the compiler

It would be easier, and I think more DRY, to first run the compiler with --save-analysis, then use that output as input to the deglobber, rather than doing a partial compile as part of deglobbing. Otherwise being able to run over rustc or other projects with complicated build processes is going to be not-fun.

To make this usable, we'll probably want to implement --save-analysis for Cargo, if that can't be easily done already.

The downside of this is that it makes the deglobbing process more complicated than just running a single command. Also the deglobber is a nice proof of concept for a tool using librusc as a library.

Allow the user to customise the replacement style

Sensible options seem to be:

  • one big list of imports: use foo::{a, b, c, d, ...};
  • one import per line:
use foo::a;
use foo::b;
...
  • the maximum number of imports per line whilst keeping the line length under some user supplied n, defaulting to 80:
use foo::{a, b, c};
use foo::{d, e};

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.