Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 97 for typechecker (0.65 sec)

  1. pkg/controller/validatingadmissionpolicystatus/controller.go

    	policyClient   admissionregistrationv1.ValidatingAdmissionPolicyInterface
    
    	// typeChecker checks the policy's expressions for type errors.
    	// Type of params is defined in policy.Spec.ParamsKind
    	// Types of object are calculated from policy.Spec.MatchingConstraints
    	typeChecker *validatingadmissionpolicy.TypeChecker
    }
    
    func (c *Controller) Run(ctx context.Context, workers int) {
    	defer utilruntime.HandleCrash()
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/typechecking_test.go

    				toHaveLengthOf(0),
    			},
    		},
    	} {
    		t.Run(tc.name, func(t *testing.T) {
    			typeChecker := buildTypeChecker(tc.schemaToReturn)
    			warnings := typeChecker.Check(tc.policy)
    			for _, a := range tc.assertions {
    				a(warnings, t)
    			}
    		})
    	}
    }
    
    func buildTypeChecker(schemaToReturn *spec.Schema) *TypeChecker {
    	restMapper := meta.NewDefaultRESTMapper([]schema.GroupVersion{
    		{
    			Group:   "",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 16.3K bytes
    - Viewed (0)
  3. analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/components/KtFe10SubtypingComponent.kt

            val typeChecker = analysisContext.resolveSession.kotlinTypeCheckerOfOwnerModule
            if (typeChecker !is NewKotlinTypeCheckerImpl) return typeChecker
    
            // `NewKotlinTypeCheckerImpl` is inconsistent with its error type leniency: `isSubtypeOf` is lenient by default while `equalTypes`
            // isn't. Hence, even without a `LENIENT` policy, we need to wrap `typeChecker` to achieve consistent strictness.
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Wed May 22 06:28:35 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/typechecking.go

    	"k8s.io/apiserver/pkg/cel/openapi/resolver"
    	"k8s.io/apiserver/pkg/features"
    	utilfeature "k8s.io/apiserver/pkg/util/feature"
    	"k8s.io/klog/v2"
    )
    
    const maxTypesToCheck = 10
    
    type TypeChecker struct {
    	SchemaResolver resolver.SchemaResolver
    	RestMapper     meta.RESTMapper
    }
    
    // TypeCheckingContext holds information about the policy being type-checked.
    // The struct is opaque to the caller.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  5. cmd/kube-controller-manager/app/validatingadmissionpolicystatus.go

    		Combine(&resolver.ClientDiscoveryResolver{Discovery: controllerContext.ClientBuilder.DiscoveryClientOrDie(names.ValidatingAdmissionPolicyStatusController)})
    
    	typeChecker := &pluginvalidatingadmissionpolicy.TypeChecker{
    		SchemaResolver: schemaResolver,
    		RestMapper:     controllerContext.RESTMapper,
    	}
    	c, err := validatingadmissionpolicystatus.NewController(
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/syntax/type.go

    	Underlying() Type
    
    	// String returns a string representation of a type.
    	String() string
    }
    
    // Expressions in the syntax package provide storage for
    // the typechecker to record its results. This interface
    // is the mechanism the typechecker uses to record results,
    // and clients use to retrieve those results.
    type typeInfo interface {
    	SetTypeInfo(TypeAndValue)
    	GetTypeInfo() TypeAndValue
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 20:03:31 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  7. pkg/controller/validatingadmissionpolicystatus/controller_test.go

    			policy.ObjectMeta.Generation = 1 // fake storage does not do this automatically
    			client := fake.NewSimpleClientset(policy)
    			informerFactory := informers.NewSharedInformerFactory(client, 0)
    			typeChecker := &validatingadmissionpolicy.TypeChecker{
    				SchemaResolver: resolver.NewDefinitionsSchemaResolver(openapi.GetOpenAPIDefinitions, scheme.Scheme),
    				RestMapper:     testrestmapper.TestOnlyStaticRESTMapper(scheme.Scheme),
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  8. src/go/types/check_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // This file implements a typechecker test harness. The packages specified
    // in tests are typechecked. Error messages reported by the typechecker are
    // compared against the errors expected in the test files.
    //
    // Expected errors are indicated in the test files by putting comments
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 19:45:33 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/check_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // This file implements a typechecker test harness. The packages specified
    // in tests are typechecked. Error messages reported by the typechecker are
    // compared against the errors expected in the test files.
    //
    // Expected errors are indicated in the test files by putting comments
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 19:45:33 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/walk/complit.go

    		//	map[vstatk[i]] = vstate[i]
    		// }
    		i := typecheck.TempAt(base.Pos, ir.CurFunc, types.Types[types.TINT])
    		rhs := ir.NewIndexExpr(base.Pos, vstate, i)
    		rhs.SetBounded(true)
    
    		kidx := ir.NewIndexExpr(base.Pos, vstatk, i)
    		kidx.SetBounded(true)
    
    		// typechecker rewrites OINDEX to OINDEXMAP
    		lhs := typecheck.AssignExpr(ir.NewIndexExpr(base.Pos, m, kidx)).(*ir.IndexExpr)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:03:54 UTC 2023
    - 19.5K bytes
    - Viewed (0)
Back to top