mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-06-27 04:22:05 +00:00
This reverts commit 782209ead58f4cd82882872e9f8f40779d8b6e54.
This commit is contained in:
parent
5892595b1f
commit
bb847bc004
2
.idea/codeStyles/codeStyleConfig.xml
generated
2
.idea/codeStyles/codeStyleConfig.xml
generated
@ -1,5 +1,5 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<state>
|
||||
<option name="PREFERRED_PROJECT_CODE_STYLE" value="GoogleStyle" />
|
||||
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
|
||||
</state>
|
||||
</component>
|
6
.idea/google-java-format.xml
generated
6
.idea/google-java-format.xml
generated
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GoogleJavaFormatSettings">
|
||||
<option name="enabled" value="true" />
|
||||
</component>
|
||||
</project>
|
@ -1,31 +0,0 @@
|
||||
repos:
|
||||
- repo: https://github.com/ambv/black
|
||||
rev: 21.12b0
|
||||
hooks:
|
||||
- id: black
|
||||
language_version: python3.8
|
||||
exclude: ingestion/src/metadata/generated
|
||||
- repo: https://github.com/timothycrosley/isort
|
||||
rev: 5.9.3
|
||||
hooks:
|
||||
- id: isort
|
||||
args: ["--profile", "black"]
|
||||
exclude: ingestion/src/metadata/generated
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: google-style-java
|
||||
name: Google Java Code Style for Java
|
||||
description: Formats code in Google's Java codestyle.
|
||||
entry: scripts/format-code.sh
|
||||
language: script
|
||||
files: \.java$ # We don't technically need this, as the script will filter for us, but this will allow the hook to be skipped if no Java is changed.
|
||||
require_serial: true
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: lint-staged
|
||||
name: lint-staged
|
||||
description: Formats TS and JS code.
|
||||
entry: scripts/lint-staged.sh
|
||||
language: script
|
||||
files: \.(js|jsx|ts|tsx)$
|
||||
require_serial: true
|
@ -323,6 +323,10 @@
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.theoryinpractise</groupId>
|
||||
<artifactId>googleformatter-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>buildnumber-maven-plugin</artifactId>
|
||||
|
@ -50,18 +50,12 @@ public interface EntityDAO<T> {
|
||||
String findById(@Define("table") String table, @Bind("id") String id);
|
||||
|
||||
@SqlQuery("SELECT json FROM <table> WHERE <nameColumn> = :name")
|
||||
String findByName(
|
||||
@Define("table") String table,
|
||||
@Define("nameColumn") String nameColumn,
|
||||
@Bind("name") String name);
|
||||
String findByName(@Define("table") String table, @Define("nameColumn") String nameColumn, @Bind("name") String name);
|
||||
|
||||
@SqlQuery(
|
||||
"SELECT count(*) FROM <table> WHERE "
|
||||
+ "(<nameColumn> LIKE CONCAT(:fqnPrefix, '.%') OR :fqnPrefix IS NULL)")
|
||||
"SELECT count(*) FROM <table> WHERE " + "(<nameColumn> LIKE CONCAT(:fqnPrefix, '.%') OR :fqnPrefix IS NULL)")
|
||||
int listCount(
|
||||
@Define("table") String table,
|
||||
@Define("nameColumn") String nameColumn,
|
||||
@Bind("fqnPrefix") String fqnPrefix);
|
||||
@Define("table") String table, @Define("nameColumn") String nameColumn, @Bind("fqnPrefix") String fqnPrefix);
|
||||
|
||||
@SqlQuery(
|
||||
"SELECT json FROM ("
|
||||
@ -119,8 +113,7 @@ public interface EntityDAO<T> {
|
||||
}
|
||||
if (entity == null) {
|
||||
String entityName = Entity.getEntityNameFromClass(clz);
|
||||
throw EntityNotFoundException.byMessage(
|
||||
CatalogExceptionMessage.entityNotFound(entityName, id));
|
||||
throw EntityNotFoundException.byMessage(CatalogExceptionMessage.entityNotFound(entityName, id));
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
@ -134,8 +127,7 @@ public interface EntityDAO<T> {
|
||||
}
|
||||
if (entity == null) {
|
||||
String entityName = Entity.getEntityNameFromClass(clz);
|
||||
throw EntityNotFoundException.byMessage(
|
||||
CatalogExceptionMessage.entityNotFound(entityName, fqn));
|
||||
throw EntityNotFoundException.byMessage(CatalogExceptionMessage.entityNotFound(entityName, fqn));
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
@ -114,4 +114,13 @@
|
||||
<artifactId>jackson-datatype-jsr353</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.theoryinpractise</groupId>
|
||||
<artifactId>googleformatter-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
13
ingestion/.pre-commit-config.yaml
Normal file
13
ingestion/.pre-commit-config.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
repos:
|
||||
- repo: https://github.com/ambv/black
|
||||
rev: stable
|
||||
hooks:
|
||||
- id: black
|
||||
language_version: python3.8
|
||||
exclude: ingestion/src/metadata/generated
|
||||
- repo: https://github.com/timothycrosley/isort
|
||||
rev: 5.9.3
|
||||
hooks:
|
||||
- id: isort
|
||||
args: ["--profile", "black"]
|
||||
exclude: ingestion/src/metadata/generated
|
5
openmetadata-ui/src/main/resources/ui/.huskyrc.json
Normal file
5
openmetadata-ui/src/main/resources/ui/.huskyrc.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged --concurrent false"
|
||||
}
|
||||
}
|
22881
openmetadata-ui/src/main/resources/ui/package-lock.json
generated
Normal file
22881
openmetadata-ui/src/main/resources/ui/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -140,6 +140,7 @@
|
||||
"file-loader": "4.3.0",
|
||||
"fork-ts-checker-webpack-plugin": "^6.0.8",
|
||||
"html-webpack-plugin": "^4.5.1",
|
||||
"husky": "^4.3.0",
|
||||
"jest": "^26.6.3",
|
||||
"jest-environment-jsdom-fourteen": "^1.0.1",
|
||||
"lint-staged": "^10.3.0",
|
||||
|
24
pom.xml
24
pom.xml
@ -433,6 +433,30 @@
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.theoryinpractise</groupId>
|
||||
<artifactId>googleformatter-maven-plugin</artifactId>
|
||||
<version>1.7.3</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>reformat-sources</id>
|
||||
<configuration>
|
||||
<includeStale>false</includeStale>
|
||||
<style>GOOGLE</style>
|
||||
<formatMain>true</formatMain>
|
||||
<formatTest>true</formatTest>
|
||||
<filterModified>false</filterModified>
|
||||
<skip>false</skip>
|
||||
<fixImports>true</fixImports>
|
||||
<maxLineLength>120</maxLineLength>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>format</goal>
|
||||
</goals>
|
||||
<phase>process-sources</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
|
@ -1,23 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
VERSION=1.13.0
|
||||
JARFILE=google-java-format-$VERSION-all-deps.jar
|
||||
|
||||
mkdir -p .cache
|
||||
cd .cache
|
||||
if [ ! -f $JARFILE ]
|
||||
then
|
||||
curl -LJO "https://github.com/google/google-java-format/releases/download/v$VERSION/$JARFILE"
|
||||
chmod 755 $JARFILE
|
||||
fi
|
||||
cd ..
|
||||
|
||||
changed_java_files=$(git diff --cached --name-only --diff-filter=ACMR | grep ".*java$" )
|
||||
echo $changed_java_files
|
||||
java \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
|
||||
-jar .cache/$JARFILE --replace $changed_java_files
|
@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
cd openmetadata-ui/src/main/resources/ui
|
||||
npx lint-staged --concurrent false
|
Loading…
x
Reference in New Issue
Block a user