### Install Maintidx for Go < 1.16 Source: https://github.com/yagipy/maintidx/blob/main/README.md Use 'go get' to install a specific version of the maintidx command-line tool for Go versions prior to 1.16. ```shell go get -u github.com/yagipy/maintidx/cmd/maintidx@v1.0.0 ``` -------------------------------- ### Install Maintidx for Go 1.16+ Source: https://github.com/yagipy/maintidx/blob/main/README.md Use 'go install' to install the maintidx command-line tool for Go versions 1.16 and newer. ```shell go install github.com/yagipy/maintidx/cmd/maintidx@v1.0.0 ``` -------------------------------- ### Run Maintidx with 'go run' Source: https://github.com/yagipy/maintidx/blob/main/README.md Execute the maintidx tool using 'go run' for projects where the tool is not globally installed. This command runs the tool directly from its source path. ```shell go run github.com/yagipy/maintidx/cmd/maintidx ./... ``` -------------------------------- ### Run golangci-lint with Maintidx Enabled Source: https://github.com/yagipy/maintidx/blob/main/README.md Execute golangci-lint to run all enabled linters, including maintidx, based on your configuration. ```shell golangci-lint run ``` -------------------------------- ### Run Maintidx with 'go vet' Source: https://github.com/yagipy/maintidx/blob/main/README.md Integrate maintidx with the 'go vet' command by specifying it as a vet tool. This allows 'go vet' to perform maintainability index checks. ```shell go vet -vettool=`which maintidx` ./... ``` -------------------------------- ### Run Maintidx Standalone Source: https://github.com/yagipy/maintidx/blob/main/README.md Execute the maintidx tool directly on your Go project files. It analyzes all files within the specified directory. ```shell maintidx ./... ``` -------------------------------- ### Enable Maintidx in golangci-lint Source: https://github.com/yagipy/maintidx/blob/main/README.md Configure golangci-lint to use maintidx by enabling it in the configuration file. This allows for integrated code analysis. ```yaml # Add maintidx to enable linters. linters: enable: - maintidx linters-settings: maintidx: # Show functions with maintainability index lower than N. # A high index indicates better maintainability (it's kind of the opposite of complexity). # Default: 20 under: 100 ``` -------------------------------- ### Maintidx CLI Flag: -under Source: https://github.com/yagipy/maintidx/blob/main/README.md The '-under' flag allows you to filter the output to show only functions with a maintainability index below a specified integer value. The default value is 20. ```shell Flags: -under int show functions with maintainability index < N only. (default 20) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.