typegroupingcheck

command module
v0.0.0-...-60f7158 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2023 License: MIT Imports: 5 Imported by: 0

README

typegroupingcheck Linter

typegroupingcheck is a static analysis tool for Go that checks for grouped function parameter types in Go code. It is designed to be integrated with the golangci-lint toolset.

Overview

The linter checks for grouped parameters, where the type is specified once for multiple parameters.

It can be used as a standalone tool or integrated into golangci-lint to enhance the existing suite of linters with this specific check.

Installation

To install typegroupingcheck as a standalone linter, use the following command:

go install github.com/karimodm/typegroupingcheck@latest

Replace github.com/karimodm/typegroupingcheck with the actual import path of your linter.

Building

To build typegroupingcheck as a plugin ready to be used by golangci-list, use the following command:

go build -buildmode=plugin -o typegroupingcheck.so

Usage

After installation, you can run typegroupingcheck on your Go files or projects like so:

typegroupingcheck ./...

Integration with golangci-lint

To integrate typegroupingcheck with golangci-lint, you will need to add it to the configuration file .golangci.yml in the root directory of your project. Here is a sample configuration:

linters-settings:
  custom:
    typegroupingcheck:
      path: typegroupingcheck
      description: Checks for grouped function parameter types
      original-url: github.com/karimodm/typegroupingcheck
linters:
  enable:
    - typegroupingcheck

Please note that integration with golangci-lint requires the typegroupingcheck binary to be in your PATH.

Contributing

Contributions to typegroupingcheck are welcome! You can contribute by:

  • Reporting issues
  • Suggesting new features or enhancements
  • Submitting pull requests to improve the linter

Please refer to CONTRIBUTING.md for more details on how to contribute.

License

typegroupingcheck is distributed under the MIT License.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL