Skip to content

Commit

Permalink
[nslocalizedstring_require_bundle] Add autogenerated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Healy committed Mar 29, 2019
1 parent eecf27e commit dc9584e
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions Rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
* [No Grouping Extension](#no-grouping-extension)
* [Notification Center Detachment](#notification-center-detachment)
* [NSLocalizedString Key](#nslocalizedstring-key)
* [NSLocalizedString Require Bundle](#nslocalizedstring-require-bundle)
* [NSObject Prefer isEqual](#nsobject-prefer-isequal)
* [Number Separator](#number-separator)
* [Object Literal](#object-literal)
Expand Down Expand Up @@ -13549,6 +13550,60 @@ NSLocalizedString(↓"key_\(param)", comment: nil)



## NSLocalizedString Require Bundle

Identifier | Enabled by default | Supports autocorrection | Kind | Analyzer | Minimum Swift Compiler Version
--- | --- | --- | --- | --- | ---
`nslocalizedstring_require_bundle` | Disabled | No | lint | No | 3.0.0

Calls to NSLocalisedString should specify the bundle which contains the strings file.

### Examples

<details>
<summary>Non Triggering Examples</summary>

```swift
NSLocalizedString("someKey", bundle: .main, comment: "test")
```

```swift
NSLocalizedString("someKey", tableName: "a",
bundle: Bundle(for: A.self),
comment: "test")
```

```swift
NSLocalizedString("someKey", tableName: "xyz",
bundle: someBundle, value: "test"
comment: "test")
```

```swift
arbitraryFunctionCall("something")
```

</details>
<details>
<summary>Triggering Examples</summary>

```swift
↓NSLocalizedString("someKey", comment: "test")
```

```swift
↓NSLocalizedString("someKey", tableName: "a", comment: "test")
```

```swift
↓NSLocalizedString("someKey", tableName: "xyz",
value: "test", comment: "test")
```

</details>



## NSObject Prefer isEqual

Identifier | Enabled by default | Supports autocorrection | Kind | Analyzer | Minimum Swift Compiler Version
Expand Down

0 comments on commit dc9584e

Please sign in to comment.