All Projects → DimitarPetrov → godoc-generate

DimitarPetrov / godoc-generate

Licence: MIT license
Default godoc generator - make your first steps towards better code documentation

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to godoc-generate

Github Action
Coveralls Github Action
Stars: ✭ 214 (+919.05%)
Mutual labels:  code-quality
libusb
Go bindings for the C libusb library.
Stars: ✭ 74 (+252.38%)
Mutual labels:  godoc
effective-code-review
Presentation about my process for making code reviews as effective as possible
Stars: ✭ 63 (+200%)
Mutual labels:  code-quality
Flakehell
Flake8 wrapper to make it nice, legacy-friendly, configurable.
Stars: ✭ 217 (+933.33%)
Mutual labels:  code-quality
Vim Fibo Indent
Fibonacci Indentation for Vim.
Stars: ✭ 244 (+1061.9%)
Mutual labels:  code-quality
jsonpath
No description or website provided.
Stars: ✭ 117 (+457.14%)
Mutual labels:  godoc
Gradle Baseline
A set of Gradle plugins that configure default code quality tools for developers.
Stars: ✭ 191 (+809.52%)
Mutual labels:  code-quality
superhelp
Python help that really helps
Stars: ✭ 27 (+28.57%)
Mutual labels:  code-quality
Interrogate
Explain yourself! Interrogate a codebase for docstring coverage.
Stars: ✭ 245 (+1066.67%)
Mutual labels:  code-quality
memcheck-cover
An HTML generator for Valgrind's Memcheck tool
Stars: ✭ 30 (+42.86%)
Mutual labels:  code-quality
Tslint React Hooks
TSLint rule for detecting invalid uses of React Hooks
Stars: ✭ 218 (+938.1%)
Mutual labels:  code-quality
Htmlhint
⚙️ The static code analysis tool you need for your HTML
Stars: ✭ 2,723 (+12866.67%)
Mutual labels:  code-quality
moddoc
A GOPROXY Documentation Generator
Stars: ✭ 33 (+57.14%)
Mutual labels:  godoc
Code Review Checklist
This code review checklist helps you be a more effective and efficient code reviewer.
Stars: ✭ 214 (+919.05%)
Mutual labels:  code-quality
javascript-test-reporter
DEPRECATED Code Climate test reporter client for JavaScript projects
Stars: ✭ 68 (+223.81%)
Mutual labels:  code-quality
Dotenv Linter
☺️ Linting dotenv files like a charm!
Stars: ✭ 207 (+885.71%)
Mutual labels:  code-quality
go-notebook
Go-Notebook is inspired by Jupyter Project (link) in order to document Golang code.
Stars: ✭ 33 (+57.14%)
Mutual labels:  godoc
godocc
go doc with colors
Stars: ✭ 134 (+538.1%)
Mutual labels:  godoc
madon
Golang Mastodon API library
Stars: ✭ 66 (+214.29%)
Mutual labels:  godoc
agollo
🚀Go client for ctrip/apollo (https://github.com/apolloconfig/apollo)
Stars: ✭ 563 (+2580.95%)
Mutual labels:  godoc

godoc-generate

Go Report Card

Overview

godoc-generate is a simple command line tool that generates default godoc comments on all exported types, functions, consts and vars in the current working directory and recursively for all subdirectories.

The godoc comments looks like this:

// %s missing godoc.

Where %s is the name of the type/func/const/var.

NOTE: The comment format can be overridden via the --format flag.

Installation

Installing from Source

go install github.com/DimitarPetrov/godoc-generate@latest

Demonstration

Let's say you have a simple Multiply function without godoc:

func Multiply(a,b int) int {
	return a * b
}

It is exported, therefore it is part of the package's interface. It is ideomatic to add godoc on everything exported in your package.

If you run godoc-genenrate the code will be rewritten the following way:

// Multiply missing godoc.
func Multiply(a, b int) int {
	return a * b
}

This way you are safe to add a linter enforcing godoc and migrate all legacy code gradually.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].