towl 0.3.7

A fast CLI tool to scan codebases for TODO comments and output them in multiple formats
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use thiserror::Error;

use crate::comment::error::TowlCommentError;

/// Errors from compiling or applying regex patterns for TODO detection.
#[derive(Error, Debug)]
pub enum TowlParserError {
    #[error("Pattern {0} is not a valid regex pattern for a supported todo")]
    InvalidRegexPattern(String, regex::Error),
    #[error("Config pattern {0} is not valid")]
    UnknownConfigPattern(#[from] TowlCommentError),
    #[error("Regex capture group 0 missing from successful match")]
    RegexGroupMissing,
    #[error("Pattern length {0} exceeds maximum of {1} characters")]
    PatternTooLong(usize, usize),
    #[error("Total pattern count {count} exceeds maximum of {max_allowed} across all categories")]
    TooManyTotalPatterns { count: usize, max_allowed: usize },
}