mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
Bump golangci-lint, more gocritic linters (#8052)
- Bump golangci-lint -> 2.6.2 - Fix all `deprecatedComment` "notices should be in a dedicated paragraph, separated from the rest" reports - Enable `appendCombine` and fix all "appendCombine: can combine chain of X appends into one" notices - Enable `preferFprint` and fix the few reported issues - Fix various issues reported only once or twice, like `zeroByteRepeat` Signed-off-by: Anders Eknert <anders.eknert@apple.com>
This commit is contained in:
@@ -77,6 +77,7 @@ func Schemas(schemaPath string) (*ast.SchemaSet, error) {
|
||||
}
|
||||
|
||||
// All returns a Result object loaded (recursively) from the specified paths.
|
||||
//
|
||||
// Deprecated: Use FileLoader.Filtered() instead.
|
||||
func All(paths []string) (*Result, error) {
|
||||
return NewFileLoader().Filtered(paths, nil)
|
||||
@@ -85,6 +86,7 @@ func All(paths []string) (*Result, error) {
|
||||
// Filtered returns a Result object loaded (recursively) from the specified
|
||||
// paths while applying the given filters. If any filter returns true, the
|
||||
// file/directory is excluded.
|
||||
//
|
||||
// Deprecated: Use FileLoader.Filtered() instead.
|
||||
func Filtered(paths []string, filter Filter) (*Result, error) {
|
||||
return NewFileLoader().Filtered(paths, filter)
|
||||
@@ -93,6 +95,7 @@ func Filtered(paths []string, filter Filter) (*Result, error) {
|
||||
// AsBundle loads a path as a bundle. If it is a single file
|
||||
// it will be treated as a normal tarball bundle. If a directory
|
||||
// is supplied it will be loaded as an unzipped bundle tree.
|
||||
//
|
||||
// Deprecated: Use FileLoader.AsBundle() instead.
|
||||
func AsBundle(path string) (*bundle.Bundle, error) {
|
||||
return NewFileLoader().AsBundle(path)
|
||||
|
||||
Reference in New Issue
Block a user