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

Use unicode_truncate instead of truncate to truncate example strings #29

Merged
merged 3 commits into from
Oct 17, 2024

Conversation

grebnetiew
Copy link
Contributor

Closes #28

@grebnetiew grebnetiew requested a review from ThomasTNO October 17, 2024 11:14
@grebnetiew grebnetiew self-assigned this Oct 17, 2024
Copy link

github-actions bot commented Oct 17, 2024

Sigrid maintainability feedback

⏸️️ Your rating did not change and is still below your objective of 3.5 stars

Sigrid compared your code against the baseline of 2024-10-16.

👍 What went well?

You fixed or improved 0 refactoring candidates.

👎 What could be better?

Unfortunately, 24 refactoring candidates were introduced or got worse.

Risk System property Location
🔴 Duplication
(Introduced)
WuppieFuzz/src/openapi/examples.rs (lines 554-562)
WuppieFuzz/src/openapi/examples.rs (lines 623-631)
🔴 Duplication
(Introduced)
WuppieFuzz/src/openapi/examples.rs (lines 689-695)
WuppieFuzz/src/openapi/examples.rs (lines 745-751)
🔴 Duplication
(Introduced)
.github/workflows/release.yml (lines 16-283)
WuppieFuzz/.github/workflows/release.yml (lines 16-283)
🔴 Duplication
(Introduced)
.github/workflows/sigrid-publish.yml (lines 1-19)
WuppieFuzz-Python/.github/workflows/sigrid-publish.yml (lines 1-19)
WuppieFuzz-dashboard/.github/workflows/sigrid-publish.yml (lines 1-19)
WuppieFuzz/.github/workflows/sigrid-publish.yml (lines 1-19)
🔴 Duplication
(Introduced)
WuppieFuzz-Python/.github/workflows/sigrid-pullrequest.yml (lines 1-16)
WuppieFuzz-dashboard/.github/workflows/sigrid-pullrequest.yml (lines 1-16)
WuppieFuzz/.github/workflows/sigrid-pullrequest.yml (lines 1-16)
🔴 Duplication
(Introduced)
.github/workflows/sigrid-publish.yml (lines 7-19)
WuppieFuzz-Python/.github/workflows/sigrid-pullrequest.yml (lines 4-16)
WuppieFuzz-dashboard/.github/workflows/sigrid-pullrequest.yml (lines 4-16)
WuppieFuzz/.github/workflows/sigrid-pullrequest.yml (lines 4-16)
🔴 Duplication
(Introduced)
.github/workflows/sigrid-pullrequest.yml (lines 1-11)
WuppieFuzz-Python/.github/workflows/sigrid-pullrequest.yml (lines 1-11)
WuppieFuzz-dashboard/.github/workflows/sigrid-pullrequest.yml (lines 1-11)
WuppieFuzz/.github/workflows/sigrid-pullrequest.yml (lines 1-11)
🔴 Duplication
(Introduced)
.github/workflows/sigrid-pullrequest.yml (lines 19-26)
WuppieFuzz-Python/.github/workflows/sigrid-pullrequest.yml (lines 18-25)
WuppieFuzz-dashboard/.github/workflows/sigrid-pullrequest.yml (lines 18-25)
WuppieFuzz/.github/workflows/sigrid-pullrequest.yml (lines 18-25)
🔴 Duplication
(Introduced)
.github/workflows/sigrid-publish.yml (lines 7-14)
.github/workflows/sigrid-pullrequest.yml (lines 4-11)
🔴 Duplication
(Introduced)
WuppieFuzz/example_configs/java.yaml (lines 7-24)
WuppieFuzz/example_configs/python.yaml (lines 7-24)
🔴 Duplication
(Introduced)
WuppieFuzz-Python/.github/workflows/sigrid-publish.yml (lines 15-20)
WuppieFuzz-Python/.github/workflows/sigrid-pullrequest.yml (lines 12-17)
🟠 Unit Size
(Introduced)
WuppieFuzz-Python/sitecustomize.py
sitecustomize.py:get_lcov(fr,analysis,outfile)
🟠 Unit Size
(Introduced)
WuppieFuzz-Python/sitecustomize.py
sitecustomize.py:get_analysis_to_report(coverage,morfs,regather_data)
🟠 Unit Size
(Introduced)
WuppieFuzz-Python/sitecustomize.py
CachedAnalysis.update_analysis(data,line_data,arc_data)
🟠 Unit Size
(Introduced)
WuppieFuzz-Python/sitecustomize.py
LCOVSocket.start_listening()
🟠 Unit Complexity
(Introduced)
WuppieFuzz-Python/sitecustomize.py
sitecustomize.py:get_analysis_to_report(coverage,morfs,regather_data)
🟡 Unit Size
(Introduced)
WuppieFuzz-Python/sitecustomize.py
sitecustomize.py
🟡 Unit Complexity
(Introduced)
WuppieFuzz-Python/sitecustomize.py
sitecustomize.py:get_lcov(fr,analysis,outfile)
🟡 Unit Complexity
(Introduced)
WuppieFuzz-Python/sitecustomize.py
CachedAnalysis.arcs_missing()
🟡 Unit Complexity
(Introduced)
WuppieFuzz-Python/sitecustomize.py
LCOVSocket.start_listening()
🟡 Unit Interfacing
(Introduced)
WuppieFuzz-Python/sitecustomize.py
sitecustomize.py:get_lcov(fr,analysis,outfile)
🟡 Unit Interfacing
(Introduced)
WuppieFuzz-Python/sitecustomize.py
sitecustomize.py:get_analysis_to_report(coverage,morfs,regather_data)
🟡 Unit Interfacing
(Introduced)
WuppieFuzz-Python/sitecustomize.py
CachedAnalysis.update_analysis(data,line_data,arc_data)
🟡 Unit Interfacing
(Introduced)
WuppieFuzz-Python/sitecustomize.py
LCOVSocket.send(connection,args,kwargs)

📚 Remaining technical debt

22 refactoring candidates didn't get better or worse, but are still present in the code you touched.

Risk System property Location
🔴 Unit Size
(Unchanged)
WuppieFuzz/src/openapi/examples.rs
interesting_params_from_schema(OpenAPI,RefOr,&,any)
🔴 Unit Size
(Unchanged)
WuppieFuzz/src/openapi/examples.rs
interesting_params_from_type(OpenAPI,Type)
🔴 Unit Size
(Unchanged)
WuppieFuzz/src/openapi/examples.rs
all_interesting_parameters(Operation,OpenAPI,&,any)
🟠 Unit Size
(Unchanged)
WuppieFuzz/src/openapi/examples.rs
example_from_type(OpenAPI,Type)
🟠 Unit Size
(Unchanged)
WuppieFuzz/src/openapi/examples.rs
all_discriminator_variants(OpenAPI,Schema,&,any)
🟠 Unit Size
(Unchanged)
WuppieFuzz/src/openapi/examples.rs
all_interesting_inputs_for_qualified_operation(OpenAPI,QualifiedOperation,&,any)
🟠 Unit Size
(Unchanged)
WuppieFuzz/src/openapi/examples.rs
example_body_contents(OpenAPI,Operation)
🟠 Unit Complexity
(Unchanged)
WuppieFuzz/src/openapi/examples.rs
examples.rs
🟠 Unit Complexity
(Unchanged)
WuppieFuzz/src/openapi/examples.rs
interesting_params_from_type(OpenAPI,Type)
🟡 Unit Size
(Unchanged)
WuppieFuzz/src/openapi/examples.rs
example_parameter_value(OpenAPI,ParameterData)
🟡 Unit Size
(Unchanged)
WuppieFuzz/src/openapi/examples.rs
example_from_schema(OpenAPI,Schema)
🟡 Unit Size
(Unchanged)
WuppieFuzz/src/openapi/examples.rs
example_parameters(OpenAPI,Operation)
🟡 Unit Complexity
(Unchanged)
WuppieFuzz/src/openapi/examples.rs
all_discriminator_variants(OpenAPI,Schema,&,any)
🟡 Unit Complexity
(Unchanged)
WuppieFuzz/src/openapi/examples.rs
interesting_params_from_schema(OpenAPI,RefOr,&,any)
🟡 Unit Complexity
(Unchanged)
WuppieFuzz/src/openapi/examples.rs
all_interesting_parameters(Operation,OpenAPI,&,any)
🟡 Unit Interfacing
(Unchanged)
WuppieFuzz/src/openapi/examples.rs
interesting_params_from_media_type(OpenAPI,openapiv3,any)
🟡 Unit Interfacing
(Unchanged)
WuppieFuzz/src/openapi/examples.rs
all_discriminator_variants(OpenAPI,Schema,&,any)
🟡 Unit Interfacing
(Unchanged)
WuppieFuzz/src/openapi/examples.rs
interesting_params_from_schema(OpenAPI,RefOr,&,any)
🟡 Unit Interfacing
(Unchanged)
WuppieFuzz/src/openapi/examples.rs
example_from_media_type(OpenAPI,openapiv3,any)
🟡 Unit Interfacing
(Unchanged)
WuppieFuzz/src/openapi/examples.rs
enforce_length_bounds(str,Option,Option)
🟡 Unit Interfacing
(Unchanged)
WuppieFuzz/src/openapi/examples.rs
all_interesting_inputs_for_qualified_operation(OpenAPI,QualifiedOperation,&,any)
🟡 Unit Interfacing
(Unchanged)
WuppieFuzz/src/openapi/examples.rs
all_interesting_parameters(Operation,OpenAPI,&,any)

Sigrid ratings

System property System on 2024-10-16 Before changes New/changed code
Volume 5.4 N/A N/A
Duplication 4.0 4.3 3.4
Unit Size 2.1 1.0 1.5
Unit Complexity 3.0 1.7 1.8
Unit Interfacing 2.0 1.3 1.3
Module Coupling 3.3 N/A N/A
Component Independence N/A N/A N/A
Component Entanglement N/A N/A N/A
Maintainability 3.3 2.1 2.3

View this system in Sigrid


Did you find this feedback helpful?

We would like to know your thoughts to make Sigrid better.
Your username will remain confidential throughout the process.

@ThomasTNO ThomasTNO merged commit 2eb45ff into main Oct 17, 2024
6 checks passed
@ThomasTNO ThomasTNO deleted the 28-fix-char-boundary-truncate branch November 5, 2024 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

String truncation during example generation cuts through characters
2 participants