-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
903 changed files
with
323,338 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
tags | ||
dist | ||
lilipod | ||
*.sh | ||
TODO.* | ||
bin/ | ||
pkg/constants/pty.tar.gz | ||
pty.tar.gz | ||
pty | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
--- | ||
# All possible options can be found here | ||
# https://github.com/golangci/golangci-lint/blob/master/.golangci.reference.yml | ||
# Deprecated | ||
# - deadcode | ||
# - golint | ||
# - interfacer | ||
# - maligned | ||
# - scopelint | ||
# - structcheck | ||
# - varcheck | ||
# - exhaustivestruct | ||
# - ifshort | ||
# - nosnakecase | ||
linters-settings: | ||
# Allow names like fd for file descriptors, or id for identifiers. | ||
varnamelen: | ||
min-name-length: 2 | ||
nestif: | ||
min-complexity: 10 | ||
gosec: | ||
excludes: | ||
- G204 # We actually need to launch programs with a variable name. | ||
- G301 # We actually need to set permissions higher than 0750. | ||
- G302 # We actually need to set permissions higher than 0600. | ||
- G304 # Yes we use variables for file names. | ||
- G401 # We actually use md5 only to create IDs, it's ok. | ||
- G501 # like above. | ||
|
||
issues: | ||
exclude-use-default: false | ||
max-issues-per-linter: 0 | ||
max-same-issues: 0 | ||
|
||
linters: | ||
# enable-all: true | ||
fase: false | ||
disable: | ||
- exhaustruct # too noisy | ||
- gomnd # too noisy | ||
- forbidigo # I need to use println this is a CLI app. | ||
- gochecknoglobals # Sometimes they are useful. | ||
- goerr113 # I do use fmt.Errorf, allocating all of them at the start is counter productive. | ||
- cyclop # To be enabled in the future | ||
- funlen # To be enabled in the future | ||
- gocognit # To be enabled in the future | ||
- gocyclo # To be enabled in the future | ||
- wrapcheck # To be enabled in the future | ||
enable: | ||
- asasalint | ||
- asciicheck | ||
- bidichk | ||
- bodyclose | ||
- containedctx | ||
- contextcheck | ||
- decorder | ||
- dogsled | ||
- dupl | ||
- dupword | ||
- durationcheck | ||
- errcheck | ||
- errchkjson | ||
- errname | ||
- errorlint | ||
- execinquery | ||
- exhaustive | ||
- exportloopref | ||
- forcetypeassert | ||
- gci | ||
- ginkgolinter | ||
- gocheckcompilerdirectives | ||
- gochecknoinits | ||
- goconst | ||
- gocritic | ||
- godot | ||
- godox | ||
- gofmt | ||
- gofumpt | ||
- goheader | ||
- goimports | ||
- gomoddirectives | ||
- gomodguard | ||
- goprintffuncname | ||
- gosec | ||
- gosimple | ||
- gosmopolitan | ||
- govet | ||
- grouper | ||
- importas | ||
- ineffassign | ||
- interfacebloat | ||
- ireturn | ||
- lll | ||
- loggercheck | ||
- maintidx | ||
- makezero | ||
- mirror | ||
- misspell | ||
- musttag | ||
- nakedret | ||
- nestif | ||
- nilerr | ||
- nilnil | ||
- nlreturn | ||
- noctx | ||
- nolintlint | ||
- nonamedreturns | ||
- nosprintfhostport | ||
- paralleltest | ||
- prealloc | ||
- predeclared | ||
- promlinter | ||
- reassign | ||
- revive | ||
- rowserrcheck | ||
- sqlclosecheck | ||
- staticcheck | ||
- stylecheck | ||
- tagalign | ||
- tagliatelle | ||
- tenv | ||
- testableexamples | ||
- testpackage | ||
- thelper | ||
- tparallel | ||
- typecheck | ||
- unconvert | ||
- unparam | ||
- unused | ||
- usestdlibvars | ||
- varnamelen | ||
- wastedassign | ||
- whitespace | ||
- wsl | ||
- zerologlint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
.PHONY: all lilipod pty coverage | ||
|
||
all: clean pty lilipod | ||
|
||
clean: | ||
@rm -f lilipod | ||
@rm -f pty | ||
@rm -f pty.tar.gz | ||
|
||
lilipod: | ||
@rm -f lilipod | ||
CGO_ENABLED=0 go build -mod vendor -ldflags="-s -w -X 'github.com/89luca89/lilipod/pkg/constants.Version=$${RELEASE_VERSION:-0.0.0}'" -o lilipod main.go | ||
|
||
coverage: | ||
@rm -rf coverage/* | ||
@mkdir -p coverage | ||
CGO_ENABLED=0 go build -mod vendor -cover -o coverage/pty ptyagent/main.go ptyagent/pty.go | ||
@rm -f pty | ||
@rm -f pty.tar.gz | ||
CGO_ENABLED=0 go build -mod vendor -gcflags=all="-l -B -C" -ldflags="-s -w" -o pty ptyagent/main.go ptyagent/pty.go | ||
tar czfv pty.tar.gz pty | ||
CGO_ENABLED=0 go build -mod vendor -cover -o coverage/lilipod main.go | ||
|
||
pty: | ||
@rm -f pty | ||
@rm -f pty.tar.gz | ||
CGO_ENABLED=0 go build -mod vendor -gcflags=all="-l -B -C" -ldflags="-s -w -X 'main.version=$${RELEASE_VERSION:-0.0.0}'" -o pty ptyagent/main.go ptyagent/pty.go | ||
tar czfv pty.tar.gz pty |
Oops, something went wrong.