Dogfeeding: cleaning up

This commit is contained in:
Jeroen Engels 2017-06-18 20:55:20 +02:00
parent 11b37494a9
commit 1477fe856d
4 changed files with 2 additions and 12 deletions

View File

@ -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 )

View File

@ -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(..))

View File

@ -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

View File

@ -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"