mirror of
https://github.com/realm/SwiftLint.git
synced 2026-06-06 20:18:40 +00:00
Fixes after rebase
This commit is contained in:
+4
-5
@@ -34,12 +34,11 @@
|
||||
* Support building with Swift 5.1 on Linux.
|
||||
[Marcelo Fabri](https://github.com/marcelofabri)
|
||||
[#2874](https://github.com/realm/SwiftLint/issues/2874)
|
||||
* Add `snake_case_raw_value_codable_string_enum` opt-in rule to enforce snake
|
||||
cased raw values for camel cased Codable String enum cases.
|
||||
|
||||
* Add `raw_value_for_camel_cased_codable_enum` opt-in rule to enforce raw values
|
||||
for camel cased Codable String enum cases.
|
||||
[Marko Pejovic](https://github.com/00FA9A)
|
||||
[#2888](https://github.com/realm/SwiftLint/issues/2888)
|
||||
for camel cased Codable String enum cases.
|
||||
[Marko Pejovic](https://github.com/00FA9A)
|
||||
[#2888](https://github.com/realm/SwiftLint/issues/2888)
|
||||
|
||||
* Speedup `LetVarWhiteSpacesRule`.
|
||||
[PaulTaykalo](https://github.com/PaulTaykalo)
|
||||
|
||||
@@ -16874,21 +16874,19 @@ class TotoTests: QuickSpec {
|
||||
|
||||
|
||||
|
||||
|
||||
## Raw Value For Camel Cased Codable Enum
|
||||
|
||||
Identifier | Enabled by default | Supports autocorrection | Kind | Analyzer | Minimum Swift Compiler Version
|
||||
--- | --- | --- | --- | --- | ---
|
||||
`raw_value_for_camel_cased_codable_enum` | Disabled | No | lint | No | 3.0.0
|
||||
|
||||
Camel cased Codable String enum cases should have explicitly assigned raw value.
|
||||
Camel cased cases of Codable String enums should have raw value.
|
||||
|
||||
### Examples
|
||||
|
||||
<details>
|
||||
<summary>Non Triggering Examples</summary>
|
||||
|
||||
|
||||
```swift
|
||||
enum Numbers: Codable {
|
||||
case int(Int)
|
||||
@@ -16940,7 +16938,7 @@ enum Status: Int, Codable {
|
||||
```swift
|
||||
enum Status: String, Codable {
|
||||
case ok
|
||||
case notAcceptable
|
||||
case ↓notAcceptable
|
||||
case maybeAcceptable = "maybe_acceptable"
|
||||
}
|
||||
```
|
||||
@@ -16948,7 +16946,7 @@ enum Status: String, Codable {
|
||||
```swift
|
||||
enum Status: String, Decodable {
|
||||
case ok
|
||||
case notAcceptable
|
||||
case ↓notAcceptable
|
||||
case maybeAcceptable = "maybe_acceptable"
|
||||
}
|
||||
```
|
||||
@@ -16956,7 +16954,7 @@ enum Status: String, Decodable {
|
||||
```swift
|
||||
enum Status: String, Encodable {
|
||||
case ok
|
||||
case notAcceptable
|
||||
case ↓notAcceptable
|
||||
case maybeAcceptable = "maybe_acceptable"
|
||||
}
|
||||
```
|
||||
@@ -16964,7 +16962,7 @@ enum Status: String, Encodable {
|
||||
```swift
|
||||
enum Status: String, Codable {
|
||||
case ok
|
||||
case notAcceptable
|
||||
case ↓notAcceptable
|
||||
case maybeAcceptable = "maybe_acceptable"
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user