-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
moved the ci tools from go-openvpn to goci #1
Conversation
7c2c296
to
c8f3875
Compare
c8f3875
to
39b0e5c
Compare
.gitignore
Outdated
@@ -0,0 +1,14 @@ | |||
# Binaries for programs and plugins | |||
*.exe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why to push files, which is not actual for this repo
README.md
Outdated
|
||
// ExludedDirs contains the list of directories that we'll exclude for the repo | ||
var ExludedDirs = []string{".git", "vendor", "build", "docs"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go list ./..
solves problem better ;)
Scans only for Go packages and skips additional configuration of some dirs
README.md
Outdated
|
||
// Checks for copyright headers in files | ||
func Copyright() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CheckCopyright
README.md
Outdated
|
||
// Checks for issues with go imports | ||
func GoImports() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CheckGoimports
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actualy would be design have syntax mage check [standard]
:
mage check
- performs all quality checks (CheckCopyright
,CheckGolint
,CheckGoomports
)mage check copyright
- checks only specific quality standard
commands/command_goreport.go
Outdated
} | ||
|
||
// GoReport updates the go report for the given repo | ||
func GoReport(pkg string) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
repo
?
commands/command_govet.go
Outdated
if path == "" { | ||
path = "../..." | ||
} | ||
out, err := sh.Output("go", "vet", "-composites=false", path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-composites=false
should be injected by project, and currently is needed only in node
project
…ossibility to run all the common checks via single command.
433ba63
to
e80badc
Compare
commands/command_govet.go
Outdated
) | ||
|
||
// GoVet checks that the source is compliant with go vet | ||
func GoVet(path string, aditionalArgs ...string) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: additional
commands/command_golint.go
Outdated
} | ||
|
||
func formatAndPrintGoLintOutput(rawGolint string) { | ||
packageErrorMap := make(map[string][]string, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it can be packageErrorMap := make(map[string][]string)
README.md
Outdated
|
||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest adding syntax highlighting ```golang
README.md
Outdated
To use it, include a makefile in root of your repo directory | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest adding syntax highlighting ```makefile
README.md
Outdated
|
||
|
||
Then, create a ci folder to contain all the mage files you need. To include the common scripts from this library, a following file is suggested: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ci
-> CI
or mark it with quotes somehow or ci/
No description provided.