Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: intro editorconfig-maven-plugin for verifying code style defined in .editorconfig #614

Merged
merged 4 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

file separator diff?

like CRLF -> LF?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed so

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
Loading