Skip to content

Commit

Permalink
feat: add version and help flag
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkuridza committed May 3, 2024
1 parent 9fff8dd commit 130c425
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 0 deletions.
113 changes: 113 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ reqwest = { version = "0.12.4", features = ["blocking"] }
regex = "1.10.4"
serde_yaml = "0.9.34"
crc64 = "2.0.0"
clap = { version = "4.5.4", features = ["derive"] }

[lints.clippy]
all = "deny"
Expand Down
7 changes: 7 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use anyhow::anyhow;
use clap::Parser;
use log::{error, info, LevelFilter};
use regex::Regex;
use serde::{Deserialize, Serialize};
Expand All @@ -20,6 +21,10 @@ use crate::gitlab_ci_ls_parser::messages;

mod gitlab_ci_ls_parser;

#[derive(Parser, Debug)]
#[command(version, about, long_about = None)]
struct Args {}

#[derive(Serialize, Deserialize, Debug)]
struct InitializationOptions {
#[serde(default = "default_package_map")]
Expand Down Expand Up @@ -57,6 +62,8 @@ fn default_cache_path() -> String {

#[allow(clippy::too_many_lines)]
fn main() -> Result<(), Box<dyn Error + Sync + Send>> {
Args::parse();

let (connection, io_threads) = Connection::stdio();

let server_capabilities = serde_json::to_value(ServerCapabilities {
Expand Down

0 comments on commit 130c425

Please sign in to comment.