Maintidx measures the maintainability index of each function

maintidx

maintidx measures the maintainability index of each function.
Here for more information about this library.(Sorry, Japanese only)

What is maintainability index

The maintainability index is an index that measures the maintainability of source code.
The coefficients include cyclomatic complexity, halstead volume, and line of code.
This library used the rebased value provided by Microsoft.
The maintainability index is an experimental value, so don't expect too much from it, but the cyclomatic complexity used as a coefficient was found to be closely related to the number of times the code was edited.

Installation

Go version < 1.16

go get -u github.com/yagipy/maintidx/cmd/[email protected]

Go version 1.16+

go install github.com/yagipy/maintidx/cmd/[email protected]

Usage

standalone

maintidx ./...

with go run

No installation required

go run github.com/yagipy/maintidx/cmd/maintidx ./...

with go vet

go vet -vettool=`which maintidx` ./...

Flag

Flags:
  -under int
    	show functions with maintainability index < N only. (default 20)

TODO

  • Setup execute env on container
  • Impl cyc.Cyc.Calc()
  • Move maintidx.Visitor.PrintHalstVol to halstval package
  • Consider the necessity of halstvol.incrIfAllTrue
  • Test under pkg file
Owner
Hiroyuki Yagihashi
I love internet and software. I am interested in micro services, DevOps & web standards.
Hiroyuki Yagihashi
Similar Resources

Lightweight go web server that provides a searchable directory index.

autoindex Lightweight go web server that provides a searchable directory index. Optimized for handling large numbers of files (100k+) and remote file

Jan 5, 2023

Package for indexing zip files and storing a compressed index

zipindex zipindex provides a size optimized representation of a zip file to allow decompressing the file without reading the zip file index. It will o

Nov 30, 2022

Simple dense bitmap index in Go with binary operators

Simple dense bitmap index in Go with binary operators

This package contains a bitmap index which is backed by uint64 slice, easily encodable to/from a []byte without copying memory around so it can be present in both disk and memory. As opposed to something as roaring bitmaps, this is a simple implementation designed to be used for small to medium dense collections.

Jan 3, 2023

Owl is a db manager platform,committed to standardizing the data, index in the database and operations to the database, to avoid risks and failures.

Owl is a db manager platform,committed to standardizing the data, index in the database and operations to the database, to avoid risks and failures. capabilities which owl provides include Process approval、sql Audit、sql execute and execute as crontab、data backup and recover .

Nov 9, 2022

Go XML sitemap and sitemap index generator

Install go get github.com/turk/go-sitemap Example for sitemapindex func () main(c *gin.Context) { s := sitemap.NewSitemapIndex(c.Writer, true)

Jun 29, 2022

A river for elasticsearch to automatically index mysql content using the replication feed.

Mysql River Plugin for ElasticSearch The Mysql River plugin allows to hook into Mysql replication feed using the excellent python-mysql-replication an

Jun 1, 2022

Generate a global index for multiple markdown files recursively

Generate a global index for multiple markdown files recursively

markdown index Markdown-index is a library to help you generate a global index for multiple markdown files recursively in a directory, containing a su

Sep 25, 2022

A join table using a composite index with gorm and liquibase

Code to model checking in to events at kiosks. Context: A kiosk enables users to check in to one of several events. At the same time, multiple kiosks

Nov 29, 2021

A Simple Application written in go-lang that serves the index.html

go-web server A Simple Application written in go-lang that serves the index.html Running the Application, Well, make sure you have go installed to con

Nov 24, 2021

Prototype of signing container images in the index

Prototype for inline signing of images in the image index. When designing Notary v2 there was a strong consensus for having detached signatures. These

Aug 24, 2022

Highly customizable archive and index framework for EPITA

Highly customizable archive and index framework for EPITA

epitar.gz Highly customizable archive and index framework for EPITA. Get started

Nov 28, 2022

Go cmd util that prints cmd-line args with their index

echoidx This is an exercise of the book The Go Programming Language, by Alan A.

Dec 18, 2021

A customized go list with index, sort, append, pop, count, clear and last item methods

golist A customized go list with index, sort, append, pop, count, clear and last item methods About The list data type has some more methods. Here are

Mar 6, 2022

CudeX: a cloud native intelligent operation and maintenance engine that provides service measurement, index quantification

CudeX: a cloud native intelligent operation and maintenance engine that provides service measurement, index quantification

简介 CudgX是星汉未来推出的面向云原生时代的AIOps智能运维引擎,它通过各类服务的多维度、大数据量的数据收集及机器学习训练分析,对各种服务进行指标化、数字

Oct 13, 2022

Esdump is a migration CLI written in Go for migrating index mapping and data from one elasticsearch to another.

esdump Introduction esdump is a migration CLI written in Go for migrating index mapping and data from one elasticsearch to another. Compatibility Elas

Jul 23, 2022

🏵 Gee is tool of stdin to each files and stdout

🏵 Gee is tool of stdin to each files and stdout

Gee is tool of stdin to each files and stdout. It is similar to the tee command, but there are more functions for convenience. In addition, it was written as go. which provides output to stdout and files.

Nov 17, 2022

Kiara is a Go equivalent of Phoenix PubSub that makes it easy for Go applications to communicate with each other.

Kiara is a Go equivalent of Phoenix PubSub that makes it easy for Go applications to communicate with each other.

Kiara is a Go equivalent of Phoenix PubSub that makes it easy for Go applications to communicate with each other. Examples Basic Usage Custom Co

Nov 1, 2022

Run Jobs on a schedule, supports fixed interval, timely, and cron-expression timers; Instrument your processes and expose metrics for each job.

A simple process manager that allows you to specify a Schedule that execute a Job based on a Timer. Schedule manage the state of this job allowing you to start/stop/restart in concurrent safe way. Schedule also instrument this Job and gather metrics and optionally expose them via uber-go/tally scope.

Dec 8, 2022

A tool for exploring each layer in a docker image

A tool for exploring each layer in a docker image

dive A tool for exploring a docker image, layer contents, and discovering ways to shrink the size of your Docker/OCI image. To analyze a Docker image

Jan 9, 2023
Simple dense bitmap index in Go with binary operators
Simple dense bitmap index in Go with binary operators

This package contains a bitmap index which is backed by uint64 slice, easily encodable to/from a []byte without copying memory around so it can be present in both disk and memory. As opposed to something as roaring bitmaps, this is a simple implementation designed to be used for small to medium dense collections.

Jan 3, 2023
Randomly generated tile maps using Oskar Stålberg's wave function collapse algorithm
Randomly generated tile maps using Oskar Stålberg's wave function collapse algorithm

go-wfc Procedurally-generated tile maps using wave function collapse. Demos Live demo (wasm): https://zfedoran.github.io/go-wfc-example/ Live algorith

Dec 26, 2022
Turn any key/value index into a high-performance two-dimensional spatial index
Turn any key/value index into a high-performance two-dimensional spatial index

modular-spatial-index For the demo that this animated gif was generated from

Mar 6, 2022
atomic measures + Prometheus exposition library

About Atomic measures with Prometheus exposition for the Go programming language. This is free and unencumbered software released into the public doma

Sep 27, 2022
GO Implementation of Entropy Measures

goent - GO Implementation of Entropy Measures Measures for discrete state spaces Averaged measures Entropy Shannon Maximum Likelihood with Bias Correc

Dec 18, 2022
GoStats is a go library for math statistics mostly used in ML domains, it covers most of the statistical measures functions.

GoStats GoStats is an Open Source Go library for math statistics mostly used in Machine Learning domains, it covers most of the Statistical measures f

Nov 10, 2022
sqlbench measures and compares the execution time of one or more SQL queries.

sqlbench sqlbench measures and compares the execution time of one or more SQL queries. The main use case is benchmarking simple CPU-bound query varian

Dec 6, 2022
Ngram index for golang

go-ngram N-gram index for Go. Key features Unicode support. Append only. Data can't be deleted from index. GC friendly (all strings are pooled and com

Dec 29, 2022
AWS Lambda to work around index.html S3/CloudFront mess

No more index.html mess with AWS CloudFront/S3 Problem Consider you have a statically generated site — a bunch of usual resources, including html file

Jan 2, 2023
A tool to check for vulnerabilities in your Golang dependencies, powered by Sonatype OSS Index
A tool to check for vulnerabilities in your Golang dependencies, powered by Sonatype OSS Index

Nancy nancy is a tool to check for vulnerabilities in your Golang dependencies, powered by Sonatype OSS Index, and as well, works with Nexus IQ Server

Dec 22, 2022