Skip to content

Commit e94eee1

Browse files
authored
chore: intro editorconfig-maven-plugin for verifying code style defined in .editorconfig (#614)
1 parent f6588bd commit e94eee1

File tree

10 files changed

+73
-42
lines changed

10 files changed

+73
-42
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ For example:
6363

6464
- [ ] `Doc - TODO` <!-- Your PR changes impact docs and you will update later -->
6565
- [ ] `Doc - Done` <!-- Related docs have been already added or updated -->
66-
- [ ] `Doc - No Need` <!-- Your PR changes don't impact/need docs -->
66+
- [ ] `Doc - No Need` <!-- Your PR changes don't impact/need docs -->

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,4 +214,4 @@ Apache 2.0 licenses
214214

215215
The following file are provided under the Apache 2.0 License.
216216
hugegraph-hubble/hubble-fe/public/favicon.ico
217-
hugegraph-hubble/hubble-fe/src/assets/imgs/logo.png
217+
hugegraph-hubble/hubble-fe/src/assets/imgs/logo.png

hugegraph-client/src/main/java/org/apache/hugegraph/structure/graph/Shard.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ public String toString() {
7171
return String.format("Shard{start=%s, end=%s, length=%s}",
7272
this.start, this.end, this.length);
7373
}
74-
}
74+
}

hugegraph-hubble/.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
"tabWidth": 2,
44
"printWidth": 80,
55
"trailingComma": "none"
6-
}
6+
}
Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
/*
2-
*
3-
* Licensed to the Apache Software Foundation (ASF) under one or more
4-
* contributor license agreements. See the NOTICE file distributed with this
5-
* work for additional information regarding copyright ownership. The ASF
6-
* licenses this file to You under the Apache License, Version 2.0 (the
7-
* "License"); you may not use this file except in compliance with the License.
8-
* You may obtain a copy of the License at
9-
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
11-
*
12-
* Unless required by applicable law or agreed to in writing, software
13-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15-
* License for the specific language governing permissions and limitations
16-
* under the License.
17-
*/
18-
19-
package org.apache.hugegraph.exception;
20-
21-
/**
22-
* Used to wrap other unexpected exceptions like Client/ServerException, and convert them into this.
23-
* This is typically done to handle exceptions uniformly in the hubble UI.
24-
*/
25-
public class GenericException extends ParameterizedException {
26-
27-
public GenericException(ServerException e) {
28-
super(e.getMessage(), e.getCause());
29-
}
30-
31-
public GenericException(Exception e) {
32-
super(e.getMessage(), e.getCause());
33-
}
34-
}
1+
/*
2+
*
3+
* Licensed to the Apache Software Foundation (ASF) under one or more
4+
* contributor license agreements. See the NOTICE file distributed with this
5+
* work for additional information regarding copyright ownership. The ASF
6+
* licenses this file to You under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15+
* License for the specific language governing permissions and limitations
16+
* under the License.
17+
*/
18+
19+
package org.apache.hugegraph.exception;
20+
21+
/**
22+
* Used to wrap other unexpected exceptions like Client/ServerException, and convert them into this.
23+
* This is typically done to handle exceptions uniformly in the hubble UI.
24+
*/
25+
public class GenericException extends ParameterizedException {
26+
27+
public GenericException(ServerException e) {
28+
super(e.getMessage(), e.getCause());
29+
}
30+
31+
public GenericException(Exception e) {
32+
super(e.getMessage(), e.getCause());
33+
}
34+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
1
22
2
3-
3
3+
3

hugegraph-loader/assembly/descriptor/assembly.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@
6767
</dependencySet>
6868
</dependencySets>
6969

70-
</assembly>
70+
</assembly>

hugegraph-tools/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ The [tools homepage](https://hugegraph.apache.org/docs/quickstart/hugegraph-tool
1414

1515
## License
1616

17-
HugeGraph-Tools is licensed under Apache 2.0 License.
17+
HugeGraph-Tools is licensed under Apache 2.0 License.

hugegraph-tools/assembly/descriptor/assembly.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@
6161
</dependencySet>
6262
</dependencySets>
6363

64-
</assembly>
64+
</assembly>

pom.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,37 @@
540540
</execution-->
541541
</executions>
542542
</plugin>
543+
<plugin>
544+
<groupId>org.ec4j.maven</groupId>
545+
<artifactId>editorconfig-maven-plugin</artifactId>
546+
<version>0.1.3</version>
547+
<executions>
548+
<execution>
549+
<id>style-check</id>
550+
<goals>
551+
<goal>check</goal>
552+
</goals>
553+
<phase>verify</phase>
554+
</execution>
555+
</executions>
556+
<configuration>
557+
<!-- See http://ec4j.github.io/editorconfig-maven-plugin/ for full configuration reference -->
558+
<excludes>
559+
<!-- Note that maven submodule directories and many non-source file patterns are excluded by default -->
560+
<!-- see https://github.com/ec4j/editorconfig-linters/blob/master/editorconfig-lint-api/src/main/java/org/ec4j/lint/api/Constants.java#L37 -->
561+
<!-- You can exclude further files from processing: -->
562+
<exclude>**/*.txt</exclude>
563+
<exclude>**/.flattened-pom.xml</exclude>
564+
<exclude>**/hubble-fe/**/*</exclude>
565+
<exclude>**/apache-hugegraph-hubble-incubating-*/**/*</exclude>
566+
</excludes>
567+
<!-- All files are included by default:
568+
<includes>
569+
<include>**</include>
570+
</includes>
571+
-->
572+
</configuration>
573+
</plugin>
543574
</plugins>
544575
<!-- Note: plugin will not execute in management by default in root -->
545576
<pluginManagement>

0 commit comments

Comments
 (0)