sleuth checks that you declared a slice with length and you are trying append to the slice.

sleuth

test_and_lint

sleuth detects when an append is used on a slice with an initial size.

Instruction

go install github.com/sivchari/sleuth/cmd/sleuth

Usage

package main

func main() {
	test := []int{1, 2, 3, 4, 5}
	a := make([]int, 5)
	for _, tt := range test {
		a = append(a, tt)
	}
}

fish

$ go vet -vettool=(which sleuth) ./...
main.go:7:3: sleuth found you are trying append to a slice with an initial size

bash

$ go vet -vettool=`which sleuth` ./...
main.go:7:3: sleuth found you are trying append to a slice with an initial size

CI

CircleCI

- run:
    name: Install sleuth
    command: go get github.com/sivchari/sleuth

- run:
    name: Run sleuth
    command: go vet -vettool=`which sleuth` ./...

GitHub Actions

- name: Install sleuth
    run: go get github.com/sivchari/sleuth

- name: Run sleuth
    run: go vet -vettool=`which sleuth` ./...
Owner
sivchari
Therefore I am
sivchari
Similar Resources

preflight helps you verify scripts and executables to mitigate chain of supply attacks such as the recent Codecov hack.

preflight helps you verify scripts and executables to mitigate chain of supply attacks such as the recent Codecov hack.

đŸ’Ŗ Mitigate chain of supply attacks 👌 Verify your curl scripts and executables 🤔 What is it? preflight helps you verify scripts and executables to m

Nov 18, 2022

This plugin helps you to use the AWS Command Line Interface (AWS CLI) to start and end sessions to your managed instances

Session Manager Plugin This plugin helps you to use the AWS Command Line Interface (AWS CLI) to start and end sessions to your managed instances. Sess

Dec 28, 2022

A pain of glass between you and your Kubernetes clusters.

kube-lock A pain of glass between you and your Kubernetes clusters. Sits as a middle-man between you and kubectl, allowing you to lock and unlock cont

Oct 20, 2022

Fleex allows you to create multiple VPS on cloud providers and use them to distribute your workload.

Fleex allows you to create multiple VPS on cloud providers and use them to distribute your workload.

Fleex allows you to create multiple VPS on cloud providers and use them to distribute your workload. Run tools like masscan, puredns, ffuf, httpx or a

Dec 31, 2022

Prestic - Lets you define and run restic commands from a YAML file

Pete's Restic Lets you define and run restic commands from a YAML file. Features

Jan 10, 2022

Jenkins CLI allows you manage your Jenkins as an easy way

Quick start įŽ€äŊ“中文 Jenkins CLI Jenkins CLI allows you manage your Jenkins in an easy way. No matter if you're a plugin developer, administrator or just

Jan 4, 2023

Bubbly is an open-source platform that gives you confidence in your continuous release process.

Bubbly is an open-source platform that gives you confidence in your continuous release process.

Bubbly Bubbly - Release Readiness in a Bubble Bubbly emerged from a need that many lean software teams practicing Continuous Integration and Delivery

Nov 29, 2022

How you can use Go to replace YAML files with Kubernetes.

YamYams A small project that is free to use. 🎉 I wanted to offer a starting point for anyone interested in replacing YAML with Go. You can read more

Jan 6, 2023

This is a SSH CA that allows you to retrieve a signed SSH certificate by authenticating to Duo.

github-duo-ssh-ca Authenticate to GitHub Enterprise in a secure way by requiring users to go through a Duo flow to get a short-lived SSH certificate t

Jan 7, 2022
A distributed append only commit log used for quick writes and reads to any scale
A distributed append only commit log used for quick writes and reads to any scale

Maestro-DB A distributed append only commit log used for quick writes and reads to any scale Part 1 - Scaffolding Part-1 Notes Going to start off with

Nov 28, 2021
The dumb container runtime trying to be compatible with Kubernetes CRI

Go Dumb CRI The dumb container runtime trying to be compatible with Kubernetes CRI. Usage Run the server and create an IPC socket in /tmp/go-dumbcri.s

Dec 12, 2021
Open Source runtime scanner for OpenShift cluster and perform security audit checks based on CIS RedHat OpenShift Benchmark specification
Open Source runtime scanner for OpenShift cluster and perform security audit checks based on CIS RedHat OpenShift Benchmark specification

OpenShift-Ordeal Scan your Openshift cluster !! OpenShift-Ordeal is an open source audit scanner who perform audit check on OpenShift Cluster and outp

Sep 6, 2022
Prevent Kubernetes misconfigurations from ever making it (again 😤) to production! The CLI integration provides policy enforcement solution to run automatic checks for rule violations. Docs: https://hub.datree.io
Prevent Kubernetes misconfigurations from ever making it  (again 😤) to production! The CLI integration provides policy enforcement solution to run automatic checks for rule violations.  Docs: https://hub.datree.io

What is Datree? Datree helps to prevent Kubernetes misconfigurations from ever making it to production. The CLI integration can be used locally or in

Jan 1, 2023
Open Source runtime scanner for Linux containers (LXD), It performs security audit checks based on CIS Linux containers Benchmark specification
Open Source runtime scanner for Linux containers (LXD), It performs security audit checks based on CIS Linux containers  Benchmark specification

lxd-probe Scan your Linux container runtime !! Lxd-Probe is an open source audit scanner who perform audit check on a linux container manager and outp

Dec 26, 2022
go-ima is a tool that checks if a file has been tampered with. It is useful in ensuring integrity in CI systems
go-ima is a tool that checks if a file has been tampered with.  It is useful in ensuring integrity in CI systems

go-ima Tool that checks the ima-log to see if a file has been tampered with. How to use Set the IMA policy to tcb by configuring GRUB GRUB_CMDLINE_LIN

Apr 26, 2022
GitHub Action: Compose multiple (conditional) checks into a single check based on file paths in a pull request
GitHub Action: Compose multiple (conditional) checks into a single check based on file paths in a pull request

GitHub Action: Composite Example Usage --- name: All Checks on: pull_request: branches: - main jobs: meta: runs-on: - ubuntu-20.

Dec 29, 2022
Controller-check - Run checks against K8s controllers to verify if they meets certain conventions

controller-check Run checks against K8s controllers to verify if they meets cert

Jan 4, 2022
:recycle: Now you can easily rollback to previous deployed images whatever you want on k8s environment

EasyRollback EasyRollback is aim to easy rollback to previous images that deployed on k8s environment Installation You should have go installation fir

Dec 24, 2022