Skip to content

Commit

Permalink
Default disable "Use camelCase" (digital-asset#2885)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shayne Fletcher authored Sep 11, 2019
1 parent 41aa03c commit 388af4c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
5 changes: 4 additions & 1 deletion compiler/damlc/daml-ide-core/dlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -980,8 +980,11 @@
# --
# DAML specific

# Not popular or useful
- ignore: {name: Use camelCase}
# Not relevant to DAML
- ignore: {name: Use newtype instead of data}

# Bracketing rules
- ignore: {name: Redundant bracket}
- ignore: {name: Redundant $}
- ignore: {name: Move brackets to avoid $}
23 changes: 12 additions & 11 deletions compiler/damlc/tests/src/DA/Test/ShakeIdeClient.hs
Original file line number Diff line number Diff line change
Expand Up @@ -279,17 +279,18 @@ dlintSmokeTests mbScenarioService = Tasty.testGroup "Dlint smoke tests"
setFilesOfInterest [foo]
expectNoErrors
expectDiagnostic DsInfo (foo, 2, 0) "Warning: Use fewer imports"
, testCase' "Suggest use camelCase" $ do
foo <- makeFile "Foo.daml" $ T.unlines
[ "daml 1.2"
, "module Foo where"
, "my_fact (n : Int) : Int"
, " | n <= 1 = 1"
, " | otherwise = n * my_fact (n - 1)"
]
setFilesOfInterest [foo]
expectNoErrors
expectDiagnostic DsInfo (foo, 2, 0) "Suggestion: Use camelCase"
-- Now disabled by default.
-- , testCase' "Suggest use camelCase" $ do
-- foo <- makeFile "Foo.daml" $ T.unlines
-- [ "daml 1.2"
-- , "module Foo where"
-- , "my_fact (n : Int) : Int"
-- , " | n <= 1 = 1"
-- , " | otherwise = n * my_fact (n - 1)"
-- ]
-- setFilesOfInterest [foo]
-- expectNoErrors
-- expectDiagnostic DsInfo (foo, 2, 0) "Suggestion: Use camelCase"
, testCase' "Suggest reduce duplication" $ do
foo <- makeFile "Foo.daml" $ T.unlines
[ "daml 1.2"
Expand Down

0 comments on commit 388af4c

Please sign in to comment.