1
0
mirror of https://github.com/makew0rld/amfora.git synced 2024-12-04 14:46:29 -05:00

🚨 Add .golangci.yml, run gofmt, add PR to changelog

This commit is contained in:
makeworld 2020-08-27 18:52:38 -04:00
parent 6c3583b1ac
commit 580e87bcc9
4 changed files with 41 additions and 5 deletions

View File

@ -11,8 +11,5 @@ jobs:
with: with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.30 version: v1.30
# Optional: golangci-lint command line arguments.
args: --max-issues-per-linter=0 --exclude-use-default --disable-all -E deadcode -E errcheck -E gosimple -E govet -E ineffassign -E staticcheck -E structcheck -E typecheck -E unused -E varcheck -E dupl -E exhaustive -E exportloopref -E goconst -E gocritic -E goerr113 -E gofmt -E goimports -E golint -E goprintffuncname -E interfacer -E lll -E maligned -E misspell -E nakedret -E nolintlint -E prealloc -E scopelint -E unconvert -E unparam
# Optional: show only new issues if it's a pull request. The default value is `false`. # Optional: show only new issues if it's a pull request. The default value is `false`.
only-new-issues: true only-new-issues: true

38
.golangci.yml Normal file
View File

@ -0,0 +1,38 @@
linters:
fast: false
disable-all: true
enable:
- deadcode
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- structcheck
- typecheck
- unused
- varcheck
- dupl
- exhaustive
- exportloopref
- goconst
- gocritic
- goerr113
- gofmt
- goimports
- golint
- goprintffuncname
- interfacer
- lll
- maligned
- misspell
- nakedret
- nolintlint
- prealloc
- scopelint
- unconvert
- unparam
issues:
exclude-use-default: true
max-issues-per-linter: 0

View File

@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- The `shift_numbers` key in the config was added, so that non US keyboard users can navigate tabs (#64) - The `shift_numbers` key in the config was added, so that non US keyboard users can navigate tabs (#64)
- <kbd>F1</kbd> and <kbd>F2</kbd> keys for navigating to the previous and next tabs (#64) - <kbd>F1</kbd> and <kbd>F2</kbd> keys for navigating to the previous and next tabs (#64)
- Resolving any relative path (starting with a `.`) in the bottom bar is supported, not just `..` (#71) - Resolving any relative path (starting with a `.`) in the bottom bar is supported, not just `..` (#71)
- Set programs in config to open other schemes like `gopher://` or `magnet:` (#74)
### Changed ### Changed
- Update to [go-gemini](https://github.com/makeworld-the-better-one/go-gemini) v0.8.4 - Update to [go-gemini](https://github.com/makeworld-the-better-one/go-gemini) v0.8.4

View File

@ -174,13 +174,13 @@ func handleOther(u string) {
} }
switch handler { switch handler {
case "", "off": case "", "off":
Error("URL Error", "Opening " + parsed.Scheme + " URLs is turned off.") Error("URL Error", "Opening "+parsed.Scheme+" URLs is turned off.")
default: default:
// The config has a custom command to execute for URLs // The config has a custom command to execute for URLs
fields := strings.Fields(handler) fields := strings.Fields(handler)
err := exec.Command(fields[0], append(fields[1:], u)...).Start() err := exec.Command(fields[0], append(fields[1:], u)...).Start()
if err != nil { if err != nil {
Error("URL Error", "Error executing custom command: " + err.Error()) Error("URL Error", "Error executing custom command: "+err.Error())
} }
} }
App.Draw() App.Draw()