1
1
mirror of https://github.com/wader/fq.git synced 2024-12-22 12:51:38 +03:00

golangci-lint: Disable revive unused-parameter and update for new default config

unused-parameter disabled as i prefer to see the names
new default revive config seems to not warn about capital names
This commit is contained in:
Mattias Wadman 2023-03-18 22:56:17 +01:00
parent c9608939a7
commit 0b6ef2a9d8
23 changed files with 4 additions and 44 deletions

View File

@ -25,6 +25,10 @@ linters:
- wastedassign
linters-settings:
revive:
rules:
- name: unused-parameter
disabled: true
exhaustive:
default-signifies-exhaustive: true
gosec:

View File

@ -1,6 +1,4 @@
// Package all registers all builtin formats with the default registry
//
//nolint:revive
package all
import (

View File

@ -45,7 +45,6 @@ func (m strTable) MapUint(s scalar.Uint) (scalar.Uint, error) {
return s, nil
}
//nolint:revive
const (
MH_MAGIC = 0xfeed_face
MH_CIGAM = 0xcefa_edfe
@ -228,7 +227,6 @@ var fileTypes = scalar.UintMapSymStr{
0xb: "kext_bundle",
}
//nolint:revive
const (
LC_REQ_DYLD = 0x80000000
LC_SEGMENT = 0x1

View File

@ -23,7 +23,6 @@ func init() {
})
}
//nolint:revive
const FAT_MAGIC = 0xcafe_babe
func machoFatDecode(d *decode.D) any {

View File

@ -15,7 +15,6 @@ func init() {
})
}
//nolint:revive
const (
OBU_SEQUENCE_HEADER = 1
OBU_TEMPORAL_DELIMITER = 2

View File

@ -1,4 +1,3 @@
//nolint:revive
package elf
// https://refspecs.linuxbase.org/elf/gabi4+/contents.html

View File

@ -9,8 +9,6 @@ const (
)
// TODO: change to CamelCase?
//
//nolint:revive
const (
ALL = "all"

View File

@ -4,8 +4,6 @@ import "github.com/wader/fq/pkg/scalar"
// from https://www.tcpdump.org/linktypes.html
// TODO cleanup
//
//nolint:revive
const (
LinkTypeNULL = 0
LinkTypeETHERNET = 1

View File

@ -124,7 +124,6 @@ func main() {
root := os.Args[4]
fmt.Printf("// Code below generated from %s\n", xmlPath)
fmt.Printf("//nolint:revive\n")
fmt.Printf("package %s\n", pkgName)
fmt.Printf("import (\n")
fmt.Printf(" %q\n", ebmlPkgPath)

View File

@ -1,4 +1,3 @@
//nolint:revive
package ebml_matroska
// https://raw.githubusercontent.com/ietf-wg-cellar/matroska-specification/master/ebml_matroska.xml

View File

@ -1,6 +1,4 @@
// Code below generated from ebml_matroska.xml
//
//nolint:revive
package ebml_matroska
import (

View File

@ -5,8 +5,6 @@ import (
)
// based on ffmpeg libavformat/isom.c ff_mp4_obj_type
//
//nolint:revive
const (
MPEGObjectTypeMOV_TEXT = 0x08
MPEGObjectTypeMPEG4 = 0x20
@ -131,7 +129,6 @@ var MpegObjectTypeStreamType = map[uint64]int{
MPEGObjectTypeNONE: MPEGStreamTypeUnknown,
}
//nolint:revive
const (
MPEGAudioObjectTypeMain = 1
MPEGAudioObjectTypeLC = 2
@ -192,8 +189,6 @@ var MPEGAudioObjectTypeNames = scalar.UintMap{
}
// based on ffmpeg/libavutil/pixfmt.h
//
//nolint:revive
var ISO_23091_2_ColourPrimariesMap = scalar.UintMap{
1: {Sym: "bt709", Description: "ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP 177 Annex B"},
2: {Sym: "unspecified", Description: "Unspecified"},
@ -210,7 +205,6 @@ var ISO_23091_2_ColourPrimariesMap = scalar.UintMap{
22: {Sym: "ebu3213", Description: "EBU Tech. 3213-E (nothing there) / one of JEDEC P22 group phosphors"},
}
//nolint:revive
var ISO_23091_2_TransferCharacteristicMap = scalar.UintMap{
1: {Sym: "bt709", Description: "ITU-R BT1361"},
2: {Sym: "unspecified", Description: "Unspecified"},
@ -232,7 +226,6 @@ var ISO_23091_2_TransferCharacteristicMap = scalar.UintMap{
18: {Sym: "arib_std_b67", Description: "ARIB STD-B67, known as Hybrid log-gamma"},
}
//nolint:revive
var ISO_23091_2_MatrixCoefficients = scalar.UintMap{
0: {Sym: "rgb", Description: "GBR, IEC 61966-2-1 (sRGB), YZX and ST 428-1"},
1: {Sym: "bt709", Description: "ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / derived in SMPTE RP 177 Annex B"},
@ -252,8 +245,6 @@ var ISO_23091_2_MatrixCoefficients = scalar.UintMap{
}
// based on ffmpeg libavformat/riff.c
//
//nolint:revive
const (
WAVTagPCM_S16LE = 0x0001
WAVTagADPCM_MS = 0x0002
@ -405,8 +396,6 @@ var WAVTagNames = scalar.UintMapSymStr{
}
// based on ffmpeg libavformat/riff.c
//
//nolint:revive
const (
BMPTagH264 = "H264"
BMPTagH264_h264 = "h264"

View File

@ -48,7 +48,6 @@ var syntaxElementNames = scalar.UintMapSymStr{
TERM: "TERM",
}
//nolint:revive
const (
EXT_FILL = 0x0
EXT_FILL_DATA = 0x1
@ -67,7 +66,6 @@ var extensionPayloadIDNames = scalar.UintMapSymStr{
EXT_SBR_DATA_CRC: "EXT_SBR_DATA_CRC",
}
//nolint:revive
const (
ONLY_LONG_SEQUENCE = 0x0
LONG_START_SEQUENCE = 0x1

View File

@ -1,4 +1,3 @@
//nolint:revive
package mpeg
import (

View File

@ -22,7 +22,6 @@ func init() {
})
}
//nolint:revive
const (
CMD_END = 0xff
FSTA_DSP = 0x00

View File

@ -1,4 +1,3 @@
//nolint:revive
package tiff
import "github.com/wader/fq/pkg/scalar"

View File

@ -58,9 +58,6 @@ def enum($name):
| ($params | map(.hash) | unique | prefix_specials("Hash")) as $hashs
| "// Package ciphersuites defines TLS and SSL cipher suit properties"
, "// generated by ciphersuites.jq"
, "//"
, "// Ignored lint warnings to keep same names as in spec"
, "//nolint:revive"
, "package ciphersuites"
, ($protos | enum("Protocol"))
, ($kas | enum("KeyAgreement"))

View File

@ -1,9 +1,5 @@
// Package ciphersuites defines TLS and SSL cipher suit properties
// generated by ciphersuites.jq
//
// Ignored lint warnings to keep same names as in spec
//
//nolint:revive
package ciphersuites
type Protocol int

View File

@ -4,7 +4,6 @@ import "github.com/wader/fq/pkg/scalar"
// https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values-1.csv
//nolint:revive
const (
// fq -d csv -r '.[1:][] | select(.[1] | test("unassigned|reserved";"i") | not) | "extension\(.[1]) = \(.[0] | .[0:4] + . [7:] | ascii_downcase)"' tls-extensiontype-values-1.csv
extensionServerName = 0

View File

@ -55,7 +55,6 @@ func init() {
interp.RegisterFS(tlsFS)
}
//nolint:revive
const (
versionSSL = 0x0300
versionTLS_1_0 = 0x0301

View File

@ -25,7 +25,6 @@ var vp9FeatureIDNames = scalar.UintMapSymStr{
vp9FeatureChromaSubsampling: "Chroma Subsampling",
}
//nolint:revive
const (
CS_UNKNOWN = 0
CS_BT_601 = 1

View File

@ -143,7 +143,6 @@ func (c BarColumn) Write(p []byte) (int, error) { return len(p), nil } // TODO:
func (c BarColumn) Lines() int { return 1 }
func (c BarColumn) PreFlush() {}
func (c BarColumn) FlushLine(w io.Writer, lineNr int, lastColumn bool) error {
if _, err := w.Write([]byte(c)); err != nil {
return err
}

View File

@ -11,8 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
//nolint:revive
package mathex
import "unsafe"