Codota Logo
PerlConfiguration
Code IndexAdd Codota to your IDE (free)

How to use
PerlConfiguration
in
com.github.sonarperl

Best Java code snippets using com.github.sonarperl.PerlConfiguration (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: sonar-perl/sonar-perl

PerlConfiguration getConfiguration() {
  return new PerlConfiguration(Charset.forName(charsetProperty.getValue()));
}
origin: sonar-perl/sonar-perl

@Test
public void getConfiguration_charset() {
  PerlConfigurationModel model = new PerlConfigurationModel();
  model.charsetProperty.setValue("UTF-8");
  assertThat(model.getCharset()).isEqualTo(Charsets.UTF_8);
  assertThat(model.getConfiguration().getCharset()).isEqualTo(Charsets.UTF_8);
  model.charsetProperty.setValue("ISO-8859-1");
  assertThat(model.getCharset()).isEqualTo(Charsets.ISO_8859_1);
  assertThat(model.getConfiguration().getCharset()).isEqualTo(Charsets.ISO_8859_1);
}
origin: sonar-perl/sonar-perl

  public static Lexer create(PerlConfiguration config) {
    return Lexer.builder()
        .withCharset(config.getCharset())
        .withFailIfNoChannelToConsumeOneCharacter(true)
        .withChannel(new NewLineChannel())
        .withChannel(new BlackHoleChannel("\\s"))
        .withChannel(commentRegexp("#[^\\n\\r]*+"))
        .withChannel(new PODChannel())
        .withChannel(commentRegexp("__END__[\\n\\r].*+"))
        .withChannel(commentRegexp("__DATA__[\\n\\r].*+"))
        .withChannel(new StringLiteralsChannel())
        .withChannel(new QuoteLikeChannel())
        .withChannel(new HeredocChannel())
        .withChannel(regexp(PerlTokenType.NUMBER, "[1-9][0-9]*+[.][0-9]++" + EXP))
        .withChannel(regexp(PerlTokenType.NUMBER, "[1-9][0-9]*+[.][0-9]++"))
        .withChannel(regexp(PerlTokenType.NUMBER, "[1-9][0-9]*+" + EXP))
        .withChannel(regexp(PerlTokenType.NUMBER, "[1-9][0-9]*+"))
        .withChannel(regexp(PerlTokenType.NUMBER, "0++"))
        .withChannel(new IdentifierAndKeywordChannel(and("[$%&@]?[a-zA-Z_]", o2n("\\w")), true, PerlKeyword.values()))
        .withChannel(new PunctuatorChannel(PerlPunctuator.values()))
        .withChannel(new UnknownCharacterChannel())
        .build();
  }
}
origin: sonar-perl/sonar-perl

public PerlScanner(SensorContext context, List<InputFile> inputFiles) {
  this.context = context;
  this.inputFiles = inputFiles;
  this.parser = PerlParser.create(new PerlConfiguration(context.fileSystem().encoding()));
}
origin: sonar-perl/sonar-perl

@BeforeClass
public static void init() {
  lexer = PerlLexer.create(new PerlConfiguration(StandardCharsets.UTF_8));
}
origin: sonar-perl/sonar-perl

public static PerlVisitorContext createContext(File file) {
  Parser<Grammar> parser = PerlParser.create(new PerlConfiguration(StandardCharsets.UTF_8));
  TestPerlFile perlFile = new TestPerlFile(file);
  AstNode rootTree = parser.parse(perlFile.content());
  return new PerlVisitorContext(rootTree, perlFile);
}
origin: sonar-perl/sonar-perl

public static PerlVisitorContext createContext(File file) {
  Parser<Grammar> parser = PerlParser.create(new PerlConfiguration(StandardCharsets.UTF_8));
  TestPerlFile pythonFile = new TestPerlFile(file);
  AstNode rootTree = parser.parse(pythonFile.content());
  return new PerlVisitorContext(rootTree, pythonFile);
}
com.github.sonarperlPerlConfiguration

Most used methods

  • <init>
  • getCharset

Popular in Java

  • Finding current android device location
  • setScale (BigDecimal)
  • onRequestPermissionsResult (Fragment)
  • getContentResolver (Context)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • JOptionPane (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now