Skip to content

Commit 71ee424

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/main' into Add-evaluation-details-to-finally-hook-stage
# Conflicts: # src/main/java/dev/openfeature/sdk/Hook.java # src/main/java/dev/openfeature/sdk/HookSupport.java # src/test/java/dev/openfeature/sdk/HookSpecTest.java # src/test/java/dev/openfeature/sdk/HookSupportTest.java # src/test/java/dev/openfeature/sdk/OpenFeatureClientTest.java
2 parents 7d803f2 + 4086dea commit 71ee424

File tree

118 files changed

+3232
-2183
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+3232
-2183
lines changed

.editorconfig

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
tab_width = 4
10+
trim_trailing_whitespace = true
11+
12+
ij_continuation_indent_size = 8
13+
14+
[*.md]
15+
max_line_length = off
16+
trim_trailing_whitespace = false
17+
18+
# Following the rules of the Google Java Style Guide.
19+
# See https://google.github.io/styleguide/javaguide.html
20+
[*.java]
21+
max_line_length = 120
22+
23+
ij_java_do_not_wrap_after_single_annotation_in_parameter = true
24+
ij_java_insert_inner_class_imports = false
25+
ij_java_class_count_to_use_import_on_demand = 999
26+
ij_java_names_count_to_use_import_on_demand = 999
27+
ij_java_packages_to_use_import_on_demand = unset
28+
ij_java_imports_layout = $*,|,*
29+
ij_java_doc_align_param_comments = true
30+
ij_java_doc_align_exception_comments = true
31+
ij_java_doc_add_p_tag_on_empty_lines = false
32+
ij_java_doc_do_not_wrap_if_one_line = true
33+
ij_java_doc_keep_empty_parameter_tag = false
34+
ij_java_doc_keep_empty_throws_tag = false
35+
ij_java_doc_keep_empty_return_tag = false
36+
ij_java_doc_preserve_line_breaks = true
37+
ij_java_doc_indent_on_continuation = true
38+
ij_java_keep_control_statement_in_one_line = false
39+
ij_java_keep_blank_lines_in_code = 1
40+
ij_java_align_multiline_parameters = false
41+
ij_java_align_multiline_resources = false
42+
ij_java_align_multiline_for = true
43+
ij_java_space_before_array_initializer_left_brace = true
44+
ij_java_call_parameters_wrap = normal
45+
ij_java_method_parameters_wrap = normal
46+
ij_java_extends_list_wrap = normal
47+
ij_java_throws_keyword_wrap = normal
48+
ij_java_method_call_chain_wrap = normal
49+
ij_java_binary_operation_wrap = normal
50+
ij_java_binary_operation_sign_on_next_line = true
51+
ij_java_ternary_operation_wrap = normal
52+
ij_java_ternary_operation_signs_on_next_line = true
53+
ij_java_keep_simple_methods_in_one_line = true
54+
ij_java_keep_simple_lambdas_in_one_line = true
55+
ij_java_keep_simple_classes_in_one_line = true
56+
ij_java_for_statement_wrap = normal
57+
ij_java_array_initializer_wrap = normal
58+
ij_java_wrap_comments = true
59+
ij_java_if_brace_force = always
60+
ij_java_do_while_brace_force = always
61+
ij_java_while_brace_force = always
62+
ij_java_for_brace_force = always
63+
ij_java_space_after_closing_angle_bracket_in_type_argument = false
64+
65+
[{*.json,*.json5}]
66+
indent_size = 2
67+
tab_width = 2
68+
ij_smart_tabs = false
69+
70+
[*.yaml]
71+
indent_size = 2
72+
tab_width = 2

.github/workflows/merge.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
server-password: ${{ secrets.OSSRH_PASSWORD }}
3333

3434
- name: Cache local Maven repository
35-
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
35+
uses: actions/cache@53aa38c736a561b9c17b62df3fe885a17b78ee6d
3636
with:
3737
path: ~/.m2/repository
3838
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}

.github/workflows/pullrequest.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jobs:
2020
cache: maven
2121

2222
- name: Initialize CodeQL
23-
uses: github/codeql-action/init@5b6e617dc0241b2d60c2bccea90c56b67eceb797
23+
uses: github/codeql-action/init@3407610120cd5656b6fc71991415cb50748b9489
2424
with:
2525
languages: java
2626

2727
- name: Cache local Maven repository
28-
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
28+
uses: actions/cache@53aa38c736a561b9c17b62df3fe885a17b78ee6d
2929
with:
3030
path: ~/.m2/repository
3131
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -45,4 +45,4 @@ jobs:
4545
verbose: true # optional (default = false)
4646

4747
- name: Perform CodeQL Analysis
48-
uses: github/codeql-action/analyze@5b6e617dc0241b2d60c2bccea90c56b67eceb797
48+
uses: github/codeql-action/analyze@3407610120cd5656b6fc71991415cb50748b9489

.github/workflows/static-code-scanning.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ jobs:
3333

3434
# Initializes the CodeQL tools for scanning.
3535
- name: Initialize CodeQL
36-
uses: github/codeql-action/init@5b6e617dc0241b2d60c2bccea90c56b67eceb797
36+
uses: github/codeql-action/init@3407610120cd5656b6fc71991415cb50748b9489
3737
with:
3838
languages: java
3939

4040
- name: Autobuild
41-
uses: github/codeql-action/autobuild@5b6e617dc0241b2d60c2bccea90c56b67eceb797
41+
uses: github/codeql-action/autobuild@3407610120cd5656b6fc71991415cb50748b9489
4242

4343
- name: Perform CodeQL Analysis
44-
uses: github/codeql-action/analyze@5b6e617dc0241b2d60c2bccea90c56b67eceb797
44+
uses: github/codeql-action/analyze@3407610120cd5656b6fc71991415cb50748b9489

CONTRIBUTING.md

+32
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,38 @@ If you think we might be out of date with the spec, you can check that by invoki
2121

2222
If you're adding tests to cover something in the spec, use the `@Specification` annotation like you see throughout the test suites.
2323

24+
## Code Styles
25+
26+
### Overview
27+
Our project follows strict code formatting standards to maintain consistency and readability across the codebase. We use [Spotless](https://github.com/diffplug/spotless) integrated with the [Palantir Java Format](https://github.com/palantir/palantir-java-format) for code formatting.
28+
29+
**Spotless** ensures that all code complies with the formatting rules automatically, reducing style-related issues during code reviews.
30+
31+
### How to Format Your Code
32+
1. **Before Committing Changes:**
33+
Run the Spotless plugin to format your code. This will apply the Palantir Java Format style:
34+
```bash
35+
mvn spotless:apply
36+
```
37+
38+
2. **Verify Formatting:**
39+
To check if your code adheres to the style guidelines without making changes:
40+
```bash
41+
mvn spotless:check
42+
```
43+
44+
- If this command fails, your code does not follow the required formatting. Use `mvn spotless:apply` to fix it.
45+
46+
### CI/CD Integration
47+
Our Continuous Integration (CI) pipeline automatically checks code formatting using the Spotless plugin. Any code that does not pass the `spotless:check` step will cause the build to fail.
48+
49+
### Best Practices
50+
- Regularly run `mvn spotless:apply` during your work to ensure your code remains aligned with the standards.
51+
- Configure your IDE (e.g., IntelliJ IDEA or Eclipse) to follow the Palantir Java format guidelines to reduce discrepancies during development.
52+
53+
### Support
54+
If you encounter issues with code formatting, please raise a GitHub issue or contact the maintainers.
55+
2456
## End-to-End Tests
2557

2658
The continuous integration runs a set of [gherkin e2e tests](https://github.com/open-feature/spec/blob/main/specification/assets/gherkin/evaluation.feature) using `InMemoryProvider`.

0 commit comments

Comments
 (0)