Skip to content
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

Merged
merged 3 commits into from
Oct 10, 2018
Merged

Conversation

vkuznecovas
Copy link
Contributor

No description provided.

.gitignore Outdated
@@ -0,0 +1,14 @@
# Binaries for programs and plugins
*.exe
Copy link
Member

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"}
Copy link
Member

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 {
Copy link
Member

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 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CheckGoimports

Copy link
Member

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

}

// GoReport updates the go report for the given repo
func GoReport(pkg string) error {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repo?

if path == "" {
path = "../..."
}
out, err := sh.Output("go", "vet", "-composites=false", path)
Copy link
Member

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.
@vkuznecovas vkuznecovas requested a review from soffokl October 9, 2018 09:26
)

// GoVet checks that the source is compliant with go vet
func GoVet(path string, aditionalArgs ...string) error {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: additional

}

func formatAndPrintGoLintOutput(rawGolint string) {
packageErrorMap := make(map[string][]string, 0)
Copy link
Member

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


```
Copy link
Member

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

```
Copy link
Member

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:
Copy link
Member

@soffokl soffokl Oct 10, 2018

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/

@vkuznecovas vkuznecovas merged commit 1112ad2 into master Oct 10, 2018
@vkuznecovas vkuznecovas deleted the migrate-tools branch October 10, 2018 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants