Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug that causes an error when $ rebar3 help efmt is executed #82

Merged
merged 3 commits into from
Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,13 @@ jobs:
with:
command: clippy
args: --all -- -D warnings

plugin-test:
name: rebar3 plugin test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: rebar3 help efmt
working-directory: rebar3_efmt/test/foo
- run: rebar3 efmt -w
working-directory: rebar3_efmt/test/foo
2 changes: 1 addition & 1 deletion rebar3_efmt/src/rebar3_efmt_prv.erl
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ opts() ->
"(note that files spcified by `.gitignore` will be ignored)"},
{disable_update_check, undefined, "disable-update-check", undefined,
"Stops issuing an HTTP GET request each command execution to check if a newer version has been released"},
{allow_partial_failure, "allow-partial-failure", undefined,
{allow_partial_failure, undefined, "allow-partial-failure", undefined,
"Don't raise an error even if the input contains wrong Erlang code."
"`efmt` tries to continue formatting the remaining part of the code as much as possible"}
].
Expand Down
19 changes: 19 additions & 0 deletions rebar3_efmt/test/foo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.rebar3
_*
.eunit
*.o
*.beam
*.plt
*.swp
*.swo
.erlang.cookie
ebin
log
erl_crash.dump
.rebar
logs
_build
.idea
*.iml
rebar3.crashdump
*~
1 change: 1 addition & 0 deletions rebar3_efmt/test/foo/_checkouts/rebar3_efmt
3 changes: 3 additions & 0 deletions rebar3_efmt/test/foo/rebar.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{erl_opts, [debug_info]}.
{project_plugins, [rebar3_efmt]}.
{deps, []}.
14 changes: 14 additions & 0 deletions rebar3_efmt/test/foo/src/foo.app.src
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{application, foo,
[{description, "An OTP library"},
{vsn, "0.1.0"},
{registered, []},
{applications,
[kernel,
stdlib
]},
{env,[]},
{modules, []},

{licenses, ["Apache 2.0"]},
{links, []}
]}.
3 changes: 3 additions & 0 deletions rebar3_efmt/test/foo/src/foo.erl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-module(foo).

-export([]).