aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/phayes
diff options
context:
space:
mode:
authorTaras Madan <tarasmadan@google.com>2023-02-22 22:16:50 +0100
committerTaras Madan <tarasmadan@google.com>2023-02-24 12:47:23 +0100
commit4165372ec8fd142475a4e35fd0cf4f8042132208 (patch)
tree21cd62211b4dd80bee469054c5b65db77342333c /vendor/github.com/phayes
parent2b3ed821a493b8936c8bacfa6f8b4f1c90a00855 (diff)
dependencies: update
set go min requirements to 1.19 update dependencies update vendor
Diffstat (limited to 'vendor/github.com/phayes')
-rw-r--r--vendor/github.com/phayes/checkstyle/.scrutinizer.yml15
-rw-r--r--vendor/github.com/phayes/checkstyle/LICENSE29
-rw-r--r--vendor/github.com/phayes/checkstyle/README.md44
-rw-r--r--vendor/github.com/phayes/checkstyle/checkstyle.go112
-rw-r--r--vendor/github.com/phayes/checkstyle/godoc.go36
5 files changed, 0 insertions, 236 deletions
diff --git a/vendor/github.com/phayes/checkstyle/.scrutinizer.yml b/vendor/github.com/phayes/checkstyle/.scrutinizer.yml
deleted file mode 100644
index d9284b6b4..000000000
--- a/vendor/github.com/phayes/checkstyle/.scrutinizer.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-build:
- dependencies:
- before:
- - 'source <(curl -fsSL https://raw.githubusercontent.com/phayes/go-scrutinize/master/install-golang)'
-
- tests:
- override:
- -
- command: 'cd $PROJECTPATH && go-scrutinize'
- coverage:
- file: 'coverage.xml'
- format: 'clover'
- analysis:
- file: 'checkstyle_report.xml'
- format: 'general-checkstyle' \ No newline at end of file
diff --git a/vendor/github.com/phayes/checkstyle/LICENSE b/vendor/github.com/phayes/checkstyle/LICENSE
deleted file mode 100644
index 6dc912f39..000000000
--- a/vendor/github.com/phayes/checkstyle/LICENSE
+++ /dev/null
@@ -1,29 +0,0 @@
-BSD 3-Clause License
-
-Copyright (c) 2017, Patrick D Hayes
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-* Neither the name of the copyright holder nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/phayes/checkstyle/README.md b/vendor/github.com/phayes/checkstyle/README.md
deleted file mode 100644
index 358cf6752..000000000
--- a/vendor/github.com/phayes/checkstyle/README.md
+++ /dev/null
@@ -1,44 +0,0 @@
-# checkstyle
-[![GoDoc](https://godoc.org/github.com/phayes/checkstyle?status.svg)](https://godoc.org/github.com/phayes/checkstyle)
-[![Go Report Card](https://goreportcard.com/badge/github.com/phayes/checkstyle)](https://goreportcard.com/report/github.com/phayes/checkstyle)
-[![Build Status](https://scrutinizer-ci.com/g/phayes/checkstyle/badges/build.png?b=master)](https://scrutinizer-ci.com/g/phayes/checkstyle/build-status/master)
-
-Read and write checksyle_report.xml files with golang
-
-Checkstyle XML files are a standard file format for reporting errors in source code, and is often generated by static analysis tools.
-
-Example usage:
-
-```go
-
-import "github.com/phayes/checkstyle"
-
-// Print XML into human readable format
-checkSyle, err := checkstyle.ReadFile("checkstyle_report.xml")
-if err != nil {
- log.Fatal(err)
-}
-for _, file := range checkStyle.File {
- fmt.Println(File.Name)
- for _, codingError := range file.Error {
- fmt.Println("\t", codingError.Line, codingError.Message)
- }
-}
-
-// Create a new XML file from scratch
-check := checkstyle.New()
-
-// Ensure that a file has been added
-file := check.EnsureFile("/path/to/file")
-
-// Create an error on line 10
-codingError := checkstyle.NewError(10, "format", "line must end with a full stop")
-
-// Add the error to the file
-file.AddError(codingError)
-
-// Output XML
-fmt.Print(check)
-```
-
-For more information on checkstyle XML see: http://checkstyle.sourceforge.net/checks.html
diff --git a/vendor/github.com/phayes/checkstyle/checkstyle.go b/vendor/github.com/phayes/checkstyle/checkstyle.go
deleted file mode 100644
index cabbd4b40..000000000
--- a/vendor/github.com/phayes/checkstyle/checkstyle.go
+++ /dev/null
@@ -1,112 +0,0 @@
-package checkstyle
-
-import "encoding/xml"
-import "io/ioutil"
-
-// DefaultCheckStyleVersion defines the default "version" attribute on "<checkstyle>" lememnt
-var DefaultCheckStyleVersion = "1.0.0"
-
-// Severity defines a checkstyle severity code
-type Severity string
-
-var (
- SeverityError Severity = "error"
- SeverityInfo Severity = "info"
- SeverityWarning Severity = "warning"
- SeverityIgnore Severity = "ignore"
- SeverityNone Severity
-)
-
-// CheckStyle represents a <checkstyle> xml element found in a checkstyle_report.xml file.
-type CheckStyle struct {
- XMLName xml.Name `xml:"checkstyle"`
- Version string `xml:"version,attr"`
- File []*File `xml:"file"`
-}
-
-// AddFile adds a checkstyle.File with the given filename.
-func (cs *CheckStyle) AddFile(csf *File) {
- cs.File = append(cs.File, csf)
-}
-
-// GetFile gets a CheckStyleFile with the given filename.
-func (cs *CheckStyle) GetFile(filename string) (csf *File, ok bool) {
- for _, file := range cs.File {
- if file.Name == filename {
- csf = file
- ok = true
- return
- }
- }
- return
-}
-
-// EnsureFile ensures that a CheckStyleFile with the given name exists
-// Returns either an exiting CheckStyleFile (if a file with that name exists)
-// or a new CheckStyleFile (if a file with that name does not exists)
-func (cs *CheckStyle) EnsureFile(filename string) (csf *File) {
- csf, ok := cs.GetFile(filename)
- if !ok {
- csf = NewFile(filename)
- cs.AddFile(csf)
- }
- return csf
-}
-
-// String implements Stringer. Returns as xml.
-func (cs *CheckStyle) String() string {
- checkStyleXML, err := xml.Marshal(cs)
- if err != nil {
- panic(err)
- }
- return string(checkStyleXML)
-}
-
-// New returns a new CheckStyle
-func New() *CheckStyle {
- return &CheckStyle{Version: DefaultCheckStyleVersion, File: []*File{}}
-}
-
-// File represents a <file> xml element.
-type File struct {
- XMLName xml.Name `xml:"file"`
- Name string `xml:"name,attr"`
- Error []*Error `xml:"error"`
-}
-
-// AddError adds a checkstyle.Error to the file.
-func (csf *File) AddError(cse *Error) {
- csf.Error = append(csf.Error, cse)
-}
-
-// NewFile creates a new checkstyle.File
-func NewFile(filename string) *File {
- return &File{Name: filename, Error: []*Error{}}
-}
-
-// Error represents a <error> xml element
-type Error struct {
- XMLName xml.Name `xml:"error"`
- Line int `xml:"line,attr"`
- Column int `xml:"column,attr,omitempty"`
- Severity Severity `xml:"severity,attr,omitempty"`
- Message string `xml:"message,attr"`
- Source string `xml:"source,attr"`
-}
-
-// NewError creates a new checkstyle.Error
-// Note that line starts at 0, and column starts at 1
-func NewError(line int, column int, severity Severity, message string, source string) *Error {
- return &Error{Line: line, Column: column, Severity: severity, Message: message, Source: source}
-}
-
-// ReadFile reads a checkfile.xml file and returns a CheckStyle object.
-func ReadFile(filename string) (*CheckStyle, error) {
- checkStyleXML, err := ioutil.ReadFile(filename)
- if err != nil {
- return nil, err
- }
- checkStyle := New()
- err = xml.Unmarshal(checkStyleXML, checkStyle)
- return checkStyle, err
-}
diff --git a/vendor/github.com/phayes/checkstyle/godoc.go b/vendor/github.com/phayes/checkstyle/godoc.go
deleted file mode 100644
index c9662fe9e..000000000
--- a/vendor/github.com/phayes/checkstyle/godoc.go
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
-Package checkstyle allows the parsing of generation of checkstyle XML files.
-
-Checkstyle XML files are a standard file format for reporting errors in source code, and is often generated by static analysis tools.
-
-Example usage:
- // Print XML into human readable format
- checkSyle, err := checkstyle.ReadFile("checkstyle_report.xml")
- if err != nil {
- log.Fatal(err)
- }
- for _, file := range checkStyle.File {
- fmt.Println(File.Name)
- for _, codingError := range file.Error {
- fmt.Println("\t", codingError.Line, codingError.Message)
- }
- }
-
- // Create a new XML file from scratch
- check := checkstyle.New()
-
- // Ensure that a file has been added
- file := check.EnsureFile("/path/to/file")
-
- // Create an error on line 10, column 5
- codingError := checkstyle.NewError(10, 5, checkstyle.SeverityWarning, "format", "line must end with a full stop")
-
- // Add the error to the file
- file.AddError(codingError)
-
- // Output XML
- fmt.Print(check)
-
-For more information on checkstyle XML see: http://checkstyle.sourceforge.net/checks.html
-*/
-package checkstyle