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

Sort classes by name before renaming #517

Merged
merged 1 commit into from
Jun 5, 2021
Merged

Conversation

tefra
Copy link
Owner

@tefra tefra commented Jun 5, 2021

Specially in netex collection it's common to have base types that have an underscore prefix or a suffix, when it's time to resolve these conflict the handler assigns auto increment suffixes by following whatever order the classes arrive in the handler.

So for example the class type ParkingSpace is renamed to ParkingSpace2 and the type _ParkingSpace to ParkingSpace1, which seems a bit unfair, so sort the classes by name before assigning new names

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 5, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Jun 5, 2021

Codecov Report

Merging #517 (5187f98) into master (1c65024) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #517   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           87        87           
  Lines         7512      7514    +2     
  Branches      1313      1312    -1     
=========================================
+ Hits          7512      7514    +2     
Impacted Files Coverage Δ
xsdata/codegen/handlers/attribute_default_value.py 100.00% <100.00%> (ø)
xsdata/codegen/handlers/class_name_conflict.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1c65024...5187f98. Read the comment docs.

@tefra tefra merged commit f966d11 into master Jun 5, 2021
@tefra tefra deleted the sort-before-renaming-classes branch June 5, 2021 15:10
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.

1 participant