Skip to content

Commit 20ffe69

Browse files
committed
refactor: Srcinfo bin check command for now
Signed-off-by: Arne Beer <[email protected]>
1 parent f70a1c5 commit 20ffe69

File tree

3 files changed

+1
-35
lines changed

3 files changed

+1
-35
lines changed

alpm-srcinfo/src/cli.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,4 @@ pub enum Command {
7676
#[arg(short, long)]
7777
pretty: bool,
7878
},
79-
/// Read a SRCINFO file from a path or `stdin` and perform linter checks on it.
80-
///
81-
/// This ensures that the SRCINFO file is both **valid** and adheres to currently known best
82-
/// practices.
83-
///
84-
/// Returns with a non-zero exit status as soon as any linting issue is encountered.
85-
#[command()]
86-
Check {
87-
#[arg(value_name = "FILE")]
88-
file: Option<PathBuf>,
89-
90-
/// Provide the SRCINFO schema version to use.
91-
///
92-
/// If no schema version is provided, it will be deduced from the file itself.
93-
#[arg(short, long, value_name = "VERSION")]
94-
schema: Option<SourceInfoSchema>,
95-
},
9679
}

alpm-srcinfo/src/commands.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,6 @@ pub fn validate(file: Option<&PathBuf>, schema: Option<SourceInfoSchema>) -> Res
2424
Ok(())
2525
}
2626

27-
/// Checks a SRCINFO file from a path or stdin strictly.
28-
///
29-
/// THIS FUNCTION DOES CURRENTLY NOT WORK!
30-
/// Due to a refactoring, this function is temporarily under construction.
31-
/// Please refrain from using it or fallback to the previous version.
32-
///
33-
/// # Errors
34-
///
35-
/// Returns an error if any linter warnings, deprecation warnings, unrecoverable logic
36-
/// or parsing errors are encountered while parsing the SRCINFO data.
37-
pub fn check(file: Option<&PathBuf>, schema: Option<SourceInfoSchema>) -> Result<(), Error> {
38-
let _result = parse(file, schema)?;
39-
40-
Ok(())
41-
}
42-
4327
/// Parses a SRCINFO file from a path or stdin and outputs it in the specified format on stdout.
4428
///
4529
/// # Errors

alpm-srcinfo/src/main.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::process::ExitCode;
22

33
use alpm_srcinfo::{
44
cli::{Cli, Command},
5-
commands::{check, format_packages, validate},
5+
commands::{format_packages, validate},
66
};
77
use clap::Parser;
88

@@ -12,7 +12,6 @@ use clap::Parser;
1212
fn main() -> ExitCode {
1313
let cli = Cli::parse();
1414
let result = match cli.command {
15-
Command::Check { file, schema } => check(file.as_ref(), schema),
1615
Command::Validate { file, schema } => validate(file.as_ref(), schema),
1716
Command::FormatPackages {
1817
file,

0 commit comments

Comments
 (0)