File tree 3 files changed +48
-21
lines changed
3 files changed +48
-21
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,14 @@ lint: $(TOOLS_BIN)/golangci-lint
61
61
@echo " ==> Linting code with 'golangci-lint'..."
62
62
@$(TOOLS_BIN ) /golangci-lint run ./...
63
63
64
+ # # lint: Lint code with golangci-lint.
65
+ .PHONY : lint-fix
66
+ lint-fix : $(TOOLS_BIN ) /golangci-lint
67
+ @echo " ==> Linting and fixing code with 'golangci-lint'..."
68
+ @$(TOOLS_BIN ) /golangci-lint run --fix ./...
69
+
70
+
71
+
64
72
# # test: Run all tests.
65
73
.PHONY : test
66
74
test :
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ /*
2
+ * © 2025 Snyk Limited
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ package scans
18
+
19
+ import (
20
+ "context"
21
+ "testing"
22
+
23
+ "github.com/rs/zerolog"
24
+ "github.com/stretchr/testify/require"
25
+
26
+ "github.com/snyk/go-application-framework/pkg/configuration"
27
+
28
+ "github.com/snyk/snyk-ls/internal/testsupport"
29
+ )
30
+
31
+ func TestPreScanCommand_ExecutePreScanCommand (t * testing.T ) {
32
+ testsupport .NotOnWindows (t , "we call a posix file" )
33
+ logger := zerolog .New (zerolog .NewConsoleWriter (zerolog .ConsoleTestWriter (t )))
34
+ conf := configuration .NewWithOpts (configuration .WithAutomaticEnv ())
35
+ cut := NewPreScanCommand (conf , "/bin/ls" , logger )
36
+
37
+ err := cut .ExecutePreScanCommand (context .Background ())
38
+
39
+ require .NoError (t , err )
40
+ }
You can’t perform that action at this time.
0 commit comments