forked from oxsecurity/megalinter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
go.megalinter-descriptor.yml
99 lines (99 loc) 路 3.73 KB
/
go.megalinter-descriptor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
descriptor_id: GO
descriptor_type: language
descriptor_flavors:
- cupcake
- go
file_extensions:
- ".go"
test_folder: golang
linters:
# GOLANG CI LINT
- linter_name: golangci-lint
linter_url: https://golangci-lint.run/
linter_repo: https://github.com/golangci/golangci-lint
linter_rules_url: https://golangci-lint.run/usage/linters/
linter_banner_image_url: https://repository-images.githubusercontent.com/132145189/05239680-dfaf-11e9-9646-2c3ef2f5f8d4
linter_rules_configuration_url: https://golangci-lint.run/usage/configuration/#config-file
linter_rules_inline_disable_url: https://golangci-lint.run/usage/false-positives/#nolint
config_file_name: .golangci.yml
cli_lint_mode: project
cli_lint_extra_args:
- "run"
cli_lint_fix_arg_name: --fix
cli_version_arg_name: "version"
version_extract_regex: "((\\d+(\\.\\d+)+)|(master))"
examples:
- "golangci-lint run myfile.go"
- "golangci-lint run -c .golangci.yml myfile.go"
install:
apk:
- go
dockerfile:
- |
RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh \
&& golangci-lint --version
ide:
atom:
- name: go-plus
url: https://atom.io/packages/go-plus
emacs:
- name: flycheck-golandci-lint
url: https://github.com/weijiangan/flycheck-golangci-lint
- name: SpaceMacs
url: https://github.com/syl20bnr/spacemacs/blob/develop/layers/+lang/go/README.org#pre-requisites
goland:
- name: goland
url: https://www.jetbrains.com/help/go/settings-tools-file-watchers.html
sublime:
- name: SublimeLinter-contrib-golang-cilint
url: https://github.com/alecthomas/SublimeLinter-contrib-golang-cilint
vim:
- name: vim-go
url: https://github.com/fatih/vim-go
vscode:
- name: vscode.Go
url: https://marketplace.visualstudio.com/items?itemName=ms-vscode.Go
# REVIVE
- linter_name: revive
can_output_sarif: true
linter_url: https://revive.run/
linter_repo: https://github.com/mgechev/revive
linter_rules_url: https://revive.run/r
linter_image_url: https://github.com/mgechev/revive/raw/master/assets/logo.png
linter_rules_configuration_url: https://revive.run/docs#custom-configuration
config_file_name: revive.toml
cli_config_arg_name: "-config"
cli_lint_mode: list_of_files
cli_lint_extra_args:
- -set_exit_status
cli_sarif_args:
- -formatter
- sarif
cli_help_arg_name: "-help"
cli_version_arg_name: "-version"
help_command_return_code: 0
examples:
- "revive myfile.go"
- "revive -config myfile.go"
install:
dockerfile:
## Until "FROM ghcr.io/mgechev/revive:1.2.5 as revive" is available, use
# - FROM ghcr.io/mgechev/revive:1.2.5 as revive
# - COPY --link --from=revive /usr/bin/revive /usr/bin/revive
- |
FROM golang:1-alpine as revive
## The golang image used as a builder is a temporary workaround (https://github.com/mgechev/revive/issues/787)
## for the released revive binaries not returning version numbers (devel).
## The install command should then be what is commented in the go.megalinter-descriptor.yml
RUN GOBIN=/usr/bin go install github.com/mgechev/revive@latest
- COPY --link --from=revive /usr/bin/revive /usr/bin/revive
ide:
atom:
- name: linter-revive
url: https://github.com/morphy2k/linter-revive
vim:
- name: ale
url: https://github.com/dense-analysis/ale
vscode:
- name: vscode.Go
url: https://marketplace.visualstudio.com/items?itemName=ms-vscode.Go