ccclint

package module
v0.0.0-test7 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: MIT Imports: 4 Imported by: 0

README

github.com/cccteam/ccc/lint

Setup

  1. Make sure your project has /tmp in the .gitignore file.

  2. Add a custom section to the linters-settings section of the project's .golangci.yml as shown below. Replace v0.0.3 with the version of the linter you want to use.

linters-settings:
  custom:
    ccclint:
      path: tmp/ccc-lint/v0.0.3/ccc-lint.so
      original-url: github.com/cccteam/ccc
  1. Install the ccclint utility.
go install github.com/cccteam/ccc/lint/cmd/ccclint@latest
  1. Run the ccclint utility from the root directory of your project. If your $GOPATH/bin is set up in your $PATH, you can now just simply run it:
ccclint
  1. Update your project to use golang-ci.yml@v5.4.0 or greater. Also make sure golangci-lint-version is 'v1.64' or later.
golang-ci:
  needs: env-setup
  uses: cccteam/github-workflows/.github/workflows/golang-ci.yml@v5.4.0
  with:
    build-tags: '["", "dev"]'
    golangci-lint-version: 'v1.64'
  1. Update your project's readme with the steps to install the lint plugin:
go install github.com/cccteam/ccc/lint/cmd/ccclint@latest
ccclint

Documentation

Overview

ccclint is a custom linter that checks if otel span names match function names.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(settings any) (register.LinterPlugin, error)

Types

type CCCLint

type CCCLint struct {
	// contains filtered or unexported fields
}

func (*CCCLint) BuildAnalyzers

func (c *CCCLint) BuildAnalyzers() ([]*analysis.Analyzer, error)

func (*CCCLint) GetLoadMode

func (c *CCCLint) GetLoadMode() string

type Settings

type Settings struct {
}

Directories

Path Synopsis
cmd
ccclint command

Jump to

Keyboard shortcuts

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