• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

oracle / opengrok / #3721

30 Nov 2023 04:03PM UTC coverage: 66.155% (-9.8%) from 75.915%
#3721

push

vladak
1.12.25

38762 of 58593 relevant lines covered (66.15%)

0.66 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.0
/opengrok-indexer/src/main/java/org/opengrok/indexer/analysis/typescript/TypeScriptAnalyzer.java
1
/*
2
 * CDDL HEADER START
3
 *
4
 * The contents of this file are subject to the terms of the
5
 * Common Development and Distribution License (the "License").
6
 * You may not use this file except in compliance with the License.
7
 *
8
 * See LICENSE.txt included in this distribution for the specific
9
 * language governing permissions and limitations under the License.
10
 *
11
 * When distributing Covered Code, include this CDDL HEADER in each
12
 * file and include the License file at LICENSE.txt.
13
 * If applicable, add the following below this CDDL HEADER, with the
14
 * fields enclosed by brackets "[]" replaced with your own identifying
15
 * information: Portions Copyright [yyyy] [name of copyright owner]
16
 *
17
 * CDDL HEADER END
18
 */
19

20
/*
21
 * Copyright (c) 2006, 2019, Oracle and/or its affiliates. All rights reserved.
22
 * Portions Copyright (c) 2017, 2020, Chris Fraire <cfraire@me.com>.
23
 */
24
package org.opengrok.indexer.analysis.typescript;
25

26
import org.opengrok.indexer.analysis.AbstractAnalyzer;
27
import org.opengrok.indexer.analysis.AnalyzerFactory;
28
import org.opengrok.indexer.analysis.JFlexTokenizer;
29
import org.opengrok.indexer.analysis.JFlexXref;
30
import org.opengrok.indexer.analysis.plain.AbstractSourceCodeAnalyzer;
31

32
import java.io.Reader;
33

34
/**
35
 * Represents an analyzer for the TypeScript language.
36
 */
37
@SuppressWarnings("java:S110")
38
public class TypeScriptAnalyzer extends AbstractSourceCodeAnalyzer {
39

40
    /**
41
     * Creates a new instance of {@link TypeScriptAnalyzer}.
42
     * @param factory defined instance for the analyzer
43
     */
44
    TypeScriptAnalyzer(AnalyzerFactory factory) {
45
        super(factory, () -> new JFlexTokenizer(new TypeScriptSymbolTokenizer(
1✔
46
                AbstractAnalyzer.DUMMY_READER)));
47
    }
1✔
48

49
    /**
50
     * Gets a version number to be used to tag processed documents so that
51
     * re-analysis can be re-done later if a stored version number is different
52
     * from the current implementation.
53
     * @return 20191006_00
54
     */
55
    @Override
56
    protected int getSpecializedVersionNo() {
57
        return 20191006_00; // Edit comment above too!
1✔
58
    }
59

60
    /**
61
     * Creates a wrapped {@link TypeScriptXref} instance.
62
     * @param reader the data to produce xref for
63
     * @return a defined instance
64
     */
65
    @Override
66
    protected JFlexXref newXref(Reader reader) {
67
        return new JFlexXref(new TypeScriptXref(reader));
×
68
    }
69
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc