Skip to content

nameOfObjectives

SPGoding edited this page Apr 26, 2020 · 1 revision

Rule Details

⚠️ Diagnostic: this is a diagnostic rule used by the diagnostic feature.

Enforce a consistent scoreboard objective naming convention.

  • ("camelCase")
  • ("PascalCase")
  • ("snake_case")
  • ("SCREAMING_SNAKE_CASE")
  • ("kebab-case")

Examples

Default

{
    "nameOfObjectives": null
}

👍 Good

scoreboard objectives add testObjective dummy
scoreboard objectives add TestObjective dummy
scoreboard objectives add test_objective dummy
scoreboard objectives add TEST_OBJECTIVE dummy
scoreboard objectives add test-objective dummy

Camel Case

{
    "nameOfObjectives": ["warning", "camelCase"]
}

👍 Good

scoreboard objectives add testObjective dummy

👎 Bad

scoreboard objectives add TestObjective dummy
scoreboard objectives add test_objexctive dummy
scoreboard objectives add TEST_OBJECTIVE dummy
scoreboard objectives add test-objective dummy

History

This rule was introduced in DHP 2.0.0.

Clone this wiki locally