Skip to content

Commit

Permalink
chore: intro editorconfig-maven-plugin for verifying code style def…
Browse files Browse the repository at this point in the history
…ined in `.editorconfig` (#614)
  • Loading branch information
HJ-Young authored Jul 23, 2024
1 parent f6588bd commit e94eee1
Show file tree
Hide file tree
Showing 10 changed files with 73 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ For example:

- [ ] `Doc - TODO` <!-- Your PR changes impact docs and you will update later -->
- [ ] `Doc - Done` <!-- Related docs have been already added or updated -->
- [ ] `Doc - No Need` <!-- Your PR changes don't impact/need docs -->
- [ ] `Doc - No Need` <!-- Your PR changes don't impact/need docs -->
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,4 @@ Apache 2.0 licenses

The following file are provided under the Apache 2.0 License.
hugegraph-hubble/hubble-fe/public/favicon.ico
hugegraph-hubble/hubble-fe/src/assets/imgs/logo.png
hugegraph-hubble/hubble-fe/src/assets/imgs/logo.png
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ public String toString() {
return String.format("Shard{start=%s, end=%s, length=%s}",
this.start, this.end, this.length);
}
}
}
2 changes: 1 addition & 1 deletion hugegraph-hubble/.prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"tabWidth": 2,
"printWidth": 80,
"trailingComma": "none"
}
}
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
/*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with this
* work for additional information regarding copyright ownership. The ASF
* licenses this file to You 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 org.apache.hugegraph.exception;

/**
* Used to wrap other unexpected exceptions like Client/ServerException, and convert them into this.
* This is typically done to handle exceptions uniformly in the hubble UI.
*/
public class GenericException extends ParameterizedException {

public GenericException(ServerException e) {
super(e.getMessage(), e.getCause());
}

public GenericException(Exception e) {
super(e.getMessage(), e.getCause());
}
}
/*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with this
* work for additional information regarding copyright ownership. The ASF
* licenses this file to You 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 org.apache.hugegraph.exception;

/**
* Used to wrap other unexpected exceptions like Client/ServerException, and convert them into this.
* This is typically done to handle exceptions uniformly in the hubble UI.
*/
public class GenericException extends ParameterizedException {

public GenericException(ServerException e) {
super(e.getMessage(), e.getCause());
}

public GenericException(Exception e) {
super(e.getMessage(), e.getCause());
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
1
2
3
3
2 changes: 1 addition & 1 deletion hugegraph-loader/assembly/descriptor/assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@
</dependencySet>
</dependencySets>

</assembly>
</assembly>
2 changes: 1 addition & 1 deletion hugegraph-tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ The [tools homepage](https://hugegraph.apache.org/docs/quickstart/hugegraph-tool

## License

HugeGraph-Tools is licensed under Apache 2.0 License.
HugeGraph-Tools is licensed under Apache 2.0 License.
2 changes: 1 addition & 1 deletion hugegraph-tools/assembly/descriptor/assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@
</dependencySet>
</dependencySets>

</assembly>
</assembly>
31 changes: 31 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,37 @@
</execution-->
</executions>
</plugin>
<plugin>
<groupId>org.ec4j.maven</groupId>
<artifactId>editorconfig-maven-plugin</artifactId>
<version>0.1.3</version>
<executions>
<execution>
<id>style-check</id>
<goals>
<goal>check</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
<configuration>
<!-- See http://ec4j.github.io/editorconfig-maven-plugin/ for full configuration reference -->
<excludes>
<!-- Note that maven submodule directories and many non-source file patterns are excluded by default -->
<!-- see https://github.com/ec4j/editorconfig-linters/blob/master/editorconfig-lint-api/src/main/java/org/ec4j/lint/api/Constants.java#L37 -->
<!-- You can exclude further files from processing: -->
<exclude>**/*.txt</exclude>
<exclude>**/.flattened-pom.xml</exclude>
<exclude>**/hubble-fe/**/*</exclude>
<exclude>**/apache-hugegraph-hubble-incubating-*/**/*</exclude>
</excludes>
<!-- All files are included by default:
<includes>
<include>**</include>
</includes>
-->
</configuration>
</plugin>
</plugins>
<!-- Note: plugin will not execute in management by default in root -->
<pluginManagement>
Expand Down

0 comments on commit e94eee1

Please sign in to comment.