-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Report errors reading 'elp lint' config file
Summary: Do not silently swallow errors in the `.elp_lint.toml` configuration file. Reviewed By: ir-regular Differential Revision: D48831490 fbshipit-source-id: 78e4cbbfc909f5cc8a826aa68182af8f2cb7d211
- Loading branch information
1 parent
4f7dcdb
commit 3762bd1
Showing
30 changed files
with
996 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[buck] | ||
enabled = true | ||
build_deps = false | ||
included_targets = [ "fbcode//whatsapp/elp/test_projects/linter/..." ] | ||
source_root = "whatsapp/elp/test_projects/linter" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# @lint-ignore-every TOMLSYNTAX | ||
enabled_lints =[ | ||
'L1268', | ||
'W0011', | ||
'P1700' | ||
syntax error | ||
] | ||
disabled_lints = ['W0010'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.idea | ||
build_info.etf | ||
/_build/ | ||
rebar.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-typing([eqwalizer]). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{application, app_a, | ||
[{description, "example app A"}, {vsn, "inplace"}, {applications, [kernel, stdlib]}] | ||
}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-module(app_a). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[buck] | ||
enabled = true | ||
build_deps = false | ||
included_targets = [ "fbcode//whatsapp/elp/test_projects/linter/..." ] | ||
source_root = "whatsapp/elp/test_projects/linter" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
enabled_lints =['L1268', 'W0011', 'P1700'] | ||
disabled_lints = ['W0010'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.idea | ||
build_info.etf | ||
/_build/ | ||
rebar.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-typing([eqwalizer]). |
3 changes: 3 additions & 0 deletions
3
test_projects/linter_bad_config/linter/app_a/src/app_a.app.src
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{application, app_a, | ||
[{description, "example app A"}, {vsn, "inplace"}, {applications, [kernel, stdlib]}] | ||
}. |
10 changes: 10 additions & 0 deletions
10
test_projects/linter_bad_config/linter/app_a/src/app_a.erl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
-module(app_a). | ||
-export([application_env_error_app_a/0]). | ||
|
||
application_env_error_app_a() -> | ||
application:get_env(misc, key). | ||
|
||
food(0) -> | ||
ok; | ||
fooX(X) -> | ||
no. |
6 changes: 6 additions & 0 deletions
6
test_projects/linter_bad_config/linter/app_a/src/app_a_unused_param.erl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
-module(app_a_unused_param). | ||
|
||
-export([foo/1]). | ||
|
||
foo(X) -> | ||
ok. |
19 changes: 19 additions & 0 deletions
19
test_projects/linter_bad_config/linter/app_a/test/app_a_SUITE.erl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
-module(app_a_SUITE). | ||
-compile([export_all, nowarn_export_all]). | ||
-typing([eqwalizer]). | ||
|
||
-include_lib("stdlib/include/assert.hrl"). | ||
-include("app_a.hrl"). | ||
|
||
-spec ok() -> ok. | ||
ok() -> | ||
?assert(true), | ||
case rand:uniform(1) of | ||
1 -> app_a_test_helpers:ok(); | ||
_ -> app_a_test_helpers_not_opted_in:ok() | ||
end. | ||
|
||
-spec fail() -> ok. | ||
fail() -> | ||
app_a_test_helpers:fail(). | ||
|
10 changes: 10 additions & 0 deletions
10
test_projects/linter_bad_config/linter/app_a/test/app_a_test_helpers.erl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
-module(app_a_test_helpers). | ||
-typing([eqwalizer]). | ||
-compile([export_all, nowarn_export_all]). | ||
|
||
-spec fail() -> error. | ||
fail() -> wrong_ret. | ||
|
||
-spec ok() -> ok. | ||
ok() -> ok. | ||
|
9 changes: 9 additions & 0 deletions
9
test_projects/linter_bad_config/linter/app_a/test/app_a_test_helpers_not_opted_in.erl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-module(app_a_test_helpers_not_opted_in). | ||
-compile([export_all, nowarn_export_all]). | ||
|
||
-spec fail() -> ok. | ||
fail() -> error. | ||
|
||
-spec ok() -> ok. | ||
ok() -> ok. | ||
|
6 changes: 6 additions & 0 deletions
6
test_projects/linter_bad_config/linter/app_a/test/app_test_helpers_no_errors.erl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
-module(app_a_test_helpers_no_errors). | ||
-compile([export_all, nowarn_export_all]). | ||
|
||
-spec ok() -> ok. | ||
ok() -> ok. | ||
|
3 changes: 3 additions & 0 deletions
3
test_projects/linter_bad_config/linter/app_b/src/app_b.app.src
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{application, app_b, | ||
[{description, "example app B"}, {vsn, "inplace"}, {applications, [kernel, stdlib]}] | ||
}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-module(app_b). | ||
-export([application_env_error/0]). | ||
|
||
application_env_error() -> | ||
application:get_env(misc, key). |
6 changes: 6 additions & 0 deletions
6
test_projects/linter_bad_config/linter/app_b/src/app_b_unused_param.erl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
-module(app_b_unused_param). | ||
|
||
-export([foo/1]). | ||
|
||
foo(X) -> | ||
ok. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{checkouts_dir, ["."]}. | ||
{plugins, [wa_utils]}. | ||
{project_app_dirs, [ | ||
"app_a", | ||
"app_b" | ||
]}. | ||
|
||
{erl_opts, [debug_info]}. | ||
{deps, []}. |
Oops, something went wrong.