Skip to content

Commit

Permalink
Try to resolve all package within org.apache namespace (OctoLinker#587)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Buck committed Jun 12, 2019
1 parent dd9c9c3 commit 5ad6474
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion e2e/fixtures/java/rough-snowflake.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
// @OctoLinkerResolve(http://fasterxml.github.io/jackson-databind/javadoc/2.9/com/fasterxml/jackson/databind/JsonNode.html)
import com.fasterxml.jackson.databind.JsonNode;

// @OctoLinkerResolve(https://docs.spring.io/spring/docs/5.1.3.RELEASE/javadoc-api/org/springframework/stereotype/Component.html)
// @OctoLinkerResolve(https://docs.spring.io/spring/docs/5.1.7.RELEASE/javadoc-api/org/springframework/stereotype/Component.html)
import org.springframework.stereotype.Component;
4 changes: 1 addition & 3 deletions packages/helper-grammar-regex-collection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,9 @@ export const JAVA_IMPORT = regex`
|
org\.mockito
|
org\.apache\.log4j
org\.apache
|
org\.slf4j
|
org\.apache\.commons\.logging
)
((\.[a-zA-Z0-9_]+)+[a-zA-Z0-9_])*
)
Expand Down
6 changes: 1 addition & 5 deletions packages/helper-grammar-regex-collection/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,12 +419,8 @@ const fixtures = {
['import com.fasterxml.Foo', ['com.fasterxml.Foo']],
['import org.junit.Foo', ['org.junit.Foo']],
['import org.mockito.Foo', ['org.mockito.Foo']],
['import org.apache.log4j.Foo', ['org.apache.log4j.Foo']],
['import org.apache.Foo', ['org.apache.Foo']],
['import org.slf4j.Foo', ['org.slf4j.Foo']],
[
'import org.apache.commons.logging.Foo',
['org.apache.commons.logging.Foo'],
],
],
invalid: [
'import com.company.app', // For now, we support java core packages only
Expand Down

0 comments on commit 5ad6474

Please sign in to comment.