Constant project_init::includes::HLINT_TEMPLATE [] [src]

pub const HLINT_TEMPLATE: &'static str = "---\n# Specify additional command line arguments\n#\n# - arguments: [--color, --cpp-simple, -XQuasiQuotes]\n\n\n# Control which extensions/flags/modules/functions can be used\n#\n# - extensions:\n#   - default: false # all extension are banned by default\n#   - name: [PatternGuards, ViewPatterns] # only these listed extensions can be used\n#   - {name: CPP, within: CrossPlatform} # CPP can only be used in a given module\n#\n# - flags:\n#   - {name: -w, within: []} # -w is allowed nowhere\n#\n# - modules:\n#   - {name: Control.Arrow, within: []} # Certain modules are banned entirely\n#\n- functions:\n  - {name: unsafePerformIO, within: []}  # unsafePerformIO can appear nowhere\n  - {name: error, within: []}  # throw real errors\n  - {name: undefined, within: []}\n  - {name: fromJust, within: []}  # this is hell to track down\n  - {name: foldl, within: []}  # foldl has bad properties\n\n\n# Add custom hints for this project\n#\n- error: {lhs: \"hylo embed\", rhs: \"ana\", name: \"Use anamorphism\"}\n- error: {lhs: \"hylo f project\", rhs: \"cata f\", name: \"Use catamorphism\"}\n- error: {lhs: \"do { x <- y ; pure (f x) }\", rhs: \"f =<< f\", name: \"Avoid do-notation\"}\n# - error: {lhs: \"do { a ; b }\", rhs: \"a >> b\", name: \"Avoid do-notation\"}\n- error: {lhs: \"concat\", rhs: \"join\", name: \"Generalize concat\"}\n- error: {lhs: \"concatMap\", rhs: \"(=<<)\", name: \"Generalize concatMap\"}\n- error: {lhs: \"f >> pure ()\", rhs: \"void f\", name: \"Use void\"}\n- error: {lhs: \"over _1 f x\", rhs: \"first f x\", name: \"Use arrows\"}\n- error: {lhs: \"over _2 f x\", rhs: \"second f x\", name: \"Use arrows\"}\n\n\n# Turn on hints that are off by default\n#\n# Generalise map to fmap, ++ to <>\n# - group: {name: generalise, enabled: true}\n\n\n# Ignore some builtin hints\n# - ignore: {name: Use let}\n# - ignore: {name: Use const, within: SpecialModule} # Only within certain modules\n\n\n# Define some custom infix operators\n# - fixity: infixr 3 ~^#^~\n"