Skip to content

Instantly share code, notes, and snippets.

@rmirabelli
Created January 2, 2018 19:10
Show Gist options
  • Save rmirabelli/ca24aee8bed5b1f2b559aa4a7c6a98bd to your computer and use it in GitHub Desktop.
Save rmirabelli/ca24aee8bed5b1f2b559aa4a7c6a98bd to your computer and use it in GitHub Desktop.
This is a little snippet to make sure we don't ever use YYYY for date formatting-- this can rarely lead to a very serious bug.
custom_rules:
YYYY_considered_harmful: # rule identifier
name: "YYYY considered harmful" # rule name. optional.
regex: "(YYYY)" # matching pattern
message: "YYYY means week-year; you probably want yyyy" # violation message. optional.
severity: error # violation severity. optional.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment