Go linter to analyze expression groups: require 'import' declaration groups

grouper — a Go linter to analyze expression groups

Installation

go get -u github.com/leonklingele/grouper/...
grouper -help

Run analyzer

grouper -import-require-single-import -import-require-grouping ./...

# Example output:
GOPATH/src/github.com/leonklingele/grouper/pkg/analyzer/analyzer.go:8:1: should only use a single 'import' declaration, 2 found
GOPATH/src/github.com/leonklingele/grouper/pkg/analyzer/flags.go:3:1: should only use grouped 'import' declarations

Available flags

  -const-require-grouping
    	require the use of grouped global 'const' declarations
  -const-require-single-const
    	require the use of a single global 'const' declaration only

  -import-require-grouping
    	require the use of grouped 'import' declarations
  -import-require-single-import
    	require the use of a single 'import' declaration only

  -type-require-grouping
    	require the use of grouped global 'type' declarations
  -type-require-single-type
    	require the use of a single global 'type' declaration only

  -var-require-grouping
    	require the use of grouped global 'var' declarations
  -var-require-single-var
    	require the use of a single global 'var' declaration only
Similar Resources

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

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

Goalinter-v1: Goa framework (version1) linter

goavl: Goa framework (ver1) linter goavlは、goa version1(フォーク版)のlinterです。開発目的は、goa

Jul 28, 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

Report unwanted import path and declaration usages

Report unwanted import path and declaration usages

faillint Faillint is a simple Go linter that fails when a specific set of import paths or exported path's functions, constant, vars or types are used.

Dec 28, 2022

Faillint: Report unwanted import path and declaration usages

Faillint: Report unwanted import path and declaration usages

faillint Faillint is a simple Go linter that fails when a specific set of import paths or exported path's functions, constant, vars or types are used.

Dec 28, 2022

👷 Library for safely running groups of workers concurrently or consecutively that require input and output through channels

👷 Library for safely running groups of workers concurrently or consecutively that require input and output through channels

Examples Quickstart Multiple Go Workers Passing Fields Getting Started Pull in the dependency go get github.com/catmullet/go-workers Add the import to

Dec 1, 2022

app-services-go-linter plugin analyze source tree of Go files and validates the availability of i18n strings in *.toml files

app-services-go-linter app-services-go-linter plugin analyze source tree of Go files and validates the availability of i18n strings in *.toml files. A

Nov 29, 2021

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

A system written in Golang to help ops team to automate the process of mapping Vault groups to LDAP Groups.

A system written in Golang to help ops team to automate the process of mapping Vault groups to LDAP Groups. This utility automatically adds LDAP Groups' members to the corresponding Vault Groups.

Nov 12, 2021

Outil (en ligne de commande pour l'instant) vous permettant de rassembler toutes les transactions de vos différents échanges et wallets afin de constituer votre portefeuille global et ainsi vous aider à la déclaration fiscale française.

CryptoFiscaFacile Cet outil veut vous aider à déclarer vos cryptos aux impôts ! Gardez en tête que la loi n'étant pas encore définie sur tous les poin

Dec 27, 2022

Typescript type declaration to PostgreSQL CREATE TABLE converter

ts2psql NOTE: This is WIP. Details in this readme are ideal state. Current usage: go build && ./ts2psql (or go build && ts2psql if on Windows OS). A s

Jan 13, 2022

One of the fastest alternative JSON parser for Go that does not require schema

Alternative JSON parser for Go (10x times faster standard library) It does not require you to know the structure of the payload (eg. create structs),

Jan 2, 2023

Go version manager. Super simple tool to install and manage Go versions. Install go without root. Gobrew doesn't require shell rehash.

gobrew Go version manager Install or update With curl $ curl -sLk https://git.io/gobrew | sh - or with go $ go get -u github.com/kevincobain2000/gobre

Jan 5, 2023

WebDAV server for SSH. Similar to sshfs but does not require proprietary MacFUSE on macOS

sshwebdav: WebDAV server for SSH sshwebdav provides a WebDAV server for a remote SSH host. sshwebdav is similar to sshfs but does not require propriet

Nov 9, 2022

This bot require you to run the GETH client + use ethers framework.

Mad Liquidity Sniper This bot require you to run the GETH client + use ethers framework. All addresses and private keys contained have been changed fo

Oct 19, 2021

Minimal bundling for projects that require generation (e.g. SASS to CSS)

staticgen staticgen is a tool that generates file bundles and watches directories for changes. Configuration Project configurations are specified in t

Dec 14, 2021
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
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