1use std::path::PathBuf;
4use thiserror::Error;
5
6#[derive(Debug, Error)]
8pub enum LintError {
9 #[error("`{0}` does not match the regular expression `{1}` required for code and results directories. Consider changing this directory name or the `code_results_dir_regex` option in your configuration.")]
13 CodeResultsSubdirectoryRegexMismatch(PathBuf, String),
14
15 #[error("The required directory `{0}` does not exist. Consider creating this directory or modifying the top-level directories in your configuration.")]
17 RequiredDirectoryDoesNotExist(PathBuf),
18
19 #[error("The required file `{0}` does not exist. Consider creating this file or modifying the required files in your configuration.")]
21 RequiredFileDoesNotExist(PathBuf),
22
23 #[error("Code subdirectory `{code}` does not have a corresponding subdirectory in the results directory. Consider creating `{results}`.")]
26 CodeSubdirectoryMissingInResults { code: PathBuf, results: PathBuf },
27
28 #[error("Results subdirectory `{results}` does not have a corresponding subdirectory in the code directory. Consider creating `{code}`.")]
31 ResultsSubdirectoryMissingInCode { code: PathBuf, results: PathBuf },
32
33 #[error("The directory `{0}` does not contain a README. Consider creating a README file or changing the `readme_names` option in your configuration.")]
35 SubdirectoryMissingReadme(PathBuf),
36
37 #[error("The directory `{0}` does not contain a workflow. Consider creating a workflow file or changing the `workflow_names` option in your configuration.")]
39 SubdirectoryMissingWorkflow(PathBuf),
40}