πŸŽ„ Go code coverage to SVG treemap

Overview

πŸŽ„ Go cover to Treemap

Useful when you have large project with lots of files and packages

$ go install github.com/nikolaydubina/[email protected]
$ go test -coverprofile cover.out ./...
$ go-cover-heatmap -coverprofile cover.out > out.svg

github.com/gohugoio/hugo

example-hugo

..also available in 1080x360

example-hugo-small

github.com/gin-gonic/gin

example-gin

github.com/go-chi/chi

example-chi

github.com/nikolaydubina/treemap

example-treemap

github.com/nikolaydubina/go-featureprocessing

example-go-featureprocessing

Disclaimer

In all examples above I run go test -coverprofile <my-file> ./.... I did not do any special setup. Some projects may reuqire additional steps to properly run tets and generate full coverprofile. What you see is "lower bound" of coverage for those projects. All profiles generated on main branch of each project in GitHub on 2021-12-07.

Contributions

Welcomed! Add pretty color palettes! Add interesting examples!

Reference

Issues
  • add directory filter

    add directory filter

    • Created a Filter struct with a function to filter directory only.
    • Added a directory-only flag which is false by default.

    Possible fixes https://github.com/nikolaydubina/go-cover-treemap/issues/6

    Example how hugo looks: out

    opened by herlon214 8
  • Show only folder coverage

    Show only folder coverage

    Is there a way to see only the folder coverage? In projects with many files the output image shows the file names and sometimes they're really really small and you couldn't even read them, so it's not useful.

    For my case would be good to show the folder coverage. For example: I have

    pkg/
      user/
        controller/
        service/
        persistence/
    

    So I would like to see the coverage for the whole controller, service and persistence folders, not each file inside of them.


    Thanks in advance for the project idea, it's really useful!

    enhancement 
    opened by herlon214 2
  • Only folders showing files

    Only folders showing files

    It's probably a bug, once the only folders shouldn't show any file. If you take a look into the example in the README: https://github.com/nikolaydubina/go-cover-treemap/blob/main/docs/hugo-only-folders-no-aggregation.svg

    You can see it's still showing files, for instance: resources/images/exif/exif.go

    bug documentation 
    opened by herlon214 1
Releases(v1.3.0)
Owner
Nikolay Dubina
Nikolay Dubina
An unsupervised coverage-guided kernel fuzzer

syzkaller - kernel fuzzer syzkaller is an unsupervised coverage-guided kernel fuzzer. Linux kernel fuzzing has the most support, akaros, freebsd, fuch

Tinker Board 2 - Android 0 Oct 27, 2021
Scrappy is a cli tool that allows multiple web scrappers to monitor periodically for a basic ruleset coverage and inform users when the criteria have been met.

Scrappy - A multi-type web scrapper with alerting Scrappy is a cli tool that allows multiple web scrappers to monitor periodically for a basic ruleset

Michalis Zampetakis 0 Nov 7, 2021
A sample FaaS function that gets a stock quote and 30 day history by symbol and returns a HTML page with a generates SVG sparkline.

faas stonks This uses serverless technology to get a stock quote and 30 day sparkline from Yahoo Finance. Deployment Nimbella account Namespace with o

Jon Friesen 2 Sep 23, 2021
Sloc, Cloc and Code: scc is a very fast accurate code counter with complexity calculations and COCOMO estimates written in pure Go

Sloc Cloc and Code (scc) A tool similar to cloc, sloccount and tokei. For counting physical the lines of code, blank lines, comment lines, and physica

Ben Boyter 3.7k Aug 9, 2022
Reads from existing Cloud Providers (reverse Terraform) and generates your infrastructure as code on Terraform configuration

TerraCognita Imports your current Cloud infrastructure to an Infrastructure As Code Terraform configuration (HCL) or/and to a Terraform State. At Cycl

Cycloid 1.2k Aug 12, 2022
Display a message in morse code on your capslock LED, keyboard backlight or using your screen brightness!

halp halp is a command line utility that lets you display messages in morse code on your capslock LED, keyboard backlight (if you have it) or using yo

Madhav Jivrajani 25 Jan 26, 2022
A tiny "sandbox" to run untrusted code πŸ–οΈ

Sandy A tiny sandbox to run untrusted code. ??️ Sandy uses Ptrace to hook into READ syscalls, giving you the option to accept or deny syscalls before

Craig Mulligan 337 Jun 14, 2022
Automatic arrangement of Go source code

goarrange Ever wanted a consistent ordering for declarations in your Go code? With goarrange, you can automatically follow the conventions of GoDoc! C

Jasper Deflander 15 Dec 6, 2021
Source code editor in pure Go.

Editor Source code editor in pure Go. About This is a simple but advanced source code editor As the editor is being developed, the rules of how the UI

Jorge Miguel Pinto 251 Aug 6, 2022
Script to check open slot for 18+ age group in particular district and pin code area

Running instruction install go: 1.14 (might work with other versions as well) install following library for sending notifications go get -u github.com

Ajay Kumar Saini 4 Mar 22, 2022
Grab is a tool that downloads source code repositories into a convenient directory layout created from the repo's URL's domain and path

Grab is a tool that downloads source code repositories into a convenient directory layout created from the repo's URL's domain and path. It supports Git, Mercurial (hg), Subversion, and Bazaar repositories.

Jeff Hodges 19 Jun 2, 2022
(en|de)code urls from the CLI

hakurlencode (en|de)code urls from the CLI Installation go get github.com/hakluke/hakurlencode Usage Pipe into the tool with no options to encode, fo

Luke Stephens (hakluke) 5 Jun 9, 2022
The Code Templates for Basil CLI 🌿

Basil Templates ?? This repository includes code templates for miscellaneous programming languages and technologies. Basil CLI uses these templates fo

GardenBed 0 Dec 15, 2021
code is pretty self explanatory and decently commented

square_approximation code is pretty self explanatory and decently commented when limit set to 10^9 or more ram usage goes to >42 gigs of ram which is

null 0 Apr 7, 2022
Virtualization system for remote code execution.

Delta CLI Command line application for executing source code inside of a container. Build: go build -o ./delta-cli ./main.go Usage: ./delta-cli <path

null 1 Nov 20, 2021
Source code of a YouTube tutorial about writing terminal applications with Golang

Bubble Tea Demo 00 Source code of a YouTube tutorial about writing terminal applications with Golang by using Bubble Tea. Contains a simple counter ap

NicolΓ‘s Parada 4 Jul 26, 2022
Code examples for Algorithm Analysis and design (CS311) [School project]

Introduction Algorithm Analysis and design 2021/2022 Code examples implemeneted using golang Why Golang? Low Level programming language Awesome garbag

Mohammad Salah 0 Dec 5, 2021
Vale is a command-line tool that brings code-like linting to prose

Vale: Your style, our editor Vale is a command-line tool that brings code-like linting to prose. It's fast, cross-platform (Windows, macOS, and Linux)

errata.ai 2.6k Aug 11, 2022
Show Languages In Code. A fast and lightweight CLI to generate stats on the languages inside your project

slic Show Languages In Code. Usage Run it with an -h flag to list all commands. -d flag can be used to specify the directory of search -i flag can be

Saurav Pal 3 Dec 25, 2021