# README
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
Option | Default Value | Description |
---|---|---|
d | . | Directory: specifies the directory you want to use to lint the CODEOWNERS file |
f | Format: specifies the format you want to return lint results | |
t | Token: specifies the Github's token you want to use | |
tt | bearer | Token Type: specifies the Github's token type you want to use |
Exit Codes
Exit Code | Description |
---|---|
0 | Success: no errors returned |
1 | Warnings: linter returned a few warnings but no errors |
2 | Errors: linter returned a few errors |
3 | Unexpected 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.
# 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.
# 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.
# Type aliases
SeverityLevel exposes all possible levels of severity check results.