mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-09-11 16:16:09 +03:00
Rename NoInvalidLicense to NoUnapprovedLicense
This commit is contained in:
parent
9378669cc0
commit
70bfc6f0bd
@ -1,4 +1,4 @@
|
||||
module NoInvalidLicense exposing (rule)
|
||||
module NoUnapprovedLicense exposing (rule)
|
||||
|
||||
{-|
|
||||
|
||||
@ -18,7 +18,7 @@ import Set exposing (Set)
|
||||
{-| Forbid the use of dependencies that use unknown or forbidden licenses.
|
||||
|
||||
config =
|
||||
[ NoInvalidLicense.rule
|
||||
[ NoUnapprovedLicense.rule
|
||||
{ allowed = [ "BSD-3-Clause", "MIT" ]
|
||||
, forbidden = [ "GPL-3.0-only", "GPL-3.0-or-later" ]
|
||||
}
|
||||
@ -27,7 +27,7 @@ import Set exposing (Set)
|
||||
-}
|
||||
rule : Configuration -> Rule
|
||||
rule configuration =
|
||||
Rule.newProjectRuleSchema "NoInvalidLicense" initialProjectContext
|
||||
Rule.newProjectRuleSchema "NoUnapprovedLicense" initialProjectContext
|
||||
|> Rule.withElmJsonProjectVisitor elmJsonVisitor
|
||||
|> Rule.withDependenciesProjectVisitor dependenciesVisitor
|
||||
|> Rule.withFinalProjectEvaluation (finalEvaluationForProject configuration)
|
@ -1,9 +1,9 @@
|
||||
module NoInvalidLicenseTest exposing (all)
|
||||
module NoUnapprovedLicenseTest exposing (all)
|
||||
|
||||
import Elm.Docs
|
||||
import Elm.Project
|
||||
import Json.Decode as Decode
|
||||
import NoInvalidLicense exposing (rule)
|
||||
import NoUnapprovedLicense exposing (rule)
|
||||
import Review.Project as Project exposing (Project)
|
||||
import Review.Project.Dependency as Dependency exposing (Dependency)
|
||||
import Review.Test
|
||||
@ -108,7 +108,7 @@ a = 1
|
||||
|
||||
all : Test
|
||||
all =
|
||||
describe "NoInvalidLicense"
|
||||
describe "NoUnapprovedLicense"
|
||||
[ test "should not report anything if there is no `elm.json` file" <|
|
||||
\() ->
|
||||
sourceCode
|
Loading…
Reference in New Issue
Block a user