mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-12-26 03:04:48 +03:00
Dogfeeding: cleaning up
This commit is contained in:
parent
11b37494a9
commit
1477fe856d
@ -25,7 +25,7 @@ config =
|
||||
, ( Critical, Lint.Rules.NoDebug.rule )
|
||||
, ( Critical, Lint.Rules.NoDuplicateImports.rule )
|
||||
, ( Critical, Lint.Rules.NoExposingEverything.rule )
|
||||
, ( Critical, Lint.Rules.NoImportingEverything.rule { exceptions = [ "Html" ] } )
|
||||
, ( Critical, Lint.Rules.NoImportingEverything.rule { exceptions = [ "Html", "Ast.Expression", "Ast.Statement" ] } )
|
||||
, ( Critical, Lint.Rules.NoNestedLet.rule )
|
||||
, ( Critical, Lint.Rules.NoUnannotatedFunction.rule )
|
||||
, ( Critical, Lint.Rules.NoUnusedVariables.rule )
|
||||
|
@ -6,7 +6,7 @@ import Ast.Statement exposing (..)
|
||||
import Combine
|
||||
import Html exposing (..)
|
||||
import Html.Attributes exposing (class, id)
|
||||
import Html.Events exposing (..)
|
||||
import Html.Events exposing (on, targetValue)
|
||||
import Json.Decode as JD
|
||||
import Lint exposing (lintSource)
|
||||
import Lint.Types exposing (LintRule, Severity(..))
|
||||
|
@ -17,7 +17,6 @@ module Lint.Rules.NoWarningComments exposing (rule)
|
||||
import Ast.Statement exposing (..)
|
||||
import Lint exposing (doNothing, lint)
|
||||
import Lint.Types exposing (LintRule, Direction(..), LintError, LintRuleImplementation)
|
||||
import Regex exposing (Regex)
|
||||
|
||||
|
||||
type alias Context =
|
||||
@ -50,11 +49,6 @@ error word =
|
||||
LintError "NoWarningComments" ("Unexpected " ++ word ++ " comment")
|
||||
|
||||
|
||||
commentRegex : Regex
|
||||
commentRegex =
|
||||
Regex.caseInsensitive <| Regex.regex "(TODO|FIXME|XXX)"
|
||||
|
||||
|
||||
findWarning : String -> Maybe LintError
|
||||
findWarning text =
|
||||
if String.contains "TODO" text then
|
||||
|
@ -46,10 +46,6 @@ tests =
|
||||
\() ->
|
||||
testRule "a = List.map f |> List.map g"
|
||||
|> expectErrors []
|
||||
, test "should not report piping the function in itself" <|
|
||||
\() ->
|
||||
testRule "a = List.map f |> List.map g"
|
||||
|> expectErrors []
|
||||
, test "should report piping the complete call into the same function" <|
|
||||
\() ->
|
||||
testRule "a = List.map f data |> List.map g"
|
||||
|
Loading…
Reference in New Issue
Block a user