You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2020/12/14 05:34:57 UTC
[isis] branch master updated: ISIS-2473: remove code-assert-core
monkey patch (for Language.ADOC)
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git
The following commit(s) were added to refs/heads/master by this push:
new ca4e8e2 ISIS-2473: remove code-assert-core monkey patch (for Language.ADOC)
ca4e8e2 is described below
commit ca4e8e2a7d85748bab6d29d28eacf4dc2c7f3cf5
Author: Andi Huber <ah...@apache.org>
AuthorDate: Mon Dec 14 06:34:45 2020 +0100
ISIS-2473: remove code-assert-core monkey patch (for Language.ADOC)
---
tooling/javamodel/pom.xml | 26 ++++++++----
.../java/guru/nidi/codeassert/config/Language.java | 49 ----------------------
2 files changed, 18 insertions(+), 57 deletions(-)
diff --git a/tooling/javamodel/pom.xml b/tooling/javamodel/pom.xml
index 7e7bede..a442184 100644
--- a/tooling/javamodel/pom.xml
+++ b/tooling/javamodel/pom.xml
@@ -33,23 +33,33 @@
<skipTests>true</skipTests>
</properties>
+ <repositories>
+ <repository>
+ <id>jitpack.io</id>
+ <url>https://jitpack.io</url>
+ </repository>
+ </repositories>
+
<dependencies>
<dependency>
<groupId>org.apache.isis.commons</groupId>
<artifactId>isis-commons</artifactId>
</dependency>
-
+
<dependency>
- <groupId>com.github.javaparser</groupId>
- <artifactId>javaparser-core</artifactId>
- <version>${javaparser.version}</version>
+ <groupId>com.github.javaparser</groupId>
+ <artifactId>javaparser-core</artifactId>
+ <version>${javaparser.version}</version>
</dependency>
-
+
<dependency>
- <groupId>guru.nidi</groupId>
- <artifactId>code-assert</artifactId>
- <version>${code-assert.version}</version>
+ <groupId>com.github.andi-huber</groupId>
+ <artifactId>code-assert</artifactId>
+ <version>-SNAPSHOT</version>
+<!-- <groupId>guru.nidi</groupId> -->
+<!-- <artifactId>code-assert</artifactId> -->
+<!-- <version>${code-assert.version}</version> -->
<exclusions>
<exclusion>
<groupId>com.pinterest.ktlint</groupId>
diff --git a/tooling/javamodel/src/main/java/guru/nidi/codeassert/config/Language.java b/tooling/javamodel/src/main/java/guru/nidi/codeassert/config/Language.java
deleted file mode 100644
index 224108d..0000000
--- a/tooling/javamodel/src/main/java/guru/nidi/codeassert/config/Language.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright © 2015 Stefan Niederhauser (nidin@gmx.ch)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package guru.nidi.codeassert.config;
-
-import java.util.List;
-
-import static java.util.Arrays.asList;
-
-//TODO this is a monkey patch that adds ADOC
-public enum Language {
-
- JAVA("java", asList(".java")),
- KOTLIN("kotlin", asList(".kt", ".kts")),
- SCALA("scala", asList(".scala")),
- GROOVY("groovy", asList(".groovy", ".gvy", ".gy", ".gsh")),
- ADOC("adoc", asList(".adoc")),
- ;
-
- final String path;
- final List<String> suffices;
-
- Language(String path, List<String> suffices) {
- this.path = path;
- this.suffices = suffices;
- }
-
- public static Language byFilename(String filename) {
- final String suffix = filename.substring(filename.lastIndexOf('.'));
- for (final Language lang : values()) {
- if (lang.suffices.contains(suffix)) {
- return lang;
- }
- }
- return null;
- }
-}