Skip to content

refactor: improve ssh based repo handling #2

refactor: improve ssh based repo handling

refactor: improve ssh based repo handling #2

Triggered via pull request May 29, 2024 00:34
Status Success
Total duration 53s
Artifacts

lint.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

16 errors, 24 warnings, and 1 notice
golangci-lint(varnamelen): cmd/init.go#L62
[existing] variable name 'qs' is too short for the scope of its usage
golangci-lint(gochecknoglobals): cmd/init.go#L14
[existing] initCmd is a global variable
golangci-lint(gosec): cmd/init.go#L85
[existing] G204: Subprocess launched with a potential tainted input or cmd arguments
golangci-lint(gochecknoinits): cmd/init.go#L30
[existing] don't use `init` function
golangci-lint(gocritic): cmd/new.go#L322
[existing] ifElseChain: rewrite if-else to switch statement
golangci-lint(unused): cmd/new.go#L112
[existing] var `commit` is unused
golangci-lint(nestif): cmd/new.go#L310
[existing] `if detectMaster && detectMain` has complex nested blocks (complexity: 5)
golangci-lint(varnamelen): cmd/new.go#L142
[existing] variable name 'nf' is too short for the scope of its usage
golangci-lint(staticcheck): cmd/new.go#L538
[existing] SA1019: pterm.NewLettersFromString is deprecated: use putils.LettersFromString instead.
golangci-lint(prealloc): cmd/new.go#L596
[existing] Consider pre-allocating `scopes`
golangci-lint(prealloc): cmd/new.go#L645
[existing] Consider pre-allocating `scopes`
golangci-lint(unused): cmd/new.go#L113
[existing] var `title` is unused
golangci-lint(unused): cmd/new.go#L114
[existing] var `confirm` is unused
golangci-lint(prealloc): cmd/new.go#L164
[existing] Consider pre-allocating `scopesToSuggest`
golangci-lint(gochecknoinits): cmd/check.go#L29
[existing] don't use `init` function
golangci-lint(stylecheck): cmd/check.go#L91
[existing] ST1005: error strings should not be capitalized
golangci-lint(revive): cmd/init.go#L24
[existing] unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _
golangci-lint(revive): cmd/init.go#L67
[existing] unused-parameter: parameter 'toComplete' seems to be unused, consider removing or renaming it as _
golangci-lint(revive): cmd/init.go#L82
[existing] deep-exit: calls to os.Exit only in main() or init() functions
golangci-lint(revive): cmd/new.go#L160
[existing] add-constant: avoid magic numbers like '6', create a named constant for it
golangci-lint(revive): cmd/new.go#L617
[existing] add-constant: string literal "error opening repository: %v" appears, at least, 3 times, create a named constant for it
golangci-lint(revive): cmd/new.go#L611
[existing] cognitive-complexity: function DynamicScopeSuggestion has cognitive complexity 13 (> max enabled 7)
golangci-lint(revive): cmd/new.go#L353
[existing] add-constant: avoid magic numbers like '0', create a named constant for it
golangci-lint(revive): cmd/new.go#L315
[existing] unused-parameter: parameter 'toComplete' seems to be unused, consider removing or renaming it as _
golangci-lint(revive): cmd/new.go#L404
[existing] cognitive-complexity: function createPR has cognitive complexity 18 (> max enabled 7)
golangci-lint(revive): cmd/new.go#L89
[existing] add-constant: string literal " " appears, at least, 3 times, create a named constant for it
golangci-lint(revive): cmd/new.go#L651
[existing] add-constant: avoid magic numbers like '1', create a named constant for it
golangci-lint(revive): cmd/new.go#L261
[existing] cognitive-complexity: function getUpstreamBranch has cognitive complexity 15 (> max enabled 7)
golangci-lint(revive): cmd/new.go#L558
[existing] cognitive-complexity: function GetScopesInLastMonths has cognitive complexity 11 (> max enabled 7)
golangci-lint(revive): cmd/new.go#L82
[existing] cyclomatic: function emojify has cyclomatic complexity 13 (> max enabled 10)
golangci-lint(revive): cmd/new.go#L128
[existing] function-result-limit: maximum number of return results per function exceeded; max 3 but got 4
golangci-lint(revive): cmd/new.go#L448
[existing] add-constant: string literal "true" appears, at least, 3 times, create a named constant for it
golangci-lint(revive): cmd/new.go#L652
[existing] add-constant: avoid magic numbers like '1', create a named constant for it
golangci-lint(revive): cmd/check.go#L108
[existing] add-constant: string literal "" appears, at least, 3 times, create a named constant for it
golangci-lint(revive): cmd/check.go#L75
[existing] deep-exit: calls to os.Exit only in main() or init() functions
golangci-lint(revive): cmd/check.go#L47
[existing] add-constant: avoid magic numbers like '0', create a named constant for it
golangci-lint(revive): cmd/check.go#L73
[existing] add-constant: avoid magic numbers like '0', create a named constant for it
golangci-lint(revive): cmd/check.go#L24
[existing] unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _
golangci-lint(revive): cmd/check.go#L76
[existing] superfluous-else: if block ends with call to os.Exit function, so drop this else and outdent its block
lint
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
trunk(ignore-does-nothing): cmd/new.go#L260
[new] trunk-ignore(golangci-lint/funlen) is not suppressing a lint issue