Dave Protasowski
ee1db869c7
Update linter config and address lint warnings/failures ( #3068 )
...
* fix whitespace linter
* fix usestdlibvars
* fix staticheck
* ignore spancheck warning
* fix linter perfsprint
* fix nolintlint feedback
* fix nilerr lint checks
* fix misspell
* fix mirror lint
* fix intrange linter
* fix gofumpt linter
* fix gosec linter - ignore warning since default min tls version is 1.3
* fix gocritic linter
* fix whitespace
* fix fatcontext linter
* fix errorlint
* fix errname linter
* fix copyloopvar (go1.22) linter
* fix bodyclose linter
* update linter config
* add script to format code
* fix unit test
2024-06-25 14:49:36 +00:00
Dave Protasowski
8535fcc248
gofumpt the repo ( #3067 )
...
* gofumpt the repo
* don't prefix numbers with 0 - otherwise they're octal
2024-06-25 07:27:07 +00:00
Josh Soref
b39d5da935
Spelling ( #1797 )
...
* spelling: adopted
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: aliased
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: apierrs
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: assignment
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: available
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: coexistence
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: commit
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: conversions
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: creates
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: custom
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: determine
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: different
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: distribution
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: duplicate
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: editing
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: endpoint
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: environment
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: generate
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: implementation
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: identified
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: ignore
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: indicates
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: interface
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: interleaved
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: labels
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: label
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: mimic
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: namespaced
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: necessary
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: organization
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: populatable
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: prometheus
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: refer
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: reference
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: repetitive
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: response
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: something
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: specable
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: spoofing
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: synchronized
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: this
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: trailing
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: unsupported
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: validation
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* chore: reviewdog go header boilerplate
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2020-10-18 14:22:57 -07:00
Markus Thömmes
5fbbde31b3
Align linters with serving (enables stylecheck and asciicheck) ( #1738 )
2020-09-23 07:37:40 -07:00
Matt Moore
43ca049cdb
Reduce the boilerplate for setting up duck.InformerFactory's. ( #896 )
...
This augments the injection codegen with the capability to produce a duck.InformerFactory
attached to context for each type that we process.
Now a `duck.InformerFactory` for "Addressable" can be produced by "Get"ing it from the context.
This is triggered by placing `// +genduck` on the type that implements `duck.Implementable`.
2019-11-25 09:57:10 -08:00
Victor Agababov
74c5d67ea0
Fix the issues pointed out by staticcheck ( #541 )
...
* Fix the issues pointed out by staticcheck
* review fix
2019-07-23 13:13:36 -07:00
Dave Protasowski
d6a2e27f7b
🦆 Duck Typing - add a ConformsToType helper ( #220 )
...
* duck typing - add a ConformsToType helper
Unlike VerifyType, ConformsToType will return the following:
- an error when any marshalling/unmarshalling fails
- false when the concrete type does not implement the duck type
- true when the concrete type implements the duck type
* use knative/pkg kmp to handle panics raised by go-cmp
2019-01-09 19:58:42 -08:00
Vincent Demeester
781d6bbc47
Move the use of `VerifyType` in tests ( #98 )
...
* Change VerifyType to return an error instead of panicking
Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
* Move the use of `VerifyType` in tests
Those calls to `duck.VerifyType` are done at runtime and thus could be
costly at program startup. Putting them under tests ensure we still
assert those types but during unit testing.
Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
2018-09-27 15:16:22 -07:00
Matt Moore
9a13caa7a1
WIP Define a package with which to support duck typed definitions. ( #71 )
...
This also sketches out the skeletons for Targettable, Subscribable, and Conditions.
2018-09-15 19:08:17 -07:00