Skip to content

Instantly share code, notes, and snippets.

@njdehoog
Last active March 22, 2017 10:02
Show Gist options
  • Save njdehoog/f50d8680c5f21a781840107b6b079050 to your computer and use it in GitHub Desktop.
Save njdehoog/f50d8680c5f21a781840107b6b079050 to your computer and use it in GitHub Desktop.
Custom Swiftlint rule to display developer warning (like #warning in Objective-C)
custom_rules:
developer_warning:
included: ".*.swift"
name: "Developer Warning"
regex: "//\h*?(?i)warning" # matches '// WARNING' (case insensitive)
match_kinds: comment
message: "Fix before merging"
severity: warning
@njdehoog
Copy link
Author

Display a warning by placing a // WARNING comment in your code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment