-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 460db42
Showing
10 changed files
with
1,027 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,42 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
go: [1.18, 1.19] | ||
os: [windows-latest, ubuntu-latest] | ||
|
||
steps: | ||
- name: Set up Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: ${{ matrix.go }} | ||
|
||
- name: Checkout into project's git directory | ||
uses: actions/[email protected] | ||
|
||
- name: Get dependencies | ||
run: go get -v -t -d ./... | ||
|
||
- name: Build | ||
# TODO: enable working-directory and tweak path (prepend ../../) after restructurizing the project | ||
run: go build -ldflags="-s -w" -v -o build/haste | ||
#working-directory: cmd/client | ||
|
||
- name: Test | ||
run: go test -v ./... | ||
|
||
- name: Upload artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: haste-go${{ matrix.go }}-${{ matrix.os }} | ||
path: build/haste |
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,37 @@ | ||
name: Lint | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
go: [1.18, 1.19] | ||
|
||
steps: | ||
# Required for golangci/golangci-lint-action (keeping it just in case I'd like to switch back) | ||
#- name: Set up Go | ||
#uses: actions/[email protected] | ||
#with: | ||
#go-version: ${{ matrix.go }} | ||
|
||
- name: Checkout into project's git directory | ||
uses: actions/[email protected] | ||
|
||
- name: Lint the code (reviewdog) | ||
uses: reviewdog/[email protected] | ||
with: | ||
fail_on_error: true | ||
go_version: ${{ matrix.go }} | ||
filter_mode: nofilter | ||
|
||
#- name: Lint the code | ||
#uses: golangci/[email protected] | ||
#with: | ||
#version: v1.50 |
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,4 @@ | ||
.vscode | ||
|
||
haste | ||
haste-client |
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,70 @@ | ||
linters-settings: | ||
govet: | ||
check-shadowing: true | ||
revive: | ||
min-confidence: 0 | ||
gocyclo: | ||
min-complexity: 25 | ||
maligned: | ||
suggest-new: true | ||
goconst: | ||
min-len: 2 | ||
min-occurrences: 4 | ||
gocognit: | ||
min-complexity: 35 | ||
gocritic: | ||
enabled-tags: | ||
- diagnostic | ||
- experimental | ||
- opinionated | ||
- performance | ||
- style | ||
disabled-checks: | ||
- unnamedResult | ||
- commentedOutCode | ||
- exitAfterDefer # TODO: Investigate re-enabling this one | ||
- filepathJoin # Disabled due to FPs in config package | ||
- appendCombine # After a longer thought I decided I don't like this, makes code less readable | ||
funlen: | ||
lines: 200 | ||
statements: 50 | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
- bodyclose | ||
- depguard | ||
- dogsled | ||
# - dupl | ||
- errcheck | ||
- funlen | ||
- goconst | ||
- gocritic | ||
# - gocyclo # same as with gocognit | ||
- gofmt | ||
- goimports | ||
- revive | ||
- gosec | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
#- interfacer # archived by the owner | ||
# - lll | ||
# - misspell | ||
- exportloopref | ||
- staticcheck | ||
- stylecheck | ||
- typecheck | ||
- unconvert | ||
- unparam | ||
- unused | ||
- whitespace | ||
- gocognit | ||
# - godox | ||
# - maligned | ||
- prealloc | ||
|
||
# don't enable: | ||
# - gochecknoglobals | ||
# - nakedret | ||
# - gochecknoinits |
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 @@ | ||
# Unversioned |
Oops, something went wrong.