Giter Club home page Giter Club logo

ronat's People

Contributors

hobofan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ronat's Issues

Lint: wrong parameter names

Via docstrings

Example:

/// This is an header.
///
/// # Parameters
///
/// - `foo`: Incorrect variable name
#[deny(doc_params_mismatch)]
pub fn somefunction(bar: isize) {
}

Should give a warning that there is no parameter named foo.

Add more lints

Some lints on simple grammar and language style would be nice.

Lint: parameter order

Via docstrings

Example:

/// This is an header.
///
/// # Parameters
///
/// - `second`: Another parameter
/// - `first`: Some parameter
#[deny(doc_params_unordered)]
pub fn somefunction(first: isize, second: usize) {
}

Should give a warning that baz is documented before bar. Not sure if that provides much value, but why not? ๐Ÿ˜„

Add Cargo command

Having a cargo command that acts similar to the way clippy does, would be awesome to have.

Show correct location of spelling error

Currently, the markdown parser that is used destroys the line/character information, making it hard to impossible to restore the correct association to the misspelled word in the original comment.

One easy workaround would be to search for the misspelled word in the original comment, which could lead to finding the wrong instance of the word. This might not be a problem, since every instance of the misspelled word should be marked.

Another solution would be to replace the markdown parser with a pull-parser, which should make it easier to keep the association to the original comment location.

Lint: missing parameters

Via docstrings

Example:

/// This is an header.
///
/// # Parameters
///
/// - `bar`: Some parameter
#[deny(doc_params_incomplete)]
pub fn somefunction(bar: isize, baz: usize) {
}

Should give a warning that there is no documentation for baz. Should only error if at least one of the parameters is documented.

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.