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

Added explicit raw values to ChordType #48

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Matt54
Copy link
Member

@Matt54 Matt54 commented Dec 18, 2024

By adding these explicit raw values, we are free to continue to adjust the cases (naming / spelling / fix any typos) without causing any breaking changes. We just can't change the raw values.

Alternatively, if we don't care what the raw values are (if nothing relies on the String value) - we could just pin each ChordType to an Int instead


/// Suspended Fourth Add Sharp Thirteen: Perfect Fourth, Perfect Fifth, Augmented Thirteenth, e.g. `Csus4(add#13)`
case sus4_addSharp13
case sus4_addSharp13 = "sus4_addSharp13"
Copy link

Choose a reason for hiding this comment

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

Identifier Name Violation: Enum element name should only contain alphanumeric characters: 'sus4_addSharp13' (identifier_name)
Redundant String Enum Value Violation: String enum values can be omitted when they are equal to the enumcase name. (redundant_string_enum_value)


/// Suspended Second Add Sharp Thirteen: Major Second, Perfect Fifth, Augmented Thirteenth, e.g. `Csus2(add#13)`
case sus2_addSharp13
case sus2_addSharp13 = "sus2_addSharp13"
Copy link

Choose a reason for hiding this comment

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

Identifier Name Violation: Enum element name should only contain alphanumeric characters: 'sus2_addSharp13' (identifier_name)
Redundant String Enum Value Violation: String enum values can be omitted when they are equal to the enumcase name. (redundant_string_enum_value)


/// Suspended 4th Add Flat Thirteen: Major Second, Perfect Fifth, Minor Thirteenth, e.g. `Csus4(add♭13)`
case sus4_addFlat13
case sus4_addFlat13 = "sus4_addFlat13"
Copy link

Choose a reason for hiding this comment

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

Identifier Name Violation: Enum element name should only contain alphanumeric characters: 'sus4_addFlat13' (identifier_name)
Redundant String Enum Value Violation: String enum values can be omitted when they are equal to the enumcase name. (redundant_string_enum_value)


/// Suspended 2nd Add Flat Thirteen: Major Second, Perfect Fifth, Minor Thirteenth, e.g. `Csus2(add♭13)`
case sus2_addFlat13
case sus2_addFlat13 = "sus2_addFlat13"
Copy link

Choose a reason for hiding this comment

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

Identifier Name Violation: Enum element name should only contain alphanumeric characters: 'sus2_addFlat13' (identifier_name)
Redundant String Enum Value Violation: String enum values can be omitted when they are equal to the enumcase name. (redundant_string_enum_value)


/// Suspended 4th Add Thirteen: Major Fourth, Perfect Fifth, Major Sixth, e.g. `Csus4(add13)`
case sus4_add13
case sus4_add13 = "sus4_add13"
Copy link

Choose a reason for hiding this comment

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

Identifier Name Violation: Enum element name should only contain alphanumeric characters: 'sus4_add13' (identifier_name)
Redundant String Enum Value Violation: String enum values can be omitted when they are equal to the enumcase name. (redundant_string_enum_value)


/// Major Seventh Suspended Fourth Sharp Ninth: Perfect Fourth, Perfect Fifth, Major Seventh, Augmented Ninth, e.g. `Cmaj7sus4(♯9)`
case maj7_sus4_sharp9
case maj7_sus4_sharp9 = "maj7_sus4_sharp9"
Copy link

Choose a reason for hiding this comment

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

Identifier Name Violation: Enum element name should only contain alphanumeric characters: 'maj7_sus4_sharp9' (identifier_name)
Redundant String Enum Value Violation: String enum values can be omitted when they are equal to the enumcase name. (redundant_string_enum_value)


/// Major Seventh Suspended Fourth Flat Ninth: Perfect Fourth, Perfect Fifth, Major Seventh, Minor Ninth, e.g. `Cmaj7sus4(♭9)`
case maj7_sus4_flat9
case maj7_sus4_flat9 = "maj7_sus4_flat9"
Copy link

Choose a reason for hiding this comment

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

Identifier Name Violation: Enum element name should only contain alphanumeric characters: 'maj7_sus4_flat9' (identifier_name)
Redundant String Enum Value Violation: String enum values can be omitted when they are equal to the enumcase name. (redundant_string_enum_value)


/// Dominant Thirteenth Suspended Second Sharp Eleventh: Major Second, Perfect Fifth, Minor Seventh, Major Ninth, Augmented Eleventh, Major Thirteenth, e.g. `C13sus2(♯11)`
case dom13_sus2_sharp11
case dom13_sus2_sharp11 = "dom13_sus2_sharp11"
Copy link

Choose a reason for hiding this comment

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

Identifier Name Violation: Enum element name should only contain alphanumeric characters: 'dom13_sus2_sharp11' (identifier_name)
Redundant String Enum Value Violation: String enum values can be omitted when they are equal to the enumcase name. (redundant_string_enum_value)


/// Dominant Thirteenth Suspended Fourth Sharp Ninth: Perfect Fourth, Perfect Fifth, Minor Seventh, Augmented Ninth, Perfect Eleventh, Major Thirteenth, e.g. `C13sus4(♯9)`
case dom13_sus4_sharp9
case dom13_sus4_sharp9 = "dom13_sus4_sharp9"
Copy link

Choose a reason for hiding this comment

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

Identifier Name Violation: Enum element name should only contain alphanumeric characters: 'dom13_sus4_sharp9' (identifier_name)
Redundant String Enum Value Violation: String enum values can be omitted when they are equal to the enumcase name. (redundant_string_enum_value)


/// Dominant Thirteenth Suspended Fourth Flat Ninth: Perfect Fourth, Perfect Fifth, Minor Seventh, Minor Ninth, Perfect Eleventh, Major Thirteenth, e.g. `C13sus4(♭9)`
case dom13_sus4_flat9
case dom13_sus4_flat9 = "dom13_sus4_flat9"
Copy link

Choose a reason for hiding this comment

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

Identifier Name Violation: Enum element name should only contain alphanumeric characters: 'dom13_sus4_flat9' (identifier_name)
Redundant String Enum Value Violation: String enum values can be omitted when they are equal to the enumcase name. (redundant_string_enum_value)

@aure
Copy link
Member

aure commented Dec 18, 2024

I like this better than tying to an Int.

aure
aure previously approved these changes Dec 18, 2024
@aure aure dismissed their stale review December 19, 2024 00:35

Having reservations.

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.

2 participants