[][src]Trait lmake_lines_of_code::TraitCountLines

pub trait TraitCountLines {
    fn workspace_or_project_count_lines(&self) -> LinesOfCode;
fn process_git_remote(&self) -> String; }

Traits and methods must be used for the mocking library.

Required methods

Loading content...

Implementors

impl TraitCountLines for AppObject[src]

fn workspace_or_project_count_lines(&self) -> LinesOfCode[src]

Returns the struct LinesOfCode for 4 types of lines: code, doc comments, comments, test and examples. Automatically detects if this is a workspace or single rust project.

Example

use lmake_lines_of_code::*;

let app = AppObject{};
let v = app.workspace_or_project_count_lines();
dbg!(&v);

fn process_git_remote(&self) -> String[src]

Return the string for link for badges like: https://github.com/LucianoBestia/lmake_lines_of_code/.
Get the output string after $ git remote -v.
Then finds out the link to the repository with regex.
Returns empty string if something goes wrong: no git, no remote,...

impl TraitCountLines for MockTraitCountLines[src]

Loading content...