Просмотр исходного кода

Revert "remove validate config test temporarily" (#1529)

* Revert "remove validate config test temporarily"

This reverts commit 1a6d2b0a7a9fae89712d2963d14c686d45ff3c0b.

* style: fix lint error
Richard Gomez 1 год назад
Родитель
Сommit
191eb43841
3 измененных файлов с 9 добавлено и 7 удалено
  1. 3 0
      .github/workflows/test.yml
  2. 0 1
      cmd/directory.go
  3. 6 6
      cmd/git.go

+ 3 - 0
.github/workflows/test.yml

@@ -24,3 +24,6 @@ jobs:
 
       - name: Test
         run: make test
+
+      - name: Validate Config
+        run: go generate ./... && git diff --exit-code

+ 0 - 1
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

+ 6 - 6
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)