Categorygithub.com/fmenezes/codeowners
modulepackage
0.3.3
Repository: https://github.com/fmenezes/codeowners.git
Documentation: pkg.go.dev

# README

Go Go Report Card Coverage Godoc

CODEOWNERS

CodeOwners package provides funcionality to evaluate CODEOWNERS file in Go. Also provides a CLI to lint.

Documentation

Package

To find package documentation follow https://godoc.org/github.com/fmenezes/codeowners

CLI

Installation

Simply run go get -u github.com/fmenezes/codeowners/cmd/codeownerslint

Usage

Simply calling codeownerslint will kick off the cli on the current directory.

Options
OptionDefault ValueDescription
d.Directory: specifies the directory you want to use to lint the CODEOWNERS file
fFormat: specifies the format you want to return lint results
tToken: specifies the Github's token you want to use
ttbearerToken Type: specifies the Github's token type you want to use
Exit Codes
Exit CodeDescription
0Success: no errors returned
1Warnings: linter returned a few warnings but no errors
2Errors: linter returned a few errors
3Unexpected errors: errors that prevented the linter from running

Compatibility

:warning: This module is on a v0 mode and it is not ready to be used, once it reaches the v1 we will lock the API.

# Packages

Package checkers contain pre built checkers to validate CODEOWNER files.
No description provided by the author

# Functions

AvailableCheckers returns list of registered checkers.
Check evaluates the file contents against the checkers and return the results back.
NewDecoder generates a new Decoder instance.
ParseLine parses a CODEOWNERS line into file pattern and owners.
RegisterChecker adds checker to be used later when checking CODEOWNERS files.

# Constants

Error serverity level.
Warning serverity level.

# Variables

DefaultLocations provides default locations for the CODEOWNERS file.

# Structs

CheckOptions provides parameters for running a list of checks.
CheckResult provides structured way to evaluate results of a CODEOWNERS validation check.
Decoder providers functionality to read CODEOWNERS data.
Position provides structured way to evaluate where a given validation result is located in the CODEOWNERs file.
Token providers reading capabilities for every CODEOWNERS line.
ValidatorOptions provide input arguments for checkers to use.

# Interfaces

Checker provides tools for validating CODEOWNER file contents.
Validator provides tools for validating CODEOWNER file contents.

# Type aliases

SeverityLevel exposes all possible levels of severity check results.