[
https://issues.apache.org/jira/browse/OPENNLP-1935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kristian Rickert updated OPENNLP-1935:
--------------------------------------
Description: Once this is done, let's put safeguards in place to prevent
regex during the build except for the spots we have exceptions. It's too easy
and standard in the language to add them. (was: Two checkstyle checks keep the
policy in place after the epic is merged:
* {{NoRegexImport}}: {{IllegalImport}} of {{java.util.regex}}.
* {{NoRegexStringCall}}: {{RegexpSinglelineJava}} for {{String.replaceAll}},
{{replaceFirst}}, {{matches}} with a string argument, and {{split}} with a
backslash-escaped argument, since each compiles a Pattern per call.
Test sources are excluded. The documented exceptions live in a new
{{checkstyle-suppressions.xml}}, wired through {{suppressionsLocation}} in the
parent pom, each with its reason: {{RegexNameFinder}} and its factory,
{{AncoraSpanishHeadRules}}, {{Parse}}, {{NameSample}},
{{SpellCheckingCharSequenceNormalizer}}, and the tokenizer alphanumeric classes
from part 6.
Run on parts 1 to 6 alone the checks report exactly the sites those parts fix;
with all parts applied the whole reactor validates clean. This ticket merges
last; its build fails until the other parts are in.
For the epic description, add a "Tickets" section listing the seven keys in
merge order 2, 3, 4, 5, bug, 6, 7, move the tokenizer row from "still
determining" to exempt, add the spellcheck normalizer and the part 5 rows to
the tables, and note that part 1 also added the four StringUtil helpers the
later parts reuse. Once the keys exist, give them to me in that order and I
reword the commits, rename the branches, and push.)
> RegEx removal part 7: checkstyle guard for java.util.regex in production code
> -----------------------------------------------------------------------------
>
> Key: OPENNLP-1935
> URL: https://issues.apache.org/jira/browse/OPENNLP-1935
> Project: OpenNLP
> Issue Type: Improvement
> Components: Build, Packaging and Test
> Reporter: Kristian Rickert
> Assignee: Kristian Rickert
> Priority: Major
> Fix For: 3.0.0
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Once this is done, let's put safeguards in place to prevent regex during the
> build except for the spots we have exceptions. It's too easy and standard in
> the language to add them.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)