This repository contains code style guides and continuous integration workflows.
It is a living document, and will be updated as we learn more about what works and what doesn't.
Table of Contents |
---|
Go - style guide |
Lint - customized linter |
Hooks - git hooks |
CI - reference |
Build - script/makefile |
Badge |
File | Description |
---|---|
.golangci.yml | Linting configuration for golangci-lint |
git hooks for pre-commit.
File | Description |
---|---|
hooks/pre-commit | Pre-commit hook for golangci-lint |
ci directory contains the workflows for testing, linting, building and deploy the code.
Workflow | Description |
---|---|
ci/github-lib | Build, lint and test (SonarCloud) |
Copy the workflow you want to use into your repository:
cp -a ci/github-lib/. <myrepo>/.github
SONAR_TOKEN is required in most workflows.
Token already exists in the our organization secrets.
SonarCloud not supported direct initialize a new repo.
First init repo in SonarCloud after that go to the administation -> Analysis Method -> Disable automatic analysis. And just restart the failed workflow.
build directory contains the building scripts. Change project variables in build file.
File | Description |
---|---|
build/Makefile | Build script for Go projects |
build/.goreleaser.yaml | Goreleaser script |