Sider Documentation

Sider Documentation

  • Enterprise
  • News
  • Sider Top

›Go

Getting Started

  • Home
  • Intro Videos
  • Setting up Sider
  • Dashboard Overview
  • Repository Settings
  • Custom Analysis Configuration
  • Recommended Ruleset
  • Working with Issues
  • Permissions
  • Skip Analyzing

Analysis Tools

    Ruby

    • RuboCop
    • Reek
    • Querly
    • Rails Best Practices
    • Brakeman
    • HAML-Lint
    • Slim-Lint (beta)

    Java

    • Checkstyle
    • PMD
    • JavaSee

    Kotlin

    • ktlint (beta)
    • detekt (beta)

    JavaScript and Flavors

    • ESLint
    • JSHint
    • TyScan
    • CoffeeLint
    • TSLint (deprecated)

    CSS

    • stylelint
    • SCSS-Lint (deprecated)

    PHP

    • PHP_CodeSniffer
    • PHPMD
    • Phinder

    Python

    • Flake8
    • Pylint (beta)

    Swift

    • SwiftLint

    Go

    • GolangCI-Lint

    C/C++

    • Cppcheck
    • cpplint
    • Clang-Tidy (beta)

    C#

    • FxCop (beta)

    Shell script

    • ShellCheck

    Dockerfile

    • hadolint

    Markdown

    • remark-lint

    Others

    • Goodcheck
    • Misspell
    • LanguageTool (beta)
    • PMD CPD (beta)

Custom Rules

  • Intro to Custom Rules
  • Goodcheck
  • Tips & Tricks

Advanced Settings

  • Inline Comments
  • Private Dependencies
  • Restricting access to Close button
  • Transferring a repository

Billing and Plans

  • Billing and Plans

Troubleshooting

  • Troubleshooting

Enterprise

  • Outline
  • System Overview
  • Installation
  • Configuration
  • Operation
  • Update
  • Load Balancer
  • MySQL
  • Redis
  • MinIO
  • Amazon S3
  • GitHub Enterprise Server
  • Clustering
  • Example Deployments

    • Single Node with Docker Compose

    Releases

    • Overview
    • February 2021
    • January 2021
    • December 2020
    • October 2020
    • September 2020
    • August 2020
    • July 2020
    • June 2020
    • May 2020
    • April 2020
    • February 2020
    • January 2020
    • November 2019
    • Older releases

News

  • 2021
  • 2020
  • 2019
Edit

GolangCI-Lint

Supported VersionLanguageWebsite
1.37.1Gohttps://golangci-lint.run

GolangCI-Lint is a linter to aggregate multiple linters and a successor to Go Meta Linter which is deprecated.

Getting Started

To start using GolangCI-Lint, enable it in your repository settings.

If you want to customize it, put a configuration file (e.g. .golangci.yml) in your repository.

Default Configuration for GolangCI-Lint

In addition to enabled by default linters, Sider enables some useful linters if you have no configuration file like .golangci.yml. See the default configuration file for details.

Migration from Govet and Golint

Sider has removed Govet and Golint. Please use GolangCI-Lint instead. These tools are enabled by default.

If you want to run only Govet or Golint as before, edit your configuration file as follows:

# .golangci.yml
linters:
  disable-all: true
  enable:
    - govet # or golint

Configuration

Here is a configuration example via sider.yml:

linter:
  golangci_lint:
    target: dir/...
    config: golangci.yml
    disable:
      - govet
      - unused
    disable-all: false
    enable:
      - golint
      - gosec
    fast: true
    no-config: false
    presets: complexity
    skip-dirs:
      - src/external_libs
    skip-dirs-use-default: true
    skip-files:
      - ".*\\.my\\.go$"
      - lib/bad.go
    tests: false
    uniq-by-line: true

You can use the following options to fine-tune GolangCI-Lint to your project.

NameTypeDefault
root_dirstring-
targetstring, string[]-
configstring-
no-configbooleanfalse
disablestring, string[]-
disable-allbooleanfalse
enablestring-
faststring, string[]-
presetsstring, string[]-
skip-dirsstring, string[]-
skip-dirs-use-defaultbooleantrue
skip-filesstring, string[]-
testsbooleantrue
uniq-by-linebooleantrue

See also the official document about the command-line options.

target

This option allows you to specify files or directories to analyze. If you specify some targets, configure as follow:

linter:
  golangci_lint:
    target:
      - "dir1"
      - "dir2/..."

config

This option allows you to control a configuration file. If you have settings file for GolangCI-Lint, put the path of that in this option.

no-config

This option allows you not to read config file.

disable

This option allows you to disable defaultly enabled linters. Set linters as a list in this option.

disable-all

This option allows you to decide whether to disable all linters. Note that the option cannot be used with the disable option.

enable

This option allows you to enable linters which are not defaultly enabled. Set linters as a list in this option. To specify disable and enable to the same linter is prohibited.

fast

This option allows you to select whether to run only the fast linters.

presets

This option allows you to enable presets of the linters.

skip-dirs

This option allows you to specify the directories to skip.

skip-dirs-use-default

This option allows you to use or not use default excluded directories.

skip-files

This option allows you to specify the files to skip.

tests

This option allows you to select whether to analyze test files. If you would like to include test files, set true in this option.

uniq-by-line

This option allows you to show multiple linters per line. If you would like to show multiple linters per line, set false in this option.

← SwiftLintCppcheck →
  • Getting Started
  • Default Configuration for GolangCI-Lint
    • Migration from Govet and Golint
  • Configuration
    • target
    • config
    • no-config
    • disable
    • disable-all
    • enable
    • fast
    • presets
    • skip-dirs
    • skip-dirs-use-default
    • skip-files
    • tests
    • uniq-by-line
Sider Documentation
Docs
Getting StartedAnalysis ToolsEnterprise
Sider
Sider TopTerms of ServicePrivacy
Social
BlogGitHubStar
Copyright © 2021 Sider, Inc.