From 343247c332b232bb6ee96f53388a92fd4a09c3d7 Mon Sep 17 00:00:00 2001 From: Mayowa Afe-Ogundele Date: Fri, 19 Aug 2022 09:56:54 +0100 Subject: [PATCH 1/4] Added CI Job for linting Markdowns --- .github/workflows/build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 51aa61f..7a92353 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,6 +6,13 @@ env: CARGO_TERM_COLOR: always jobs: + lint-markdowns: + name: Lint markdown files + runs-on: ubuntu-latest + steps: + - name: Lint markdown files + - uses: actionshub/markdownlint@main + build: name: 🔨Build release runs-on: ubuntu-latest From 7cda0e89a14bc5b154edc134965ab24268263f9b Mon Sep 17 00:00:00 2001 From: Mayowa Afe-Ogundele Date: Fri, 19 Aug 2022 10:23:02 +0100 Subject: [PATCH 2/4] Fixed warning issues that causes linting to fail --- src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index fa54e9f..e59a43e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,3 @@ -use std::path::PathBuf; use structopt::StructOpt; /// A basic example @@ -44,7 +43,7 @@ enum Opt { Help {}, } -fn download_package(package_name: String, package_index: &String) {} +fn download_package(_package_name: String, _package_index: &String) {} fn main() { let opt = Opt::from_args(); From 49ecc3354002dee2c194b9e85fbf7220922c2633 Mon Sep 17 00:00:00 2001 From: Mayowa Afe-Ogundele Date: Fri, 19 Aug 2022 10:28:25 +0100 Subject: [PATCH 3/4] Fixed issue with linting on build.yml file --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7a92353..c9a570f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Lint markdown files - - uses: actionshub/markdownlint@main + uses: actionshub/markdownlint@main build: name: 🔨Build release From 4f0c6b46763abc7300714af9286ce978ce21c504 Mon Sep 17 00:00:00 2001 From: Mayowa Afe-Ogundele Date: Fri, 19 Aug 2022 10:35:37 +0100 Subject: [PATCH 4/4] Fixed Clippy Error: writing instead of involves a new object where a slice will do --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index e59a43e..6e61e3f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -43,7 +43,7 @@ enum Opt { Help {}, } -fn download_package(_package_name: String, _package_index: &String) {} +fn download_package(_package_name: String, _package_index: &str) {} fn main() { let opt = Opt::from_args();