Package com.puppetlabs.geppetto.pp.dsl.validation

Examples of com.puppetlabs.geppetto.pp.dsl.validation.DefaultPotentialProblemsAdvisor


    options.setEncodingProvider(new IEncodingProvider() {
      public String getEncoding(URI file) {
        return "UTF-8";
      }
    });
    options.setProblemsAdvisor(ValidationAdvisor.create(complianceLevel, new DefaultPotentialProblemsAdvisor()));
    return options;
  }
View Full Code Here


    ValidationOptions options = getValidationOptions();
    options.setCheckLayout(true);
    options.setCheckModuleSemantics(true);
    options.setCheckReferences(false);
    options.setFileType(FileType.PUPPET_ROOT);
    options.setProblemsAdvisor(new DefaultPotentialProblemsAdvisor());

    vs.validate(chain, root, options, null, SubMonitor.convert(null));

    int circularity = 0;
    int otherErrors = 0;
View Full Code Here

          IValidationAdvisor.ComplianceLevel complianceLevel = options.getComplianceLevel();
          if(complianceLevel == null)
            complianceLevel = IValidationAdvisor.ComplianceLevel.PUPPET_2_7;
          IPotentialProblemsAdvisor potentialProblems = options.getProblemsAdvisor();
          if(potentialProblems == null)
            potentialProblems = new DefaultPotentialProblemsAdvisor();
          ppDr.setUp(complianceLevel, potentialProblems);
          validatePPFile(ppDr, diagnostics, source, source.getParentFile(), monitor);
        }
        catch(Exception e) {
          addExceptionDiagnostic(
View Full Code Here

    PPDiagnosticsRunner ppRunner = new PPDiagnosticsRunner();
    Resource r = null;
    worked(ticker, 1);
    try {
      ppRunner.setUp(IValidationAdvisor.ComplianceLevel.PUPPET_2_7, new DefaultPotentialProblemsAdvisor());
      worked(ticker, 1);
      File f = new File("/unnamed.pp");
      r = ppRunner.loadResource(code, URI.createFileURI(f.getPath()));
      // no need to remember "/" as the root
      IResourceValidator rv = ppRunner.getPPResourceValidator();
View Full Code Here

      IValidationAdvisor.ComplianceLevel complianceLevel = options.getComplianceLevel();
      if(complianceLevel == null)
        complianceLevel = IValidationAdvisor.ComplianceLevel.PUPPET_2_7;
      IPotentialProblemsAdvisor problemsAdvisor = options.getProblemsAdvisor();
      if(problemsAdvisor == null)
        problemsAdvisor = new DefaultPotentialProblemsAdvisor();
      ppRunner.setUp(complianceLevel, problemsAdvisor);
      rubyHelper.setUp();
    }
    catch(Exception e) {
      addExceptionDiagnostic(diagnostics, "Internal Error: Exception while setting up diagnostics.", e);
View Full Code Here

  @Test
  public void parseString() throws Exception {

    // The diagnostics runner has all the capabilities to perform parsing
    PPDiagnosticsRunner runner = new PPDiagnosticsRunner();
    runner.setUp(IValidationAdvisor.ComplianceLevel.PUPPET_2_7, new DefaultPotentialProblemsAdvisor());

    // The grammar access provides methods to obtain any parser rule.
    // It is possible to start anywhere in the grammar and only get specific
    // things back. Look at PP.xtext to understand what the parser rules
    // expects
View Full Code Here

    options.setEncodingProvider(new IEncodingProvider() {
      public String getEncoding(URI file) {
        return "UTF-8";
      }
    });
    options.setProblemsAdvisor(ValidationAdvisor.create(complianceLevel, new DefaultPotentialProblemsAdvisor()));
    return options;
  }
View Full Code Here

TOP

Related Classes of com.puppetlabs.geppetto.pp.dsl.validation.DefaultPotentialProblemsAdvisor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.