Goalinter-v1: Goa framework (version1) linter

goavl: Goa framework (ver1) linter

goavlは、goa version1(フォーク版)のlinterです。開発目的は、goaを用いたWeb APIデザイン設計速度を早め、チーム内でのデザイン差異を極力小さくする事です。

goaは、DSLに記述されたデザインをもとに、Web APIホスティングに必要なベース処理(ルーティング、コントローラ、Swaggerなど)を生成します。しかしながら、課題が1点あります。それは、デザインから各種ファイルの生成に失敗した場合、エラー箇所を即座に特定できない点です。

例えば、近年のコンパイラはエラー箇所の行数を示します。しかし、goaはそのような情報を一切出力しません。そこで、goaデザインファイルの問題箇所を即座に特定するためのLinter開発に着手しました。

goavlは、goa version 1 のみをサポートし、現行のversion 3 はサポートしない予定です。その理由は、私がフォークしたgoa version 1 を利用しているからです。何故、フォーク版を使用しているかの背景は、他のサイトで説明しています(記事の作者とgoavl開発者は別人のため注意)

インストール方法

Step.1 前準備

現在は、" $ go install"によるインストールのみをサポートしています。そのため、golangの開発環境をシステムにインストールしていない場合、golang公式サイトからgolangをインストールしてください。

Step2. インストール

$ go install github.com/nao1215/goavl@latest

開発進捗

作成完了:命名規則チェック(チェック対象一覧)

  • Resource()の引数
  • Action()の引数
  • Routing()の引数

作成予定

  • Type()の変数名、引数の命名規則チェック
  • MediaType()の変数名、引数の命名規則チェック
  • View()の構文チェック(使用できない関数内での呼び出しがないかどうか)

実行例

$ cat test/sample/goa.go   ※ チェック対象のファイルの中身を表示
package design

import (
        . "github.com/shogo82148/goa-v1/design"
        . "github.com/shogo82148/goa-v1/design/apidsl"
)

var _ = Resource("operandsNG", func() {
        Action("add-Ng", func() {
                Routing(GET("add_ng/:left/:right"))
                Description("add returns the sum of the left and right parameters in the response body")
                Params(func() {
                        Param("left", Integer, "Left operand")
                        Param("right", Integer, "Right operand")
                })
                Response(OK, "text/plain")
        })
})

$ goavl
/home/nao/.go/src/github.com/nao1215/goavl/test/sample/goa.go:8 Resource("operandsNG") is not snake case ('operands_ng')
/home/nao/.go/src/github.com/nao1215/goavl/test/sample/goa.go:9 Action("add-Ng") is not snake case ('add_ng')
/home/nao/.go/src/github.com/nao1215/goavl/test/sample/goa.go:10 Routing(GET("add_ng/:left/:right")) is not chain case ('add-ng/:left/:right')

ライセンス

goavlプロジェクトは、複合ライセンスです。

MITライセンスのソースコードの作者は、pinzolo氏およびFatih Arslan氏です。それぞれの作者が書かれたコードには、MITライセンス全文およびCopyrightが明示されています。

名前の由来

初期名称は"goalinter-v1"。linterのVersion 1に見えるため、"goav1linter"に改名。その後、"1"と"l"が似ていたため、それらを統合して名前を短くしました(= "goavl")

Owner
CHIKAMATSU Naohiro
Embedded/Backend(?) software engineer. Love CLI tool for Linux.
CHIKAMATSU Naohiro
Comments
  • Bump github.com/spf13/cobra from 1.4.0 to 1.6.0

    Bump github.com/spf13/cobra from 1.4.0 to 1.6.0

    Bumps github.com/spf13/cobra from 1.4.0 to 1.6.0.

    Release notes

    Sourced from github.com/spf13/cobra's releases.

    v1.6.0

    Summer 2022 Release

    Some exciting changes make their way to Cobra! Command completions continue to get better and better (including adding --help and --version automatic flags to the completions list). Grouping is now possible in your help output as well! And you can now use the OnFinalize method to cleanup things when all "work" is done. Checkout the full changelog below:


    Features 🌠

    Deprecation 👎🏼

    • ExactValidArgs is deprecated (but not being removed entirely). This is abit nuanced, so checkout #1643 for further information and the updated user_guide.md on how this may affect you (and how you can take advantage of the correct behavior in the validators): @​umarcor #1643

    Bug fixes 🐛

    Dependencies 🗳️

    Testing 🤔

    Docs ✏️

    Misc 💭

    Note: Per #1804, we will be moving away from "seasonal" releases and doing more generic point release targets. Continue to track the milestones and issues in the spf13/cobra GitHub repository for more information!

    Great work everyone! Cobra would never be possible without your contributions! 🐍

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump github.com/spf13/cobra from 1.4.0 to 1.5.0

    Bump github.com/spf13/cobra from 1.4.0 to 1.5.0

    Bumps github.com/spf13/cobra from 1.4.0 to 1.5.0.

    Release notes

    Sourced from github.com/spf13/cobra's releases.

    v1.5.0

    Spring 2022 Release 🌥️

    Hello everyone! Welcome to another release of cobra. Completions continue to get better and better. This release adds a few really cool new features. We also continue to patch versions of our dependencies as they become available via dependabot. Happy coding!

    Active help 👐🏼

    Shout out to @​marckhouzam for a big value add: Active Help spf13/cobra#1482. With active help, a program can provide some inline warnings or hints for users as they hit tab. Now, your CLIs can be even more intuitive to use!

    Currently active help is only supported for bash V2 and zsh. Marc wrote a whole guide on how to do this, so make sure to give it a good read to learn how you can add this to your cobra code! https://github.com/spf13/cobra/blob/master/active_help.md

    Group flags 🧑🏼‍🤝‍🧑🏼

    Cobra now has the ability to mark flags as required or exclusive as a group. Shout out to our newest maintainer @​johnSchnake for this! spf13/cobra#1654 Let's say you have a username flag that MUST be partnered with a password flag. Well, now, you can enforce those as being required together:

    rootCmd.Flags().StringVarP(&u, "username", "u", "", "Username (required if password is set)")
    rootCmd.Flags().StringVarP(&pw, "password", "p", "", "Password (required if username is set)")
    rootCmd.MarkFlagsRequiredTogether("username", "password")
    

    Flags may also be marked as "mutally exclusive" with the MarkFlagsMutuallyExclusive(string, string ... ) command API. Refer to our user guide documentation for further info!

    Completions 👀

    Documentation 📝

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • [BUG] goa can use Required parameter in MediaType (document is incorrect)

    [BUG] goa can use Required parameter in MediaType (document is incorrect)

    linter が MediaType 内で Required 使えないよ、と指摘してくる

    [FC019] webapi/design/users.go:92   MediaType() has Required(). Required() can be used in Attributes, Headers, Payload, Type, Params
    

    で、goa 公式ドキュメントにも類似のことが書いてある。

    Required can be used in: Attributes, Headers, Payload, Type, Params

    しかし、MediaType 内で Required 有り/無しを変えて、goagen すると生成される内容が変わる。 つまり、Required は MediaType 内で使用可能である

  • [BUG] 再帰的なシンタックスチェックによって、正しいシンタックスをNG判定する

    [BUG] 再帰的なシンタックスチェックによって、正しいシンタックスをNG判定する

    バグが含まれていないgoa-design

    var BugMedia = MediaType("application/vnd.bug_media", func() {
    	Attributes(func() {
    		Required("bug")  // goavlが誤検出する箇所
    	})
    })
    

    goavlの実行結果(バグ)

    $ ./goavl -f test/sample/bug.go 
    [WARN] test/sample/bug.go:10   MediaType() has Required(). Required() can be used in Attributes, Headers, Payload, Type, Params
    

    原因

    goavleは、MediaTypeの第2引数内に含まれる関数を再帰的にチェックする。 その時に、MediaType内にRequired()が存在すると判定される。 Attributes()内のRequired()は、チェック対象外とするのが正しい。

  • [Bug] Type(), MediaType()内で使用されている関数に対するチェックで誤検出

    [Bug] Type(), MediaType()内で使用されている関数に対するチェックで誤検出

    package design
    
    import (
    	. "github.com/shogo82148/goa-v1/design/apidsl"
    )
    
    var BugType = Type("bug", func() {
    	Attributes(func() {
    		View("bug")
    	})
    	View("bug")
    })
    
    $ ./goavl -f test/sample/bug.go 
    [WARN] test/sample/bug.go:9    Type() has View(). View() can be used in MediaType() or Response() ★不要
    [WARN] test/sample/bug.go:11   Type() has View(). View() can be used in MediaType() or Response()
    [WARN] test/sample/bug.go:9    Attributes() has View(). View() can be used in MediaType() or Response()
    
  • 関数が使用可能かどうか(例:View()はMediaType(), Response()で使用可能)のチェック処理を抽象化する

    関数が使用可能かどうか(例:View()はMediaType(), Response()で使用可能)のチェック処理を抽象化する

    何が問題か

    呼び出し可能な関数内でView()とAttribute()が呼び出されているかどうかのチェック処理を追加した。これらの処理は非常に似ており、抽象化するによって類似の処理を簡単に記述できるようになる。

    どのように実現するか

    1. goaが提供する関数一覧を文字列スライスとして持つ
    2. ある関数の呼び出し可能な範囲(例:View()であればMediaType(), Response())を文字列スライスとして持つ
    3. 「上記1. の文字列スライス」から「上記2. の文字列スライス」を除外する
    4. 上記3.の文字列スライスから関数名を取り出し、その関数内でどの関数が呼び出されているかをチェックする。
  • Bump github.com/shogo82148/goa-v1 from 1.5.12 to 1.5.13

    Bump github.com/shogo82148/goa-v1 from 1.5.12 to 1.5.13

    Bumps github.com/shogo82148/goa-v1 from 1.5.12 to 1.5.13.

    Release notes

    Sourced from github.com/shogo82148/goa-v1's releases.

    v1.5.13

    What's Changed

    Full Changelog: https://github.com/shogo82148/goa-v1/compare/v1.5.12...v1.5.13

    Commits
    • d879dc8 bump up v1.5.13
    • 500226e Merge pull request #178 from shogo82148/bump-gopkg.in-yaml.v3
    • 54d1e20 drop Go 1.16 support
    • 0d6d80b bump gopkg.in/yaml.v3
    • 6e32a15 Merge pull request #177 from shogo82148/dependabot/go_modules/github.com/armo...
    • a101873 build(deps): bump github.com/armon/go-metrics from 0.3.11 to 0.4.0
    • e317dda Merge pull request #175 from shogo82148/drop-appengine
    • c12986d drop appengine build tag
    • 35eac67 Merge pull request #174 from shogo82148/dependabot/go_modules/github.com/go-k...
    • 3896b09 build(deps): bump github.com/go-kit/log from 0.2.0 to 0.2.1
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump github.com/shogo82148/goa-v1 from 1.5.11 to 1.5.12

    Bump github.com/shogo82148/goa-v1 from 1.5.11 to 1.5.12

    Bumps github.com/shogo82148/goa-v1 from 1.5.11 to 1.5.12.

    Release notes

    Sourced from github.com/shogo82148/goa-v1's releases.

    v1.5.12

    What's Changed

    Full Changelog: https://github.com/shogo82148/goa-v1/compare/v1.5.11...v1.5.12

    Commits
    • 17e749c bump up v1.5.12
    • 88de18c Merge pull request #160 from shogo82148/fix-missing-validator
    • 1769c5f fix calling Validate method
    • 0d8de48 fix the test case
    • 7727dc8 always generate Validate method
    • 98f954b add test for #161
    • 6373905 Merge pull request #159 from shogo82148/dependabot/go_modules/github.com/gola...
    • 035a8e7 build(deps): bump github.com/golang-jwt/jwt/v4 from 4.2.0 to 4.3.0
    • 95a2c41 Merge pull request #158 from shogo82148/use-crypto-rand-read
    • 65c8093 use "crypto/rand".Read
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump github.com/spf13/cobra from 1.3.0 to 1.4.0

    Bump github.com/spf13/cobra from 1.3.0 to 1.4.0

    Bumps github.com/spf13/cobra from 1.3.0 to 1.4.0.

    Release notes

    Sourced from github.com/spf13/cobra's releases.

    v1.4.0

    Winter 2022 Release ❄️

    Another season, another release!

    Goodbye viper! 🐍 🚀

    The core Cobra library no longer requires Viper and all of its indirect dependencies. This means that Cobra's dependency tree has been drastically thinned! The Viper dependency was included because of the cobra CLI generation tool. This tool has migrated to spf13/cobra-cli.

    It's pretty unlikely you were importing and using the bootstrapping CLI tool as part of your application (after all, it's just a tool to get going with core cobra).

    But if you were, replace occurrences of

    "github.com/spf13/cobra/cobra"
    

    with

    "github.com/spf13/cobra-cli"
    

    And in your go.mod, you'll want to also include this dependency:

    github.com/spf13/cobra-cli v1.3.0
    

    Again, the maintainers do not anticipate this being a breaking change to users of the core cobra library, so minimal work should be required for users to integrate with this new release. Moreover, this means the dependency tree for your application using Cobra should no longer require dependencies that were inherited from Viper. Huzzah! 🥳

    If you'd like to read more

    Documentation 📝

    Other 💭

    Shoutout to our awesome contributors helping to make this cobra release possible!! @​spf13 @​marckhouzam @​johnSchnake @​jpmcb @​liggitt @​umarcor @​hiljusti @​marians @​shyim @​htroisi

    Changelog

    Sourced from github.com/spf13/cobra's changelog.

    Cobra Changelog

    v1.1.3

    • Fix: release-branch.cobra1.1 only: Revert "Deprecate Go < 1.14" to maintain backward compatibility

    v1.1.2

    Notable Changes

    • Bump license year to 2021 in golden files (#1309) @​Bowbaq
    • Enhance PowerShell completion with custom comp (#1208) @​Luap99
    • Update gopkg.in/yaml.v2 to v2.4.0: The previous breaking change in yaml.v2 v2.3.0 has been reverted, see go-yaml/yaml#670
    • Documentation readability improvements (#1228 etc.) @​zaataylor etc.
    • Use golangci-lint: Repair warnings and errors resulting from linting (#1044) @​umarcor

    v1.1.1

    • Fix: yaml.v2 2.3.0 contained a unintended breaking change. This release reverts to yaml.v2 v2.2.8 which has recent critical CVE fixes, but does not have the breaking changes. See spf13/cobra#1259 for context.
    • Fix: correct internal formatting for go-md2man v2 (which caused man page generation to be broken). See spf13/cobra#1049 for context.

    v1.1.0

    Notable Changes

    • Extend Go completions and revamp zsh comp (#1070)
    • Fix man page doc generation - no auto generated tag when cmd.DisableAutoGenTag = true (#1104) @​jpmcb
    • Add completion for help command (#1136)
    • Complete subcommands when TraverseChildren is set (#1171)
    • Fix stderr printing functions (#894)
    • fix: fish output redirection (#1247)

    v1.0.0

    Announcing v1.0.0 of Cobra. 🎉

    Notable Changes

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump github.com/spf13/cobra from 1.3.0 to 1.4.0

    Bump github.com/spf13/cobra from 1.3.0 to 1.4.0

    Bumps github.com/spf13/cobra from 1.3.0 to 1.4.0.

    Release notes

    Sourced from github.com/spf13/cobra's releases.

    v1.4.0

    Winter 2022 Release ❄️

    Another season, another release!

    Goodbye viper! 🐍 🚀

    The core Cobra library no longer requires Viper and all of its indirect dependencies. This means that Cobra's dependency tree has been drastically thinned! The Viper dependency was included because of the cobra CLI generation tool. This tool has migrated to spf13/cobra-cli.

    It's pretty unlikely you were importing and using the bootstrapping CLI tool as part of your application (after all, it's just a tool to get going with core cobra).

    But if you were, replace occurrences of

    "github.com/spf13/cobra/cobra"
    

    with

    "github.com/spf13/cobra-cli"
    

    And in your go.mod, you'll want to also include this dependency:

    github.com/spf13/cobra-cli v1.3.0
    

    Again, the maintainers do not anticipate this being a breaking change to users of the core cobra library, so minimal work should be required for users to integrate with this new release. Moreover, this means the dependency tree for your application using Cobra should no longer require dependencies that were inherited from Viper. Huzzah! 🥳

    If you'd like to read more

    Documentation 📝

    Other 💭

    Shoutout to our awesome contributors helping to make this cobra release possible!! @​spf13 @​marckhouzam @​johnSchnake @​jpmcb @​liggitt @​umarcor @​hiljusti @​marians @​shyim @​htroisi

    Changelog

    Sourced from github.com/spf13/cobra's changelog.

    Cobra Changelog

    v1.1.3

    • Fix: release-branch.cobra1.1 only: Revert "Deprecate Go < 1.14" to maintain backward compatibility

    v1.1.2

    Notable Changes

    • Bump license year to 2021 in golden files (#1309) @​Bowbaq
    • Enhance PowerShell completion with custom comp (#1208) @​Luap99
    • Update gopkg.in/yaml.v2 to v2.4.0: The previous breaking change in yaml.v2 v2.3.0 has been reverted, see go-yaml/yaml#670
    • Documentation readability improvements (#1228 etc.) @​zaataylor etc.
    • Use golangci-lint: Repair warnings and errors resulting from linting (#1044) @​umarcor

    v1.1.1

    • Fix: yaml.v2 2.3.0 contained a unintended breaking change. This release reverts to yaml.v2 v2.2.8 which has recent critical CVE fixes, but does not have the breaking changes. See spf13/cobra#1259 for context.
    • Fix: correct internal formatting for go-md2man v2 (which caused man page generation to be broken). See spf13/cobra#1049 for context.

    v1.1.0

    Notable Changes

    • Extend Go completions and revamp zsh comp (#1070)
    • Fix man page doc generation - no auto generated tag when cmd.DisableAutoGenTag = true (#1104) @​jpmcb
    • Add completion for help command (#1136)
    • Complete subcommands when TraverseChildren is set (#1171)
    • Fix stderr printing functions (#894)
    • fix: fish output redirection (#1247)

    v1.0.0

    Announcing v1.0.0 of Cobra. 🎉

    Notable Changes

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump github.com/spf13/cobra from 1.4.0 to 1.6.1

    Bump github.com/spf13/cobra from 1.4.0 to 1.6.1

    Bumps github.com/spf13/cobra from 1.4.0 to 1.6.1.

    Release notes

    Sourced from github.com/spf13/cobra's releases.

    v1.6.1

    Bug fixes 🐛

    • Fixes a panic when AddGroup isn't called before AddCommand(my-sub-command) is executed. This can happen within more complex cobra file structures that have many different inits to be executed. Now, the check for groups has been moved to ExecuteC and provides more flexibility when working with grouped commands - @​marckhouzam (and shout out to @​aawsome, @​andig and @​KINGSABRI for a deep investigation into this! 👏🏼)

    v1.6.0

    Summer 2022 Release

    Some exciting changes make their way to Cobra! Command completions continue to get better and better (including adding --help and --version automatic flags to the completions list). Grouping is now possible in your help output as well! And you can now use the OnFinalize method to cleanup things when all "work" is done. Checkout the full changelog below:


    Features 🌠

    Deprecation 👎🏼

    • ExactValidArgs is deprecated (but not being removed entirely). This is abit nuanced, so checkout #1643 for further information and the updated user_guide.md on how this may affect you (and how you can take advantage of the correct behavior in the validators): @​umarcor #1643

    Bug fixes 🐛

    Dependencies 🗳️

    Testing 🤔

    Docs ✏️

    Misc 💭

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
[mirror] This is a linter for Go source code.

Golint is a linter for Go source code. Installation Golint requires a supported release of Go. go get -u golang.org/x/lint/golint To find out where g

Dec 23, 2022
Staticcheck - The advanced Go linter

The advanced Go linter Staticcheck is a state of the art linter for the Go programming language. Using static analysis, it finds bugs and performance

Jan 1, 2023
A Go linter to check that errors from external packages are wrapped

Wrapcheck A simple Go linter to check that errors from external packages are wrapped during return to help identify the error source during debugging.

Dec 27, 2022
A linter that handles struct tags.

Tagliatelle A linter that handles struct tags. Supported string casing: camel pascal kebab snake goCamel Respects Go's common initialisms (e.g. HttpRe

Dec 15, 2022
a simple golang SSA viewer tool use for code analysis or make a linter
a simple golang SSA viewer tool use for code analysis or make a linter

ssaviewer A simple golang SSA viewer tool use for code analysis or make a linter ssa.html generate code modify from src/cmd/compile/internal/ssa/html.

May 17, 2022
The Golang linter that checks that there is no simultaneous return of `nil` error and an invalid value.

nilnil Checks that there is no simultaneous return of nil error and an invalid value. Installation & usage $ go install github.com/Antonboom/nilnil@la

Dec 14, 2022
Go linter which checks for dangerous unicode character sequences

bidichk - checks for dangerous unicode character sequences bidichk finds dangerous unicode character sequences in Go source files. Considered dangerou

Oct 5, 2022
Go linter that checks types that are json encoded - reports unsupported types and unnecessary error checks

Checks types passed to the json encoding functions. Reports unsupported types and reports occations, where the check for the returned error can be omited.

Oct 7, 2022
Linter for PostgreSQL

Использование Проверить миграции: oh-my-pg-linter check ./migrations/*.sql Добавить директории с дополнительными проверками (переопределение - кто пос

Nov 25, 2021
containedctx detects is a linter that detects struct contained context.Context field

containedctx containedctx detects is a linter that detects struct contained context.Context field Instruction go install github.com/sivchari/contained

Oct 22, 2022
World's spookiest linter

nosleep The world's spookiest linter nosleep is a golang-ci compatible linter which checks for and fails if it detects usages of time.Sleep. Why did y

Oct 15, 2022
Go linter to analyze expression groups: require 'import' declaration groups

grouper — a Go linter to analyze expression groups Installation

Jun 19, 2022
funcresult — a Go linter to analyze function result parameters

Go linter to analyze function result parameters: require named / unnamed function result parameters

Jan 27, 2022
nostdglobals is a simple Go linter that checks for usages of global variables defined in the go standard library

nostdglobals is a simple Go linter that checks for usages of global variables defined in the go standard library

Feb 17, 2022
Linter for Go's fmt.Errorf message

wrapmsg wrapmsg is Go code linter. this enforces fmt.Errorf's message when you wrap error. Example // OK ???? if err := pkg.Cause(); err != nil { re

Dec 27, 2022
misspelled word linter for Go comments, string literals and embedded files

gospel The gospel program lints Go source files for misspellings in comments, strings and embedded files. It uses hunspell to identify misspellings an

Aug 6, 2022
Goa is a web framework based on middleware, like koa.js.

Goa Goa is under construction, if you are familiar with koa or go and interested in this project, please join us. What is goa? goa = go + koa Just lik

Sep 27, 2022
The most opinionated Go source code linter for code audit.
The most opinionated Go source code linter for code audit.

go-critic Highly extensible Go source code linter providing checks currently missing from other linters. There is never too much static code analysis.

Jan 6, 2023
[mirror] This is a linter for Go source code.

Golint is a linter for Go source code. Installation Golint requires a supported release of Go. go get -u golang.org/x/lint/golint To find out where g

Dec 23, 2022
Staticcheck - The advanced Go linter

The advanced Go linter Staticcheck is a state of the art linter for the Go programming language. Using static analysis, it finds bugs and performance

Jan 1, 2023