Skip to content

Commit

Permalink
feat&refactor(loader&test&style):
Browse files Browse the repository at this point in the history
- Restored functions mistakenly rolled back due to a force push; compatibility with `date` has been verified through testing.
- Synchronized the main module's .editorconfig with toolchain and reformatted all files accordingly.
  • Loading branch information
MuLeiSY2021 committed Jan 6, 2025
1 parent 843e513 commit 0c4bf37
Show file tree
Hide file tree
Showing 633 changed files with 57,600 additions and 56,420 deletions.
2 changes: 1 addition & 1 deletion .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ github:
- tool
# enable rebase for co-working pr
enabled_merge_buttons:
merge: false
merge: false
squash: true
rebase: true
protected_branches:
Expand Down
74 changes: 71 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,79 @@ root = true
charset = utf-8
end_of_line = lf
insert_final_newline = true
max_line_length = 100
ij_wrap_on_typing = true
ij_visual_guides = 100

[*.{java, xml, py}]

[*.{java,xml,py}]
indent_style = space
indent_size = 4

[*.{java, xml}]
[*.{java,xml}]
# Ignore the IDEA unsupported warning & it works well (indeed)
continuation_indent_size = 8
ij_continuation_indent_size = 8

[*.md]
max_line_length = off

[*.java]
ij_java_doc_add_p_tag_on_empty_lines = true
ij_java_doc_do_not_wrap_if_one_line = true
ij_java_annotation_parameter_wrap = normal
ij_java_align_multiline_annotation_parameters = true
ij_java_class_count_to_use_import_on_demand = 100
ij_java_names_count_to_use_import_on_demand = 100
ij_java_imports_layout = $*, |, java.**, |, javax.**, |, org.**, |, com.**, |, *

ij_java_line_comment_at_first_column = false
ij_java_align_multiline_chained_methods = true
ij_java_align_multiline_parameters_in_calls = true
ij_java_align_multiline_binary_operation = true
ij_java_align_multiline_assignment = true
ij_java_align_multiline_ternary_operation = true
ij_java_align_multiline_throws_list = true
ij_java_align_multiline_extends_list = true
ij_java_align_multiline_array_initializer_expression = true

ij_java_call_parameters_wrap = normal
ij_java_method_parameters_wrap = normal
ij_java_resource_list_wrap = normal
ij_java_extends_list_wrap = normal
ij_java_throws_list_wrap = normal
ij_java_method_call_chain_wrap = normal
ij_java_binary_operation_wrap = normal
ij_java_ternary_operation_wrap = normal
ij_java_for_statement_wrap = normal
ij_java_array_initializer_wrap = normal
ij_java_assignment_wrap = normal
ij_java_assert_statement_wrap = normal
ij_java_if_brace_force = if_multiline
ij_java_do_while_brace_force = always
ij_java_while_brace_force = if_multiline
ij_java_for_brace_force = if_multiline
ij_java_wrap_long_lines = true
ij_java_parameter_annotation_wrap = normal
ij_java_enum_constants_wrap = split_into_lines

ij_java_keep_blank_lines_in_declarations = 1
ij_java_keep_blank_lines_in_code = 1
ij_java_keep_blank_lines_between_package_declaration_and_header = 1
ij_java_keep_blank_lines_before_right_brace = 1
ij_java_blank_lines_around_class = 1
ij_java_blank_lines_after_class_header = 1

ij_smart_tabs = true

[*.xml]
max_line_length = 120
ij_visual_guides = 120
ij_xml_text_wrap = off
ij_xml_space_inside_empty_tag = true

[.yaml]
ij_yaml_spaces_within_braces = false
ij_yaml_spaces_within_brackets = false

[.properties]
ij_properties_keep_blank_lines = true
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ body:
Issue 标题请保持原有模板分类(例如:`[Bug]`), 长段描述之间可以增加`空行`或使用`序号`标记, 保持排版清晰。
3. Please submit an issue in the corresponding module, lack of valid information / long time (>14 days) unanswered issues may be closed (will be reopened when updated).
请在对应的模块提交 issue, 缺乏有效信息 / 长时间 (> 14 天) 没有回复的 issue 可能会被 **关闭**(更新时会再开启)。
- type: dropdown
attributes:
label: Bug Type (问题类型)
Expand All @@ -26,7 +26,7 @@ body:
- data inconsistency (数据不一致)
- exception / error (异常报错)
- others (please comment below)

- type: checkboxes
attributes:
label: Before submit
Expand All @@ -45,7 +45,7 @@ body:
- Data Size: xx vertices, xx edges <!-- (like 1000W 点, 9000W 边) -->
validations:
required: true

- type: textarea
attributes:
label: Expected & Actual behavior (期望与实际表现)
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ body:
description: >
Please describe the function you want in as much detail as possible. (请简要描述新功能 /
需求的使用场景或上下文, 最好能给个具体的例子说明)
placeholder: type the feature description here
placeholder: type the feature description here
validations:
required: true

Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/question_ask.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ body:
- configs (配置项 / 文档相关)
- exception / error (异常报错)
- others (please comment below)

- type: checkboxes
attributes:
label: Before submit
Expand All @@ -39,7 +39,7 @@ body:
attributes:
label: Environment (环境信息)
description: |
server version could get from [rest-api](https://hugegraph.apache.org/docs/clients/restful-api/) (http://localhost:8080/versions)
server version could get from [rest-api](https://hugegraph.apache.org/docs/clients/restful-api/) (http://localhost:8080/versions)
value: |
- Server Version: 1.x.x
- Toolchain Version: 1.x.x
Expand Down
4 changes: 2 additions & 2 deletions .github/configs/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
limitations under the License.
-->

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
Expand Down
8 changes: 4 additions & 4 deletions .github/outdated/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
name: "CLA Assistant"
on:
issue_comment:
types: [created]
types: [ created ]
pull_request_target:
types: [opened,closed,synchronize]
types: [ opened,closed,synchronize ]

jobs:
CLAssistant:
Expand All @@ -16,7 +16,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# the below token should have repo scope and must be manually added by you in the repository's secret
PERSONAL_ACCESS_TOKEN : ${{ secrets.PERSONAL_ACCESS_TOKEN }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
with:
path-to-signatures: '.github/cla-signatures/cla.json'
path-to-document: 'https://github.com/hugegraph/hugegraph-doc/blob/master/CLA.md' # e.g. a CLA or a DCO document
Expand All @@ -26,7 +26,7 @@ jobs:
allowlist: bot*
lock-pullrequest-aftermerge: false

# the following are the optional inputs - If the optional inputs are not given, then default values will be taken
# the following are the optional inputs - If the optional inputs are not given, then default values will be taken
#remote-organization-name: enter the remote organization name where the signatures should be stored (Default is storing the signatures in the same repository)
#remote-repository-name: enter the remote repository name where the signatures should be stored (Default is storing the signatures in the same repository)
#create-file-commit-message: 'For example: Creating file for storing CLA Signatures'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/client-go-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
strategy:
fail-fast: false
matrix:
JAVA_VERSION: ['11']
JAVA_VERSION: [ '11' ]
steps:
- name: Install JDK 11
uses: actions/setup-java@v3
Expand Down
114 changes: 57 additions & 57 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ name: "CodeQL"
on:
workflow_dispatch:
pull_request:
# The branches below must be a subset of the branches above
# branches: [ master ] # enable in all PR
# The branches below must be a subset of the branches above
# branches: [ master ] # enable in all PR
schedule:
- cron: '42 20 * * 6'

Expand All @@ -37,61 +37,61 @@ jobs:
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8'

- name: use staged maven repo settings
if: ${{ env.USE_STAGE == 'true' }}
run: |
cp $HOME/.m2/settings.xml /tmp/settings.xml
mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: '16'
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- if: matrix.language == 'python' || matrix.language == 'javascript'
name: Autobuild
uses: github/codeql-action/autobuild@v2

- if: matrix.language == 'java'
name: Build Java
run: |
mvn clean package -f "pom.xml" -B -V -e -Dfindbugs.skip -Dcheckstyle.skip -Dpmd.skip=true -Dspotbugs.skip -Denforcer.skip -Dmaven.javadoc.skip -DskipTests -Dmaven.test.skip.exec -Dlicense.skip=true -Drat.skip=true -Dspotless.check.skip=true
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8'

- name: use staged maven repo settings
if: ${{ env.USE_STAGE == 'true' }}
run: |
cp $HOME/.m2/settings.xml /tmp/settings.xml
mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: '16'
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- if: matrix.language == 'python' || matrix.language == 'javascript'
name: Autobuild
uses: github/codeql-action/autobuild@v2

- if: matrix.language == 'java'
name: Build Java
run: |
mvn clean package -f "pom.xml" -B -V -e -Dfindbugs.skip -Dcheckstyle.skip -Dpmd.skip=true -Dspotbugs.skip -Denforcer.skip -Dmaven.javadoc.skip -DskipTests -Dmaven.test.skip.exec -Dlicense.skip=true -Drat.skip=true -Dspotless.check.skip=true
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

dependency-review:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

name: "Pull Request Labeler"
on:
- pull_request_target
- pull_request_target

jobs:
triage:
Expand Down
44 changes: 22 additions & 22 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "Mark stale issues and pull requests"

on:
schedule:
- cron: "0 21 * * *"
- cron: "0 21 * * *"

jobs:
stale:
Expand All @@ -12,26 +12,26 @@ jobs:
pull-requests: write

steps:
- uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label'
stale-pr-message: 'Due to the lack of activity, the current pr is marked as stale and will be closed after 180 days, any update will remove the stale label'
stale-issue-label: 'inactive'
stale-pr-label: 'inactive'
exempt-issue-labels: 'feature,bug,enhancement,improvement,wontfix,todo,guide,doc,help wanted,security'
exempt-pr-labels: 'feature,bug,enhancement,improvement,wontfix,todo,guide,doc,help wanted,security'
exempt-all-milestones: true
- uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label'
stale-pr-message: 'Due to the lack of activity, the current pr is marked as stale and will be closed after 180 days, any update will remove the stale label'
stale-issue-label: 'inactive'
stale-pr-label: 'inactive'
exempt-issue-labels: 'feature,bug,enhancement,improvement,wontfix,todo,guide,doc,help wanted,security'
exempt-pr-labels: 'feature,bug,enhancement,improvement,wontfix,todo,guide,doc,help wanted,security'
exempt-all-milestones: true

days-before-issue-stale: 15
days-before-issue-close: 20
days-before-pr-stale: 30
days-before-pr-close: 180
operations-per-run: 10
start-date: '2017-10-01T00:00:00Z'
days-before-issue-stale: 15
days-before-issue-close: 20
days-before-pr-stale: 30
days-before-pr-close: 180
operations-per-run: 10
start-date: '2017-10-01T00:00:00Z'

exempt-all-assignees: true
remove-stale-when-updated: true
exempt-all-pr-milestones: true
delete-branch: false
enable-statistics: true
exempt-all-assignees: true
remove-stale-when-updated: true
exempt-all-pr-milestones: true
delete-branch: false
enable-statistics: true
Loading

0 comments on commit 0c4bf37

Please sign in to comment.