From 191eb438411b5964e8fd359420b775de14976adc Mon Sep 17 00:00:00 2001 From: Richard Gomez <32133502+rgmz@users.noreply.github.com> Date: Wed, 25 Sep 2024 09:01:26 -0400 Subject: [PATCH] Revert "remove validate config test temporarily" (#1529) * Revert "remove validate config test temporarily" This reverts commit 1a6d2b0a7a9fae89712d2963d14c686d45ff3c0b. * style: fix lint error --- .github/workflows/test.yml | 3 +++ cmd/directory.go | 1 - cmd/git.go | 12 ++++++------ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4172db9c..07dc79d8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,3 +24,6 @@ jobs: - name: Test run: make test + + - name: Validate Config + run: go generate ./... && git diff --exit-code diff --git a/cmd/directory.go b/cmd/directory.go index 8a052579..656f8679 100644 --- a/cmd/directory.go +++ b/cmd/directory.go @@ -43,7 +43,6 @@ func runDirectory(cmd *cobra.Command, args []string) { // start timer start := time.Now() - detector := Detector(cmd, cfg, source) // set exit code diff --git a/cmd/git.go b/cmd/git.go index 8f033d9f..af0623bd 100644 --- a/cmd/git.go +++ b/cmd/git.go @@ -31,13 +31,13 @@ func runGit(cmd *cobra.Command, args []string) { ) // grab source - source := "." - if len(args) == 1 { - source = args[0] - if source == "" { - source = "." + source := "." + if len(args) == 1 { + source = args[0] + if source == "" { + source = "." + } } - } initConfig(source)