Skip to content

Add rule to omit backticks unless required by the language - #400

Merged
calda merged 1 commit into
masterfrom
cal--redundant-backticks
Aug 3, 2026
Merged

Add rule to omit backticks unless required by the language#400
calda merged 1 commit into
masterfrom
cal--redundant-backticks

Conversation

@calda

@calda calda commented Jul 31, 2026

Copy link
Copy Markdown
Member

Summary

Omit backticks around identifiers unless required by the language.

// WRONG
func travel(to planet: Planet, orbit: Orbit = .`default`) { ... }

// RIGHT
func travel(to planet: Planet, orbit: Orbit = .default) { ... }

Reasoning

Backticks are only required when escaping a keyword that would otherwise be invalid in that position. Many Swift keywords are contextual and are allowed as identifiers.

@calda
calda force-pushed the cal--redundant-backticks branch from fe750f0 to c9939a0 Compare August 3, 2026 16:32
@calda
calda force-pushed the cal--redundant-backticks branch from c9939a0 to e9246f4 Compare August 3, 2026 17:41
@calda
calda merged commit 176db45 into master Aug 3, 2026
6 checks passed
@calda
calda deleted the cal--redundant-backticks branch August 3, 2026 17:44
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