-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(pre-commit): add precommit and commitlint
Signed-off-by: Dusan Malusev <[email protected]>
- Loading branch information
1 parent
9b15797
commit c606262
Showing
17 changed files
with
587 additions
and
196 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
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
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
cmd/gemini/dist/ | ||
/gemini | ||
.idea | ||
.vscode | ||
bin/ | ||
coverage.txt | ||
dist/ |
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
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,36 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- repo: https://github.com/scop/pre-commit-shfmt | ||
rev: v3.9.0-1 | ||
hooks: | ||
- id: shfmt | ||
- repo: https://github.com/jorisroovers/gitlint | ||
rev: v0.19.1 | ||
hooks: | ||
- id: gitlint | ||
- repo: https://github.com/koalaman/shellcheck-precommit | ||
rev: v0.10.0 | ||
hooks: | ||
- id: shellcheck | ||
- repo: https://github.com/tekwizely/pre-commit-golang | ||
rev: v1.0.0-rc.1 | ||
hooks: | ||
- id: go-build-repo-mod | ||
- id: go-mod-tidy-repo | ||
- id: go-vet-repo-mod | ||
- id: go-sec-repo-mod | ||
- id: go-fumpt-repo | ||
- id: golangci-lint-repo-mod | ||
args: ['--fix'] | ||
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook | ||
rev: v9.18.0 | ||
hooks: | ||
- id: commitlint | ||
stages: [commit-msg] | ||
additional_dependencies: ['@commitlint/config-conventional'] |
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 @@ | ||
{ | ||
"recommendations": [ | ||
"ms-vscode-remote.remote-containers", | ||
"ms-azuretools.vscode-docker", | ||
"p1c2u.docker-compose", | ||
"usernamehw.errorlens", | ||
"github.vscode-github-actions", | ||
"eamodio.gitlens", | ||
"golang.go", | ||
"mongodb.mongodb-vscode", | ||
"christian-kohler.path-intellisense", | ||
"foxundermoon.shell-format", | ||
"timonwong.shellcheck", | ||
"JordanHury.sqltools-cassandra", | ||
"wayou.vscode-todo-highlight", | ||
"tooltitudeteam.tooltitude", | ||
"pflannery.vscode-versionlens", | ||
"redhat.vscode-yaml", | ||
"ms-vscode.test-adapter-converter", | ||
"GitHub.vscode-pull-request-github", | ||
"ms-vscode.remote-repositories", | ||
"ms-vsliveshare.vsliveshare", | ||
"aaron-bond.better-comments", | ||
], | ||
} |
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,59 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Debug Gemini", | ||
"type": "go", | ||
"buildFlags": [ | ||
"-gcflags=all=\"-N -l\"" | ||
], | ||
"request": "launch", | ||
"mode": "exec", | ||
"program": "${workspaceFolder}/bin/gemini", | ||
"cwd": "${workspaceFolder}/bin", | ||
"backend": "lldb", | ||
"apiVersion": 2, | ||
"args": [ | ||
"--consistency=LOCAL_QUORUM", | ||
"--test-host-selection-policy=token-aware", | ||
"--oracle-host-selection-policy=token-aware", | ||
"--test-cluster=192.168.100.3", | ||
"--oracle-cluster=192.168.100.2", | ||
"--dataset-size=large", | ||
"--seed=60", | ||
"--schema-seed=60", | ||
"--cql-features=all", | ||
"--duration=5m", | ||
"--warmup=10s", | ||
"--drop-schema=true", | ||
"--fail-fast", | ||
"--level=info", | ||
"--materialized-views=true", | ||
"--outfile=${workspaceFolder}/results/gemini_result.log", | ||
"--mode=mixed", | ||
"--non-interactive", | ||
"--request-timeout=180s", | ||
"--connect-timeout=120s", | ||
"--consistency=LOCAL_QUORUM", | ||
"--use-server-timestamps=false", | ||
"--async-objects-stabilization-attempts=10", | ||
"--async-objects-stabilization-backoff=1000ms", | ||
"--replication-strategy=\"{'class': 'NetworkTopologyStrategy', 'replication_factor': '1'}\"", | ||
"--oracle-replication-strategy=\"{'class': 'NetworkTopologyStrategy', 'replication_factor': '1'}\"", | ||
"--max-mutation-retries=5", | ||
"--max-mutation-retries-backoff=1000ms", | ||
"--concurrency=4", | ||
"--tracing-outfile=${workspaceFolder}/results/gemini_tracing.log", | ||
], | ||
"logOutput": "debugger", | ||
"suppressMultipleSessionWarning": true, | ||
"coreFilePath": "${workspaceFolder}", | ||
"output": "${workspaceFolder}/bin/gemini", | ||
"showLog": true, | ||
"showGlobalVariables": true, | ||
"showRegisters": true, | ||
"hideSystemGoroutines": true, | ||
"internalConsoleOptions": "openOnFirstSessionStart", | ||
}, | ||
] | ||
} |
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,195 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"editor.quickSuggestions": { | ||
"comments": true, | ||
"strings": true, | ||
"other": true | ||
}, | ||
"[yaml]": { | ||
"editor.defaultFormatter": "redhat.vscode-yaml" | ||
}, | ||
"[dockerfile]": { | ||
"editor.defaultFormatter": "ms-azuretools.vscode-docker" | ||
}, | ||
"git.allowForcePush": true, | ||
"git.alwaysSignOff": true, | ||
"git.autofetch": true, | ||
"git.ignoreLimitWarning": true, | ||
"github.gitProtocol": "ssh", | ||
"makefile.configureOnOpen": false, | ||
"go.diagnostic.vulncheck": "Imports", | ||
"go.disableConcurrentTests": false, | ||
"go.coverOnSave": true, | ||
"go.coverOnSingleTest": true, | ||
"go.coverOnSingleTestFile": true, | ||
"go.inlayHints.compositeLiteralTypes": false, | ||
"go.inlayHints.parameterNames": true, | ||
"go.useLanguageServer": true, | ||
"go.inferGopath": true, | ||
"go.vetOnSave": "workspace", | ||
"go.coverMode": "default", | ||
"go.addTags": { | ||
"tags": "json,bson,yaml", | ||
"promptForTags": true | ||
}, | ||
"go.coverageDecorator": { | ||
"type": "gutter", | ||
"coveredHighlightColor": "rgba(64,128,128,0.5)", | ||
"uncoveredHighlightColor": "rgba(128,64,64,0.25)", | ||
"coveredGutterStyle": "blockgreen", | ||
"uncoveredGutterStyle": "blockred" | ||
}, | ||
"go.formatTool": "gofumpt", | ||
"go.coverShowCounts": true, | ||
"go.enableCodeLens": { | ||
"runtest": true, | ||
}, | ||
"gopls": { | ||
"ui.codelenses": { | ||
"gc_details": true, | ||
"upgrade_dependency": true, | ||
"generate": true, | ||
"regenerate_cgo": true, | ||
"test": true, | ||
"tidy": true, | ||
"run_govulncheck": true, | ||
"vendor": true | ||
}, | ||
"ui.diagnostic.analyses": { | ||
"asmdecl": true, | ||
"nilness": true, | ||
"assign": true, | ||
"atomic": true, | ||
"atomicalign": true, | ||
"bools": true, | ||
"buildtags": true, | ||
"cgocall": true, | ||
"composites": true, | ||
"copylocks": true, | ||
"buildtag": true, | ||
"errorsas": true, | ||
"fieldalignment": true, | ||
"deepequalerrors": true, | ||
"fillreturns": true, | ||
"fillstruct": true, | ||
"nilfunc": true, | ||
"ifaceassert": true, | ||
"httpresponse": true, | ||
"infertypeargs": true, | ||
"lostcancel": true, | ||
"loopclosure": true, | ||
"printf": true, | ||
"simplifycompositelit": true, | ||
"stdmethods": true, | ||
"shadow": true, | ||
"structtag": true, | ||
"timeformat": true, | ||
"unmarshal": true, | ||
"unreachable": true, | ||
"unusedwrite": true, | ||
"unusedvariable": true, | ||
"unsafeptr": true, | ||
"unusedresult": true, | ||
"embed": true, | ||
"nonewvars": true, | ||
"noresultvalues": true, | ||
"shift": true, | ||
"simplifyrange": true, | ||
"simplifyslice": true, | ||
"sortslice": true, | ||
"stringintconv": true, | ||
"stubmethods": true, | ||
"testinggoroutine": true, | ||
"tests": true, | ||
"undeclaredname": true, | ||
"unusedparams": false | ||
}, | ||
"ui.semanticTokens": true, | ||
"ui.completion.experimentalPostfixCompletions": true, | ||
"ui.completion.usePlaceholders": false, | ||
"ui.completion.matcher": "Fuzzy", | ||
"ui.diagnostic.staticcheck": true, | ||
"ui.diagnostic.annotations": { | ||
"bounds": true, | ||
"escape": true, | ||
"inline": true, | ||
"nil": true | ||
}, | ||
"ui.navigation.importShortcut": "Both", | ||
"ui.noSemanticNumber": true, | ||
"ui.navigation.symbolStyle": "Full", | ||
"ui.noSemanticString": true, | ||
"ui.documentation.linksInHover": false, | ||
"ui.navigation.symbolMatcher": "FastFuzzy", | ||
"ui.documentation.hoverKind": "FullDocumentation", | ||
"ui.documentation.linkTarget": "pkg.go.dev", | ||
"ui.completion.completionBudget": "500ms", | ||
"ui.navigation.symbolScope": "all", | ||
"ui.diagnostic.diagnosticsDelay": "600ms", | ||
"gofumpt": true, | ||
}, | ||
"go.lintTool": "golangci-lint", | ||
"go.lintFlags": [ | ||
"--verbose" | ||
], | ||
"go.toolsManagement.autoUpdate": true, | ||
"go.coverageOptions": "showCoveredCodeOnly", | ||
"go.inlayHints.compositeLiteralFields": true, | ||
"go.lintOnSave": "workspace", | ||
"go.inlayHints.constantValues": true, | ||
"go.inlayHints.assignVariableTypes": true, | ||
"go.coverOnTestPackage": true, | ||
"go.toolsManagement.go": "1.23", | ||
"go.generateTestsFlags": [ | ||
"-v" | ||
], | ||
"go.delveConfig": { | ||
"apiVersion": 2, | ||
"debugAdapter": "dlv-dap", | ||
"showLog": true, | ||
"hideSystemGoroutines": true, | ||
"showGlobalVariables": true, | ||
"dlvLoadConfig": { | ||
"followPointers": true, | ||
"maxVariableRecurse": 1, | ||
"maxStringLen": 256, | ||
"maxArrayValues": 256, | ||
"maxStructFields": -1, | ||
}, | ||
"dlvFlags": [ | ||
"--accept-multiclient", | ||
"--listen=0.0.0.0:2345", | ||
"--allow-non-terminal-interactive" | ||
], | ||
"logOutput": "debugger", | ||
"showRegisters": true | ||
}, | ||
"go.editorContextMenuCommands": { | ||
"removeTags": true, | ||
"fillStruct": true, | ||
"testFile": true, | ||
"testPackage": true, | ||
"generateTestForFile": true, | ||
"generateTestForPackage": true, | ||
"benchmarkAtCursor": true, | ||
"addImport": true, | ||
"addTags": true, | ||
"testCoverage": true, | ||
"generateTestForFunction": true, | ||
}, | ||
"go.inlayHints.functionTypeParameters": true, | ||
"go.inlayHints.rangeVariableTypes": true, | ||
"go.installDependenciesWhenBuilding": true, | ||
"go.testExplorer.showOutput": true, | ||
"go.testExplorer.packageDisplayMode": "nested", | ||
"go.testExplorer.showDynamicSubtestsInEditor": true, | ||
"go.terminal.activateEnvironment": true, | ||
"go.testTimeout": "5m", | ||
"go.testExplorer.enable": true, | ||
"go.testExplorer.concatenateMessages": true, | ||
"go.removeTags": { | ||
"tags": "", | ||
"options": "", | ||
"promptForTags": true | ||
}, | ||
} |
Oops, something went wrong.