GithubHelp home page GithubHelp logo

cherryyang05 / mcloc Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 32 KB

Rust学习过程中实现的一个小项目,模仿著名的代码统计工具cloc,实现一个个性化的代码统计工具mcloc

License: GNU General Public License v3.0

Rust 100.00%

mcloc's Introduction

mcloc

mcloc 是一个基于命令行的代码统计工具,使用 Rust 语言实现,由名字可以看出,参考模仿了 cloc 这一工具。该项目旨在学习 Rust 语法知识,运用 Rust 语言对于错误处理的强大功能,掌握用 Rust 进行基础的工程项目开发,以及体验作为系统语言的极高效率,是一个 Rust 入门级项目。

该项目完全开源,会不定期的对现有功能进行迭代开发(尽管本身功能就很简单,大佬轻喷)。

最终期望能够实现的功能如下:

  • 统计若干种编程语言的有效代码行数,空行和注释
  • 可以对单个文件、多个文件进行统计
  • 支持一些参数,例如:排除某些文件或文件夹
  • 可以对文件夹进行递归统计
  • 对压缩文件包进行递归统计
  • 直观展示统计结果
  • 将统计结果导出为图片或 PDF
  • 利用多线程加速代码统计

[LOG]

  • 实现有效代码行数统计
  • 实现 rust 语言代码统计
  • 重构代码(重要)
  • 增加错误处理
  • 优化输出
  • 实现文件夹递归查找有效代码文件

[一些疑问]

  • config 结构体中类型放 String 还是 File
  • 如何用 Command 执行 cargo run 带参数的命令
  • 多参数是否需要多线程

mcloc's People

Contributors

cherryyang05 avatar

Watchers

 avatar  avatar

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.