phpcs

package
v0.0.0-...-e9fe98c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPhpcsCompatibility

func GetPhpcsCompatibility(fullResults tide.PhpcsResults) ([]string, []string, interface{})

GetPhpcsCompatibility runs the PHPCompatiblity post processing and determines the compatible versions.

A detailed report is also sent to a storage provider which contains a structure ordered by each violating sniff which gives: - the PHP versions effected by the violation - the impacted files and relevant phpcs messages

Process is required to implement audit.PostProcessor.

func GetPhpcsSummary

func GetPhpcsSummary(fullResults tide.PhpcsResults) *tide.PhpcsSummary

GetPhpcsSummary loops through all reported files and leaves only summary information.

Types

type FilePosition

type FilePosition struct {
	Line   int `json:"line"`
	Column int `json:"column"`
}

FilePosition describes where a violation occurred.

type PhpCompatDetails

type PhpCompatDetails struct {
	Totals     map[string]int                       `json:"totals"`
	ErrorMap   map[string][]string                  `json:"error_map"`
	WarningMap map[string][]string                  `json:"warning_map"`
	Errors     map[string]PhpCompatDetailsViolation `json:"errors"`
	Warnings   map[string]PhpCompatDetailsViolation `json:"warnings"`
}

PhpCompatDetails describes details from `phpcs` phpcompatibility rules.

type PhpCompatDetailsViolation

type PhpCompatDetailsViolation struct {
	Message  string                    `json:"message"`
	Source   string                    `json:"source"`
	Type     string                    `json:"type"`
	Severity int                       `json:"severity"`
	Versions []string                  `json:"versions"`
	Files    map[string][]FilePosition `json:"files"`
}

PhpCompatDetailsViolation describes a single violation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL