Skip to content

Commit

Permalink
rtfeldman#446 added elm-review config for remaining subdirs
Browse files Browse the repository at this point in the history
  • Loading branch information
frankschmitt committed Oct 18, 2020
1 parent e600d17 commit 5552466
Show file tree
Hide file tree
Showing 11 changed files with 361 additions and 1 deletion.
36 changes: 36 additions & 0 deletions example-application-no-tests/review/elm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"type": "application",
"source-directories": [
"src"
],
"elm-version": "0.19.1",
"dependencies": {
"direct": {
"elm/core": "1.0.5",
"elm/json": "1.1.3",
"elm/project-metadata-utils": "1.0.1",
"jfmengels/elm-review": "2.3.3",
"jfmengels/elm-review-unused": "1.1.3",
"stil4m/elm-syntax": "7.1.3"
},
"indirect": {
"elm/html": "1.0.0",
"elm/parser": "1.1.0",
"elm/random": "1.0.0",
"elm/time": "1.0.0",
"elm/url": "1.0.0",
"elm/virtual-dom": "1.0.2",
"elm-community/json-extra": "4.3.0",
"elm-community/list-extra": "8.2.4",
"rtfeldman/elm-hex": "1.0.0",
"rtfeldman/elm-iso8601-date-strings": "1.1.3",
"stil4m/structured-writer": "1.0.3"
}
},
"test-dependencies": {
"direct": {
"elm-explorations/test": "1.2.2"
},
"indirect": {}
}
}
35 changes: 35 additions & 0 deletions example-application-no-tests/review/src/ReviewConfig.elm
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
module ReviewConfig exposing (config)

{-| Do not rename the ReviewConfig module or the config function, because
`elm-review` will look for these.
To add packages that contain rules, add them to this review project using
`elm install author/packagename`
when inside the directory containing this file.
-}

import NoUnused.CustomTypeConstructorArgs
import NoUnused.CustomTypeConstructors
import NoUnused.Dependencies
import NoUnused.Exports
import NoUnused.Modules
import NoUnused.Parameters
import NoUnused.Patterns
import NoUnused.Variables
import Review.Rule exposing (Rule)


config : List Rule
config =
[ {-NoUnused.CustomTypeConstructors.rule []
, NoUnused.CustomTypeConstructorArgs.rule
, NoUnused.Dependencies.rule
, NoUnused.Exports.rule
, NoUnused.Modules.rule
, NoUnused.Parameters.rule
, NoUnused.Patterns.rule
,-} NoUnused.Variables.rule
]
36 changes: 36 additions & 0 deletions example-application-src/review/elm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"type": "application",
"source-directories": [
"src"
],
"elm-version": "0.19.1",
"dependencies": {
"direct": {
"elm/core": "1.0.5",
"elm/json": "1.1.3",
"elm/project-metadata-utils": "1.0.1",
"jfmengels/elm-review": "2.3.3",
"jfmengels/elm-review-unused": "1.1.3",
"stil4m/elm-syntax": "7.1.3"
},
"indirect": {
"elm/html": "1.0.0",
"elm/parser": "1.1.0",
"elm/random": "1.0.0",
"elm/time": "1.0.0",
"elm/url": "1.0.0",
"elm/virtual-dom": "1.0.2",
"elm-community/json-extra": "4.3.0",
"elm-community/list-extra": "8.2.4",
"rtfeldman/elm-hex": "1.0.0",
"rtfeldman/elm-iso8601-date-strings": "1.1.3",
"stil4m/structured-writer": "1.0.3"
}
},
"test-dependencies": {
"direct": {
"elm-explorations/test": "1.2.2"
},
"indirect": {}
}
}
35 changes: 35 additions & 0 deletions example-application-src/review/src/ReviewConfig.elm
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
module ReviewConfig exposing (config)

{-| Do not rename the ReviewConfig module or the config function, because
`elm-review` will look for these.
To add packages that contain rules, add them to this review project using
`elm install author/packagename`
when inside the directory containing this file.
-}

import NoUnused.CustomTypeConstructorArgs
import NoUnused.CustomTypeConstructors
import NoUnused.Dependencies
import NoUnused.Exports
import NoUnused.Modules
import NoUnused.Parameters
import NoUnused.Patterns
import NoUnused.Variables
import Review.Rule exposing (Rule)


config : List Rule
config =
[ {-NoUnused.CustomTypeConstructors.rule []
, NoUnused.CustomTypeConstructorArgs.rule
, NoUnused.Dependencies.rule
, NoUnused.Exports.rule
, NoUnused.Modules.rule
, NoUnused.Parameters.rule
, NoUnused.Patterns.rule
,-} NoUnused.Variables.rule
]
36 changes: 36 additions & 0 deletions example-application/review/elm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"type": "application",
"source-directories": [
"src"
],
"elm-version": "0.19.1",
"dependencies": {
"direct": {
"elm/core": "1.0.5",
"elm/json": "1.1.3",
"elm/project-metadata-utils": "1.0.1",
"jfmengels/elm-review": "2.3.3",
"jfmengels/elm-review-unused": "1.1.3",
"stil4m/elm-syntax": "7.1.3"
},
"indirect": {
"elm/html": "1.0.0",
"elm/parser": "1.1.0",
"elm/random": "1.0.0",
"elm/time": "1.0.0",
"elm/url": "1.0.0",
"elm/virtual-dom": "1.0.2",
"elm-community/json-extra": "4.3.0",
"elm-community/list-extra": "8.2.4",
"rtfeldman/elm-hex": "1.0.0",
"rtfeldman/elm-iso8601-date-strings": "1.1.3",
"stil4m/structured-writer": "1.0.3"
}
},
"test-dependencies": {
"direct": {
"elm-explorations/test": "1.2.2"
},
"indirect": {}
}
}
35 changes: 35 additions & 0 deletions example-application/review/src/ReviewConfig.elm
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
module ReviewConfig exposing (config)

{-| Do not rename the ReviewConfig module or the config function, because
`elm-review` will look for these.
To add packages that contain rules, add them to this review project using
`elm install author/packagename`
when inside the directory containing this file.
-}

import NoUnused.CustomTypeConstructorArgs
import NoUnused.CustomTypeConstructors
import NoUnused.Dependencies
import NoUnused.Exports
import NoUnused.Modules
import NoUnused.Parameters
import NoUnused.Patterns
import NoUnused.Variables
import Review.Rule exposing (Rule)


config : List Rule
config =
[ {-NoUnused.CustomTypeConstructors.rule []
, NoUnused.CustomTypeConstructorArgs.rule
, NoUnused.Dependencies.rule
, NoUnused.Exports.rule
, NoUnused.Modules.rule
, NoUnused.Parameters.rule
, NoUnused.Patterns.rule
,-} NoUnused.Variables.rule
]
36 changes: 36 additions & 0 deletions example-package-no-tests/review/elm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"type": "application",
"source-directories": [
"src"
],
"elm-version": "0.19.1",
"dependencies": {
"direct": {
"elm/core": "1.0.5",
"elm/json": "1.1.3",
"elm/project-metadata-utils": "1.0.1",
"jfmengels/elm-review": "2.3.3",
"jfmengels/elm-review-unused": "1.1.3",
"stil4m/elm-syntax": "7.1.3"
},
"indirect": {
"elm/html": "1.0.0",
"elm/parser": "1.1.0",
"elm/random": "1.0.0",
"elm/time": "1.0.0",
"elm/url": "1.0.0",
"elm/virtual-dom": "1.0.2",
"elm-community/json-extra": "4.3.0",
"elm-community/list-extra": "8.2.4",
"rtfeldman/elm-hex": "1.0.0",
"rtfeldman/elm-iso8601-date-strings": "1.1.3",
"stil4m/structured-writer": "1.0.3"
}
},
"test-dependencies": {
"direct": {
"elm-explorations/test": "1.2.2"
},
"indirect": {}
}
}
36 changes: 36 additions & 0 deletions example-package-no-tests/review/src/ReviewConfig.elm
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
module ReviewConfig exposing (config)

{-| Do not rename the ReviewConfig module or the config function, because
`elm-review` will look for these.
To add packages that contain rules, add them to this review project using
`elm install author/packagename`
when inside the directory containing this file.
-}

import NoUnused.CustomTypeConstructorArgs
import NoUnused.CustomTypeConstructors
import NoUnused.Dependencies
import NoUnused.Exports
import NoUnused.Modules
import NoUnused.Parameters
import NoUnused.Patterns
import NoUnused.Variables
import Review.Rule exposing (Rule)


config : List Rule
config =
[ {-NoUnused.CustomTypeConstructors.rule []
, NoUnused.CustomTypeConstructorArgs.rule
, NoUnused.Dependencies.rule
, NoUnused.Exports.rule
, NoUnused.Modules.rule
, NoUnused.Parameters.rule
, NoUnused.Patterns.rule
,-} NoUnused.Variables.rule
|> Review.Rule.ignoreErrorsForFiles [ "src/Something.elm" ]
]
36 changes: 36 additions & 0 deletions example-package/review/elm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"type": "application",
"source-directories": [
"src"
],
"elm-version": "0.19.1",
"dependencies": {
"direct": {
"elm/core": "1.0.5",
"elm/json": "1.1.3",
"elm/project-metadata-utils": "1.0.1",
"jfmengels/elm-review": "2.3.3",
"jfmengels/elm-review-unused": "1.1.3",
"stil4m/elm-syntax": "7.1.3"
},
"indirect": {
"elm/html": "1.0.0",
"elm/parser": "1.1.0",
"elm/random": "1.0.0",
"elm/time": "1.0.0",
"elm/url": "1.0.0",
"elm/virtual-dom": "1.0.2",
"elm-community/json-extra": "4.3.0",
"elm-community/list-extra": "8.2.4",
"rtfeldman/elm-hex": "1.0.0",
"rtfeldman/elm-iso8601-date-strings": "1.1.3",
"stil4m/structured-writer": "1.0.3"
}
},
"test-dependencies": {
"direct": {
"elm-explorations/test": "1.2.2"
},
"indirect": {}
}
}
36 changes: 36 additions & 0 deletions example-package/review/src/ReviewConfig.elm
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
module ReviewConfig exposing (config)

{-| Do not rename the ReviewConfig module or the config function, because
`elm-review` will look for these.
To add packages that contain rules, add them to this review project using
`elm install author/packagename`
when inside the directory containing this file.
-}

import NoUnused.CustomTypeConstructorArgs
import NoUnused.CustomTypeConstructors
import NoUnused.Dependencies
import NoUnused.Exports
import NoUnused.Modules
import NoUnused.Parameters
import NoUnused.Patterns
import NoUnused.Variables
import Review.Rule exposing (Rule)


config : List Rule
config =
[ {-NoUnused.CustomTypeConstructors.rule []
, NoUnused.CustomTypeConstructorArgs.rule
, NoUnused.Dependencies.rule
, NoUnused.Exports.rule
, NoUnused.Modules.rule
, NoUnused.Parameters.rule
, NoUnused.Patterns.rule
,-} NoUnused.Variables.rule
|> Review.Rule.ignoreErrorsForFiles [ "src/Something.elm" ]
]
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
"scripts": {
"flow": "flow",
"lint": "eslint .",
"review": "cd elm && elm-review",
"review:elm": "cd elm && elm-review",
"review:example-applications": "cd example-application && elm-review && cd ../example-application-no-tests && elm-review && cd ../example-application-src && elm-review",
"review:example-packages": "cd example-package && elm-review && cd ../example-package-no-tests && elm-review",
"review": "npm run review:elm && npm run review:example-applications && npm run review:example-packages",
"test-only": "mocha tests && cd elm && node ../bin/elm-test",
"test": "flow check && npm run lint && npm run format:check && npm run review && npm run test-only",
"format:check": "prettier --check . && elm-format elm --validate",
Expand Down

0 comments on commit 5552466

Please sign in to comment.