Skip to content

Commit

Permalink
initial implments
Browse files Browse the repository at this point in the history
  • Loading branch information
kqito committed Aug 18, 2024
1 parent 47e1d61 commit aef1f0c
Show file tree
Hide file tree
Showing 9 changed files with 659 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
241 changes: 241 additions & 0 deletions Cargo.lock

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

25 changes: 25 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[package]
name = "grepath"
version = "0.1.0"
edition = "2021"
authors = ["kqito"]
description = "Extract paths effortlessly from your command outputs with grepath"
repository = "https://github.com/kqito/grepath"
license = "MIT"
readme = "README.md"
categories = ["command-line-utilities", "text-processing", "parsing", "utilities"]
keywords = ["path", "command-line", "grep", "regex", "extract", "files", "cli"]

[badges]
github = { repository = "kqito/tiny-typescript-transpiler", workflow = "Rust" }

[dependencies]
anyhow = { version = "1.0.82" }
regex = "1.10.4"
thiserror = "1.0.61"
argh = "0.1.10"
atty = "0.2.14"

[dev-dependencies]
pretty_assertions = "1.4.0"

28 changes: 28 additions & 0 deletions error.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
❯ bun tsc --noEmit
src/domains/commu/components/TestCard.tsx:134:11 - error TS2322: Type 'boolean' is not assignable to type 'number'.

134 isRemovable={isRemovable}
~~~~~~~~~~~

src/domains/commu/components/TestCard.tsx:22:3
22 isRemovable: number;
~~~~~~~~~~~
The expected type comes from property 'isRemovable' which is declared here on type 'IntrinsicAttributes & Readonly<{ displayName: string; profileImageUrl: string; badgeImageUrl: string | undefined; authorType: IrvineV1FeedEntryAuthorType; ... 7 more ...; onOpenReportDialog: () => void; }>'

src/domains/commu/components/TestCard.tsx:93:9 - error TS2322: Type 'number' is not assignable to type 'boolean'.

93 isRemovable={isRemovable}
~~~~~~~~~~~

src/domains/commu/components/TestCardContainer.tsx:16:3
16 isRemovable: boolean;
~~~~~~~~~~~
The expected type comes from property 'isRemovable' which is declared here on type 'IntrinsicAttributes & Props'


Found 2 errors in 2 files.

Errors Files
1 src/domains/commu/components/TestListCard.tsx:134
1 src/domains/commu/components/TestListCard.tsx:93
error: "tsc" exited with code 2
24 changes: 24 additions & 0 deletions src/args.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
use argh::FromArgs;

#[derive(FromArgs, PartialEq, Debug)]
/// Args
pub struct Args {
#[argh(positional)]
/// file
pub file: Option<String>,

#[argh(switch, short = 'd')]
/// help
pub debug: Option<bool>,

#[argh(switch, short = 'l')]
/// lines
/// Extract only the file paths without line numbers
/// e.g. src/main.rs
pub lines: Option<bool>,

#[argh(switch, short = 'u')]
/// unique
/// Omit duplicate paths
pub unique: Option<bool>,
}
Loading

0 comments on commit aef1f0c

Please sign in to comment.